Integration gets stuck once a day

Until now, the integration used to work great. But since the update with the new authentication, values just get stuck once a day without any errors. The only thing that seems to help is deleting and reinstalling the integration, altogether.
Except for reinstalling and reauthenticating due to the latest update, I didn't make any changes.

Same to me, rebooting ha core fixes the issue for some time for one day.
Version <IP_ADDRESS>b5 has worked without any issues with the same config for a long time.

Same here. I only very recently started using this integration, so no experience with previous versions. But from the start I noticed that the integration loses connection all too soon after every restart, and never reconnects out of itself. Only a Hass restart fixes it - temporarily that is ...

Same behavior here with 1.0.0-0b901. Once a day the connection gets lost and I have to restart Hass.

Searched the log-files and got the error:
[code]2022-06-17 14:19:07 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/gardena/smart_system.py", line 192, in start_ws
r = await self.client.post(
File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1842, in post
return await self.request(
File "/usr/local/lib/python3.9/site-packages/authlib/integrations/httpx_client/oauth2_client.py", line 88, in request
await self.ensure_active_token()
File "/usr/local/lib/python3.9/site-packages/authlib/integrations/httpx_client/oauth2_client.py", line 109, in ensure_active_token
raise InvalidTokenError()
authlib.integrations.base_client.errors.InvalidTokenError: token_invalid:[/code]
Didn't change any tokens and after a restart of Hass it works again with no changes.

Same behaviour here.

<IP_ADDRESS>b5

Hi, I have the same problem. Doesn`t help to reinstall. Where can I find the old ver <IP_ADDRESS>b?

<IP_ADDRESS>b5

Hi, I have the same problem. Doesn`t help to reinstall. Where can I find the old ver <IP_ADDRESS>b?

Delete old gardena folder, download from github and unzip to your custom_components folder. You will have re-install Gardena integration in HA

At my side the same behavior with the latest Gardena Integration Version and HA Version core-2022.6.6

The gardena API reconnecting every 2 hours is expected behavior and perfectly fine.

<IP_ADDRESS>b5

Hi, I have the same problem. Doesn`t help to reinstall. Where can I find the old ver <IP_ADDRESS>b?

Delete old gardena folder, download from github and unzip to your custom_components folder. You will have re-install Gardena integration in HA

The gardena API reconnecting every 2 hours is expected behavior and perfectly fine.

It is (since the last API-update and there's no problem with it. The hass-integration disconnecting and not reconnecting once a day isn't expected behavior, though ^^ Hopefully, the next integration-update will fix it.

The gardena API reconnecting every 2 hours is expected behavior and perfectly fine.

It is (since the last API-update) and there's no problem with it. The hass-integration disconnecting and not reconnecting once a day isn't expected behavior, though ^^ Hopefully, the next integration-update will fix it.

👍🏽😊

I have the exact same problem. It's reconnecting to the API every two hours as it should, but after 24 it fails to reconnect with an InvalidTokenError in the logs.
Maybe the token expires after 24h and needs to be renewed before that?

<IP_ADDRESS>b5

Hi, I have the same problem. Doesn`t help to reinstall. Where can I find the old ver <IP_ADDRESS>b?

Delete old gardena folder, download from github and unzip to your custom_components folder. You will have re-install Gardena integration in HA

Thank's, I'll try that 😊

Sorry Strutings, I have tried it twice. No luck! Thanks anyway!

Gents, it is fairly obvious that the developer either uses a token that is only valid for 24 hrs iso a longer-lived one (although I don't know whether there is such a thing), OR that he forgets to renew it on time. Either way, it is a flaw only he can solve - and most certainly cannot be fixed by reverting to any old version !
Pity said developer seems to be AWOL ...

Well, we should consider that most development is done for free and people use their free time to develop. I hope that the developer finds some time to fix it as it is a great add-on and I would not like to miss it.

I have noticed that some integrations implement a reload action/service (I’m looking at you IKEA Trådfri) that can be automated on a schedule. This might be an option if the token refresh problem turns out to be harder than expected. Really like the component and would love to see this fixed or possible to work-around in a reasonable way.

Hey !
Sorry about the lag in the fixes ! I have indeed not a lot of spare time to
work on the issues.
I had to rush a release with big changes because a change in the gardena
smart system api with a version not production ready.
I will try to find time to work on it asap !
Jeremie
Le jeu. 30 juin 2022 à 18:58, klercker @.***> a écrit :

I have noticed that some integrations implement a reload action/service
(I’m looking at you IKEA Trådfri) that can be automated on a schedule. This
might be an option if the token refresh problem turns out to be harder than
expected. Really like the component and would love to see this fixed or
possible to work-around in a reasonable way.
—
Reply to this email directly, view it on GitHub
https://github.com/py-smart-gardena/hass-gardena-smart-system/issues/121#issuecomment-1171464728,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAARGIY273KYJ67POY2Q3PLVRXG35ANCNFSM5Y7NMEZQ
.
You are receiving this because you commented.Message ID:
@.***
com>

Thanks Jeremie! Out private time is the rarest resource for most of us. For me too there are so many community things that I want to do and am currently pushing from day to day.
So just take your time. The Gardenas can easily be switched back to a simple time schedule.

I’ve scheduled a restart of HA once a day which solves the problem temporarily

Damn, through all my trials I didn't realize that the workaround is so simple. I always removed and re-added the integration including all the hassle to enter the API credentials again and again. Thanks for that hint @DreamT80.

If only all integrations would save their data, but not all do. Saying that, a daily restart is not really my option, unfortunately.

Maybe it also helps looking at this python module: https://github.com/Thomas55555/aioautomower
He implemented the OAuth2 flow manually as described in the Gardena authentication API docs.
Yesterday, I had a deeper look in the OAuth2Client code that is used by this integration.
According to my analysis the refresh token is never used to get a fresh access token.
Why? Because the parameter "token_endpoint" is not specified.
Have a look at this code:
    async def ensure_active_token(self, token):
        async with self._token_refresh_lock:
            if self.token.is_expired():
                refresh_token = token.get('refresh_token')
                url = self.metadata.get('token_endpoint')
                if refresh_token and url:
                    await self.refresh_token(url, refresh_token=refresh_token)
                elif self.metadata.get('grant_type') == 'client_credentials':
                    access_token = token['access_token']
                    new_token = await self.fetch_token(url, grant_type='client_credentials')
                    if self.update_token:
                        await self.update_token(new_token, access_token=access_token)
                else:
                    raise InvalidTokenError()

So instead of refreshing the token using self.refresh.token() the OAuth2Client just tries to get a new access token.
This is perfectly well as it is also described in the API docs and we are using OAuth2 grant type Client Credentials:

Note that a refresh_token is not sent back when logging in with client credentials. Use the access_token for as long as it is valid. After it have been invalid or expired, login with the client credentials again to get a new access token.

I wonder if there is any benefit from using a refresh token for this grant type?
We would have to call the token API anyway so it will count up the API usage counter.
I using the main.py fro the Gardena API Python module to test the stability of the connection.
So far everything is running now without any interrupt since 24h now.
The websocket connection is still alive and I can see updates from time to time. The websocket ping/pong is also working.
I running this main.py on Python-3.8.
So I wonder why the connection is lost once a day if the Python module is used with this HA integration.

Is there any timeline available with regards to a fix? I understand free time is a resource that is hard to come by these days, but with stable versions appearing obsolete because of the login by email and password this beta is all I have :-{(

I am still analyzing the issue.
BTW: the websocket connection timeout of 2h is a limitation caused by Amazon AWS:
https://docs.aws.amazon.com/apigateway/latest/developerguide/limits.html#apigateway-execution-service-websocket-limits-table
The Gardena stuff seem to be running on AWS.
I can see the reconnect every two hours.

I think you have already found the issue: Since the refresh_token is not provided by the husqvarna API, the auth library cannot refresh the token.
In my opinion there are 2 possible solutions:

Manually reauthenticate before the token expires (use the authenticate methode of the SmartSystem class) or
Change to authorization code authentication instead of client credentials. According to the docs this auth flow returns the refresh_token. People would again need to use their gardena username and password to login.

The first approach would be perfectly well according to the Gardena API as I mentioned some comments above.
So we do not need the refresh token or another grant_type.
The real problem is that the AsyncOAuth2Client class does not seem to have an internal timer which keeps tracks of the access token expiry interval. Instead, every call to request() internally calls a method named ensure_active_token(). See comment above.
According to my understanding the call flow within this method should result in a new call fetch_token()from within the method to get an active token again. However, this does not seem to happen. I have to further investigate why this does not happen.
To order of events according to the logs seem to be ok:

First get a valid access token in in the SmartSystem class, expires exactly after 86399s (24h)
Fetch a valid websocket URL using the valid access token
Establish the websocket connection
Websocket connection is closed after two hours by AWS
Repeat reconnection until we come close to the 24h timeout of the access token
As you can see above, the access token always expires about 2 minutes before websocket connection would timeout. This is because of (24h / 2h ) = 12, 12*10s=120s -> 120s/60s=2min where 10s is the sleep interval and 2h is the websocket timeout.

So when the websocket connection times out for the last time after a day (access token expires), the reconnection attempt tries to get a new websocket URL via REST API with an expired access token. So the method `ensure_active_token() should fetch a new access token for us before performing the actual REST API call to get a new websocket connection URL.
Unfortunately, this does not happen.

There seems to be a typo which would result in the grant_type not propery set:
@@ -67,8 +68,9 @@ class SmartSystem:
             self.client_id, self.client_secret, update_token=self.token_saver
         )
         self.token = await self.client.fetch_token(
-            url, usernamegrant_type="client_credentials"
+            url, grant_type="client_credentials"
         )

There is no such parameter usernamegrant_type. It supposed to be grant_type.
As the refresh token is not used in our case here with this grant_type I have removed and changed this:
@@ -84,12 +86,10 @@ class SmartSystem:
                     headers={"X-Api-Key": self.client_id},
                 )

-    def token_saver(self, token, refresh_token=None, access_token=None):
-        print(f"on a un token : {token['access_token']}")
+    def token_saver(self, new_token, access_token=None):
+        print(f"update_token: access token: {new_token['access_token']}")
         if access_token:
-            self.access_token = access_token
-        if refresh_token:
-            self.refresh_token = refresh_token
+            self.access_token = new_token

I would just fetch a new token for each websocket reconnect, so every 2 hours.  This would be a quick solution so people can use the integration again.
Regarding the typo, I would not count on that since the docs say:

If no code or no user info provided, it would be a client_credentials request. But it is suggested that you specify a grant_type for it

So it should be set to client_credentials even with the wrong parameter name.

Concerning the unset grant_type you are probably right.
Concering new access token every two hours:
The API docs say:

An access token can be obtained for your application and must be used to communicate with our REST APIs. Users should re-use the access token until it expires instead of creating new tokens each time.

We currently have the following limits on the Authentication API:

Max 3 access tokens for a user and client. If more than 3 are created, the oldest one will be invalidated.
Max 10 logins per minute.
Not more than one login every 5 second.
If more than 10 invalid login attempts are performed in a 5 minute window we will lock the account for 30 minutes.

Okay, I don't see which limit interferes with the 2 hours usage? In my opinion that's fine.

Hello,
I changed something in the underlying library that should solve the issue but i am not sure it will solve the issue.
I used this opportunity to enhance a little bit the logs.
I could not test it enough, i just fixed the issue and did not wait for 24 hours ;)
The fix is in the version 1.0.0-0b902

@grm
Mhmm. I see that you still added handling of refresh tokens.
To be honest, I do not know why. Is there something I have overread?
The API documentation is clear at this point:
Refresh tokens is only used for the authorization_code grant. A new access_token can be obtained by using the refresh_token grant.
See chapter "Refreshing a token" here: https://developer.husqvarnagroup.cloud/apis/authentication-api#refreshing-a-token
As you have implemented client_credentials we will never see a refresh token during the OAUTH2 flow.

Thank, i did noy see the typo in yhe grant thpe. I ll try to fix this today.
Do you have a link to the documentation where it says that refreshing
tokens is not called when using client_credentials please ? I would like to
understand better why !
Thx for the help,
Jeremie
Le dim. 17 juil. 2022 à 08:43, nanosonde @.***> a
écrit :

@grm https://github.com/grm
Mhmm. I see that you still added handling of refresh tokens.
To be honest, I do not know why. Is there something I have overread?
The API documentation is clear at this point:
Refresh tokens is only used for the authorization_code grant. A new
access_token can be obtained by using the refresh_token grant.
See chapter "Refreshing a token" here:
https://developer.husqvarnagroup.cloud/apis/authentication-api#refreshing-a-token
As you have implemented client_credentials we will never see a refresh
token during the OAUTH2 flow.
—
Reply to this email directly, view it on GitHub
https://github.com/py-smart-gardena/hass-gardena-smart-system/issues/121#issuecomment-1186420769,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAARGI53RNQWIPT2RDUOE3LVUOTQ7ANCNFSM5Y7NMEZQ
.
You are receiving this because you were mentioned.Message ID:
@.***
com>

Hola,
I just released a version ( 1.0.0-0b903) with the fix for the grant_type. It should not change anything as it is the default one, but thanks for the report !

Ok, indeed ! I was not aware of this specific casee !
I will se hoow i can implement a mechanism to check this token validity and reissue when it expires

Don't! It's to be handled by the AsyncOAuth2Client. And I think you got it wrong with the grant type. The parameters checked are in the init not in the fetch_token method (see the metadata property in authlib/integrations/httpx_client/oauth2_client.py).
The change must be in the initialization of the client:
<             self.client_id, self.client_secret, update_token=self.token_saver, grant_type="client_credentials", token_endpoint=url
---
>             self.client_id, self.client_secret, update_token=self.token_saver

and the it will handle the refresh itself. Unfortunately I seem to have overloaded the API and am blocked for now, so I cannot test this, but it should be obvious from the internals of AsyncOAuth2Client.

Thx for having debug this, i must have messed up the parameters during the migration to the new lib !
I will check it tonight and try to release a fix after ;)

Too bad, the grnat_type is indeed on the fetch_token method :
- class authlib.integrations.requests_client.OAuth2Session(client_id=None, client_secret=None, token_endpoint_auth_method=None, revocation_endpoint_auth_method=None, scope=None, state=None, redirect_uri=None, token=None, token_placement='header', update_token=None, **kwargs)

- fetch_token(url=None, body='', method='POST', headers=None, auth=None, grant_type=None, state=None, **kwargs)

in
authlib/integrations/httpx_client/oauth2_client.py:
authlib/integrations/httpx_client/oauth2_client.py:
...
            url = self.metadata.get('token_endpoint')
            if refresh_token and url:
                await self.refresh_token(url, refresh_token=refresh_token)
            elif self.metadata.get('grant_type') == 'client_credentials':
                access_token = self.token['access_token']
                token = await self.fetch_token(url, grant_type='client_credentials')
                if self.update_token:
                    await self.update_token(token, access_token=access_token)
            else:
                raise InvalidTokenError()

So it's metadata['grant_type'] that is checked here as far as I understand. And metadata comes from the **kwargs in _init.
So in authlib/oauth2/client.py (where the base class lives:
    def __init__(self, session, client_id=None, client_secret=None,
                 token_endpoint_auth_method=None,
                 revocation_endpoint_auth_method=None,
                 scope=None, redirect_uri=None, code_challenge_method=None,
                 token=None, token_placement='header', update_token=None, **metadata):

There is the metadata we are looking for.
At least that's how I understand it.

Just for the records:
This is the complete debug output of another run which got stuck after 24h.
Then I hit CTRL-C to interrupt it.
There is an InvalidTokenError exception thrown in the websocket task which is not captured.
As a result the websocket task dies and that's the reason why it does NOT automatically fetch a new access token internally in AsyncOAuth2Client in method ensure_active_token() while the Gardena module tries to get a new webocket URL.
It simply does not issue the call to get a new websocket URL as the task is dead.
So the exception should be handled as well in smart_system.py.
2022-07-17 11:45:37 DEBUG    Closing websocket ..
2022-07-17 11:45:47 DEBUG    Sleeping 10 seconds ..
2022-07-17 11:45:47 DEBUG    Trying to connect to gardena API....
2022-07-17 11:45:47 DEBUG    Trying to get Websocket url
^C------------------------------------------------------------

Traceback (most recent call last):
  File "/usr/lib/python3.8/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.8/asyncio/base_events.py", line 603, in run_until_complete
    self.run_forever()
  File "/usr/lib/python3.8/asyncio/base_events.py", line 570, in run_forever
    self._run_once()
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1823, in _run_once
    event_list = self._selector.select(timeout)
  File "/usr/lib/python3.8/selectors.py", line 468, in select
    fd_event_list = self._selector.poll(timeout, max_ev)
KeyboardInterrupt

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "src/main.py", line 39, in main
    await asyncio.sleep(5)
  File "/usr/lib/python3.8/asyncio/tasks.py", line 659, in sleep
    return await future
asyncio.exceptions.CancelledError
------------------------------------------------------------
Traceback (most recent call last):
  File "src/main.py", line 49, in <module>
    asyncio.run(main(), debug=False)
  File "/usr/lib/python3.8/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.8/asyncio/base_events.py", line 603, in run_until_complete
    self.run_forever()
  File "/usr/lib/python3.8/asyncio/base_events.py", line 570, in run_forever
    self._run_once()
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1823, in _run_once
    event_list = self._selector.select(timeout)
  File "/usr/lib/python3.8/selectors.py", line 468, in select
    fd_event_list = self._selector.poll(timeout, max_ev)
KeyboardInterrupt
2022-07-18 08:22:50 ERROR    Task exception was never retrieved
future: <Task finished name='Task-4' coro=<SmartSystem.start_ws() done, defined at /home/christian/gardena/py-smart-gardena/src/gardena/smart_system.py:175> exception=<InvalidTokenError "token_invalid">>
Traceback (most recent call last):
  File "/home/christian/gardena/py-smart-gardena/src/gardena/smart_system.py", line 186, in start_ws
    r = await self.client.post(
  File "/home/christian/.local/lib/python3.8/site-packages/httpx/_client.py", line 1842, in post
    return await self.request(
  File "/home/christian/.local/lib/python3.8/site-packages/authlib/integrations/httpx_client/oauth2_client.py", line 87, in request
    await self.ensure_active_token(self.token)
  File "/home/christian/.local/lib/python3.8/site-packages/authlib/integrations/httpx_client/oauth2_client.py", line 119, in ensure_active_token
    raise InvalidTokenError()
authlib.integrations.base_client.errors.InvalidTokenError: token_invalid:

The error is quite obvious. The refresh token is used to get a new token. Since it's empty, the server returns "invalid token".

It is very curios since i‘ve updated the integration yesterday i have on the one hand the same problem as before (integration stops working) but obviously only gatering the status information from Gardena to HomeAssistant of the entitys the otherway (send control information frim HomeAssistant to Gardena) works. In my case the automation (irigation) works but it shoud not because the depending condition has changed in the between. 🙈

The error is quite obvious. The refresh token is used to get a new token. Since it's empty, the server returns "invalid token".

For me it is not that obvious.
If you look at this authlib code in ensure_active_token():
                if refresh_token and url:
                    await self.refresh_token(url, refresh_token=refresh_token)
                elif self.metadata.get('grant_type') == 'client_credentials':
                    access_token = token['access_token']
                    new_token = await self.fetch_token(url, grant_type='client_credentials')
                    if self.update_token:
                        await self.update_token(new_token, access_token=access_token)
                else:
                    raise InvalidTokenError()

As we do not have a refresh token ( and we do not need one as we are not using authorization code grant type), it should execute the statements contained in the elif self.metadata.get('grant_type') == 'client_credentials'block. However, it seems that the metadata does not contain the grant_type field with content client_credentials.
So it does not execute the fetch_token() call internally to get a new access token.
We have to check if the metadata contains the grant_type and if urlcontains the URL of the token endpoint.

You are right - that's why I said the metadata need to be set at client creation. My code snippet from above does exactly this. Unfortunately somehow the client now seems to run into random 429 issues at the 2h recreation of the ws.

@te-hb-whatever
Yes, you are right.
These usage seems to be correct:
        self.client = AsyncOAuth2Client(
            self.client_id, self.client_secret, update_token=self.token_saver,
            token_endpoint=self.AUTHENTICATION_HOST + "/v1/oauth2/token",
            grant_type="client_credentials"
        )
        self.token = await self.client.fetch_token()

Thanks everyone for taking the time to debug the issue <3
Ì think you got it right from what i look at the code of the library.
Whuch is not clear to me is why the grant type from the fetch_token :

is the one documented
is not used when checking oauth flow to be use ... that seems odd.

I am preparing the fix

Version <IP_ADDRESS>b904 released !

I don t know ... fingers crossed !

Guys, thanks for all your hard work. I had my own share with OAuth complexities in the past, but was lucky to have access to the identity provider logs, which can be very helpful during debugging.
Unfortunately I'm afraid I have to report that the refresh did not hold with the latest version.
I installed b904 yesterday at 22:12. After that the connection entity shows three connected intervals of exactly two hours.

In-between there are two 10 second intervals without connection which I interpret as token refreshes. Here is one of them:

After the third two hour period the connection gets lost permanently - about 6 hours after it was first established.

Mine was even dead after the first two hours, no refresh it seems...

Yes, I can confirm that there is another issue.
I am running just main.py to test it.
I will update this comment with the logs soon.

Too bad ! I read the logs rapidly but it seems the exception stack trace appears once you hit crtl+C from what i see, no ? (delete requests are called when the process is shutting down usually) there are no exceptions before hitting these keys ? If so, can you paste this part only ?
I will try to find some time ot do some testing tonight.

Argh. Sorry, I was using an older checkout ewithout you recent commits.
I forgot to make the token_saver() async that is why I get the above exception TypeError: object NoneType can't be used in 'await' expression while hitting CTRL-C.
Now it seems to work. However, I modify the accesss token expire_at property so that expires after 10s so that the connection websocket connection reconnection will trigger the retrieval of a new access token within the oauth2client.
Currently it seems to work. So please forget my report. :-)

Ok, tonight I also got one of those random 429 HTTP errors that @te-hb-whatever described above.
2022-07-20 07:34:37 ERROR    Task exception was never retrieved
future: <Task finished name='Task-4' coro=<SmartSystem.start_ws() done, defined at /home/christian/gardena/py-smart-gardena/src/gardena/smart_system.py:181> exception=HTTPStatusError("Client error '429 ' for url 'https://api.smart.gardena.dev/v1/websocket'\nFor more information check: https://httpstatuses.com/429")>
Traceback (most recent call last):
  File "/home/christian/gardena/py-smart-gardena/src/gardena/smart_system.py", line 198, in start_ws
    r.raise_for_status()
  File "/home/christian/gardena/.venv/lib/python3.8/site-packages/httpx/_models.py", line 736, in raise_for_status
    raise HTTPStatusError(message, request=request, response=self)
httpx.HTTPStatusError: Client error '429 ' for url 'https://api.smart.gardena.dev/v1/websocket'
For more information check: https://httpstatuses.com/429

If the API limits don't explain the 429 responses, these could also be caused by API throttling. It's used to throw off load and avoid server congestion when any part of the request processing chain reaches max throughout capacity.

My connection now died again after 2 hours with a 429 response. Before that I completely renewed the app (delete and re-add) in the husqvarna developer portal.

I have delete the API and readded it. Now the Gardena API is working again.
Now I can continue to analyze the issue.
One thing that should be improved:
The r.raise_for_status() is not under a try/except block. I have changed this so that OAuthErrors and HTTPStatusError are caught and handled in the websocket task. Without this change the websocket task just dies and the loop does not work anymore. You will this error then later if you hit CTRL-C to stop the test program.
Here is what it looks like:
        while not self.should_stop:
            self.logger.debug("Trying to connect to gardena API....")
            try:
                self.logger.debug("Trying to get Websocket url")
                r = await self.client.post(
                    f"{self.SMART_HOST}/v1/websocket",
                    headers=self.create_header(True),
                    data=json.dumps(args, ensure_ascii=False),
                )
                self.logger.debug("Websocket url: got response")
                r.raise_for_status()
                response = r.json()
                ws_url = response["data"]["attributes"]["url"]
                self.logger.debug("Websocket url retrieved successfully")
                self.logger.debug("Connecting to websocket ..")
                websocket = await websockets.connect(ws_url)
                self.set_ws_status(True)
                self.logger.debug("Connected !")
                while True:
                    #self.logger.debug("Waiting for message ..")
                    message = await websocket.recv()
                    #self.logger.debug("Message received ..")
                    self.on_message(message)
            except websockets.ConnectionClosed:
                continue
            except InvalidTokenError:
                self.logger.debug("Token is invalid ..")
                continue
            except OAuthError:
                self.logger.debug("OAuthError ..")
                continue
            except HTTPStatusError:
                self.logger.debug("HTTPStatusError ..")
                continue
            finally:
                self.set_ws_status(False)
                if websocket:
                    self.logger.debug("Closing websocket ..")
                    await websocket.close()
                if not self.should_stop:
                    self.logger.debug("Sleeping 10 seconds ..")
                    await asyncio.sleep(10)

Also when quit() was called it is wise to not call another sleep(10)again so that the tasks immediately end and the system exits as soon as possible.

For me it seems to work now with the test program (main.py).
 Those errors were not properly visible as they were only presented in the stack trace when quitting the program.
So for me this was actually the reason why the code got stuck.

Thank you for your efforts to fix this bug :)
You may want to consider marking this as a non beta release, so that people on the stable branch also get this important bug fix. (Similar to what was done with b902).

Stable for me for >2 days now. Thanks for this big effort!

Seems to be stable for me as well.
However, I would suggest to add a status sensor as described here:
https://github.com/py-smart-gardena/py-smart-gardena/pull/144#issuecomment-1192614914
So that the user can easily add a notification automation if the API access is blocked.

Good to know, I'll promote it as a stable release :)
Goor point Nanosonde !

Oh damnit! Looks like I rejoiced too early.
I'm very sorry to convey the bad news!

Yes, I'm seeing that as well: #136 Are you getting the same entries in the log?


Istio Upgrade fails with error "does not match the target version"

Bug Description
We are running istio version 1.9.3 and trying to upgrade to 1.11.4 using in place upgrade method, during upgrade we are getting following warning and after sometime it gets failed.

Control Plane - istio-egressgateway pod - istio-egressgateway-5b9f5c9d66-26dsz - version: 1.9.3 does not match the target version 1.11.4
2021-11-01T17:49:41.543790Z     info    Error: failed to wait for the upgrade to complete. Error: upgrade rollout unfinished. Maximum number of attempts exceeded

Error: failed to wait for the upgrade to complete. Error: upgrade rollout unfinished. Maximum number of attempts exceeded

Notes:

We also tried the same on local machine with minikube setup and getting same issue
When try to upgrade to one minor version also, we are getting same issue.
kubernetes version 1.20.0

Version
Istio version: 1.9.3
Kubernetes Version: 1.20.0

Additional Information
No response
Affected product area

[ ] Docs
[ ] Installation
[ ] Networking
[ ] Performance and Scalability
[ ] Extensions and Telemetry
[ ] Security
[ ] Test and Release
[ ] User Experience
[ ] Developer Infrastructure
[X] Upgrade
[ ] Multi Cluster
[ ] Virtual Machine
[ ] Control Plane Revisions

Is this the right place to submit this?

[X] This is not a security vulnerability
[X] This is not a question about how to use Istio

Problem was, I was using custom manifest for initial istio installation and when I do istio  upgrade, the custom manifest overridden with default istio profile hence our custom components were not upgraded to latest version and leads to those warnings.
We have fixed this by passing our custom manifest with istio upgrade command.


Heading not showing

Prerequisites

[X] I am an Open Source Contributor
[X] I checked to make sure that this issue has not already been filed

Description
In the game, item selection page the top heading is not showing

Screenshots
No response
Code of Conduct

[X] I follow Contributing Guidelines of this project.

No it's fine. Check again @suman-tewary

Its a problem in other screen-size devices
Zoom your screen little you will understand the problem
On Mon, 6 Mar 2023 at 00:29, Rakesh Roshan @.***> wrote:

Closed #95 https://github.com/Rakesh9100/Click-The-Edible-Game/issues/95
as completed.
—
Reply to this email directly, view it on GitHub
https://github.com/Rakesh9100/Click-The-Edible-Game/issues/95#event-8668491889,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AKL6XXOZ4NDMEMFTDHXE4YDW2TPCFANCNFSM6AAAAAAVQKM36M
.
You are receiving this because you were mentioned.Message ID:
@.***
com>


Fix incorrect field name in keyboard interaction docs

Docs reference a button field, but keyboard events use key:
https://github.com/JuliaPlots/Makie.jl/blob/96e60b915e0350341916184a5565a150fb957a4d/src/interaction/iodevices.jl#L206-L210

I also fixed this in https://github.com/JuliaPlots/Makie.jl/pull/974 but we didn't merge that yet

#974 got merged, so I assume I can close this..
Thanks for the PR anyways, of course :)


rh_subscriprion bootstrap script

What this PR does / why we need it:
Addition of the rh_subscription cloud-init module to the yum
version of the bootstrap script.
Which issue(s) this PR fixes (optional, in fixes #<issue number> format, will close the issue(s) when PR gets merged):
Fixes #1261
Special notes for your reviewer:
Optional Release Note:

RHEL in Azure has been updated to the 8.5 version, and the rh_subscription module has been added to the bootstrap cloud-init when using RHEL.

I can also approve this later on, just giving @moadqassem a chance to take a look as well.

@mlavacca just a note, can you please update the release note to include the two changes in this PR (adding the subscription module configuration and updating the image)? Thanks!

Done :)

/test pull-machine-controller-e2e-azure

/hold
seems this is broken, to be in investigated.

/test pull-machine-controller-e2e-azure

Azure failing tests have been fixed. PTAL @embik @moadqassem

/unhold

/cherrypick release/v1.43


Implementation of Commit-Reveal Scheme

🎨 Overview

Implementation of commit-reveal scheme.
🌈 Details

Implemented the following contract functions & their tests.

A. VerifierFactory contract

constructor: contract constructor that initializes the address of the master verifier contract.
createChildContract: function that deploys a cloned (proxy) verifier contract.
getModels: function that fetches models.
getModelsByOwnerAddress: function that fetches models by the address of the requested model owner.
getMasterVerifierContract: function that fetches the address of the master verifier contract.
getClonedVerifierContract: function that fetches the address of the cloned verifier contract of the requested model.

B. Verifier contract

constructor: contract constructor that initializes difficulty.
commitment: function that stores commitments in the contract.
getCommitment: function that fetches details of the requested commitment (onlyOwner).
getCommitmentsOfModel: function that fetches commitments of the requested model (onlyOwner).
getCommitmentsOfProver: function that fetches commitments of the requested prover.
updateChallenge: function that updates the value of challenge of commitment.
getDifficulty: function that fetches difficulty of challenge (onlyOwner).
updateDifficulty: function that updates difficulty of challenge (onlyOwner).
reveal: function that verifies the given Merkle proofs.

Implemented the following libraries.

Bytes: library of some bytes operations.
Challenge: library of challenge generation algorithm.
MerkleTree:  library of some Merkle tree operations.

📚 References

Solidity Factory Pattern
commit-reveal scheme
Merkle proof

test coverage
-----------------|----------|----------|----------|----------|----------------|
File             |  % Stmts | % Branch |  % Funcs |  % Lines |Uncovered Lines |
-----------------|----------|----------|----------|----------|----------------|
 src/            |      100 |      100 |    96.43 |      100 |                |
  IVerifier.sol  |      100 |      100 |      100 |      100 |                |
  Verifier.sol   |      100 |      100 |    96.43 |      100 |                |
 src/libraries/  |      100 |      100 |      100 |      100 |                |
  Bytes.sol      |      100 |      100 |      100 |      100 |                |
  Challenge.sol  |      100 |      100 |      100 |      100 |                |
  MerkleTree.sol |      100 |      100 |      100 |      100 |                |
-----------------|----------|----------|----------|----------|----------------|
All files        |      100 |      100 |    96.88 |      100 |                |
-----------------|----------|----------|----------|----------|----------------|

generate one verifier contract for one model using factory pattern

Done in 5f41476730294b2ed7ee5d832172aaf584bda9cf.


epic: native SN protocol integration

Feature Request
Describe the Feature Request
As we plan to eventually land on SN mainnet, we shall leverage the existing dapp as much as we can and help them create their EVM interface.
### Tasks
- [ ] Giza integration
- [ ] Herodotus integration
- [ ] https://github.com/kkrt-labs/kakarot/issues/1248
- [ ] Chainlink integration

for the record, since it's possible to make transaction to precompiles, we can leverage this to integrate any starknet app where instead of making the regular account.invoke(calls), they'd do something like evm_account.invoke({to: 0x75001, data:calls})
to enable muliticalls the same way, we could add a new precompile at with the exact same signature as the execute.
We would need to consider that EOA (account with no bytecode) are authorized caller


[SPARK-48036][DOCS] Update sql-ref-ansi-compliance.md and sql-ref-identifier.md

What changes were proposed in this pull request?
This PR aims to update sql-ref-ansi-compliance.md and sql-ref-identifier.md.
Why are the changes needed?

Since SPARK-44444, spark.sql.ansi.enabled is true.

46013

Apache Spark uses spark.sql.ansi.enforceReservedKeywords to enforce ANSI SQL reserved keywords instead of spark.sql.ansi.enabled.

Does this PR introduce any user-facing change?
No, this is only a documentation fix.
How was this patch tested?
Manual review.
Was this patch authored or co-authored using generative AI tooling?
No.

Could you review this documentation PR, @yaooqinn ?

LGTM, only content here might need further revison

Thank you so much, @yaooqinn !
I updated the PR according to your comments.

Thank you for helping me revise this doc, @yaooqinn !

I attached the screenshots too.
Merged to master~


where is the class DialogicPortrait ??

I'm trying to implement Custom Portraits,  a rigged and animated character, a character with a single body but many face variations, for that I found this tutorial https://github.com/coppolaemilio/dialogic/wiki/Tutorial:-Custom-Portraits the problem is that I cant find DialogicPortrait class inside the plugin, I'm using dialogic 1.5.
when I try to expand my character scene to DialogicPortrait as told in the tutorial  I get this error
Parser Error: Unknown class: "DialogicPortrait".
Is there a solution for what I'm trying to do?

The entire wiki is for dialogic 2. There is no DialogicPortrait class in 1.5.
I can't personally help you with 1.x questions. You can try asking on the dialogic-1 channel in emilios discord server.

thanks I will try that


[New game]: black cat lucky hunter

🎮 Game Request
Black cats bring bad luck! You have 30 seconds to smash the black cats as they appear on the screen.
Point down the features
Use the Q, W, E, A, S, D, Z, X, C keys to hit the cats in their respective holes.
Select program in which you are contributing
GSSoC23
Code of Conduct

[X] I follow CONTRIBUTING GUIDELINE of this project.

Hey @S-ishita !
Thank you for raising an issue 💗
You can self assign the issue by commenting /assign in comment 😀
Make sure you follow CODE OF CONDUCT and CONTRIBUTING GUIDELINES 🚀
Don’t Forget to ⭐ our GameZone🎮
Make sure you join our Discord🕹

Hey @S-ishita ! Thank you so much for your raising the issue💗
It’s all yours, you can come anytime again and make some contributions! 🚀
Alone, we can do little, but together we can do so much! 😇


Control goes to application when Notification Dialog is open

Bug Report
Description
When a notification dialog is opened, the control goes to the application while navigating through tabbing action instead of switching within the notification dialog. The application is responsive to tab action while the notification dialog is still open.
Refer this
Steps to Reproduce
Go to: Notification Dialog
In the ' Notification Dialog on Modal Manager' example, click Disclose> Trigger NotificationDialog.
Press Esc once and then the control goes out of Notification Dialogue Box while tabbing.
Additional Context / Screenshots

Expected Behavior
The control should stay within the Notification Dialog and should not go out of the Notification Dialog if esc is pressed.
Environment

Component Name: Notification Dialog(11.17.0 )
Browser Name and Version: Chrome/IE 11)

https://github.com/cerner/terra-framework/pull/683 solves this issue.


Added isNil() func, small improvements

This adds a utility method for checking if the Reply is of NilReply type. It also adds two small improvements suggested by the linter.

Hey esanac, I really appreciate the PR, unfortunately there's some problems. The biggest one is that this package isn't maintained anymore, save for bugs (but there haven't been any reported for a loooong time). The new iteration is at https://github.com/mediocregopher/radix.v2 and is the one that is still actively maintained and is having new features added to it.
The second problem is that I'm not sure about the function. In the new package there's an IsType function on the Resp, so the check would simply be r.IsType(redis.Nil), which isn't significantly more complicated than the Nil method. I'd rather err on the side of fewer functions and an easier to digest api.
I'm really sorry to shut you down like this, in the future you should consider opening an issue first so the maintainer can let you know their thoughts on what you want to do, and possibly save you some work. Please don't let this discourage you from submitting stuff in the future, your code was good and test cases are always welcome :P


Inconsistent Styling Selectors for Active Elements in tieredmenu when Customizing Themes

I've noticed a discrepancy in the CSS selectors for active elements within the tieredmenu component when using custom themes.
Steps to reproduce:

Configure a theme for tieredmenu.
Export the styles and compare the active element's CSS selectors.

Expected Behavior:
Using the default lara-light-blue theme as a reference, the selector should be:
.p-tieredmenu .p-menuitem.p-highlight > .p-menuitem-content

Observed Behavior:
The exported styles, however, use:
.p-tieredmenu .p-menuitem.p-menuitem-active > .p-menuitem-link

This inconsistency causes the highlighting on tieredmenus not to work as intended when customizing and importing themes based on lara-light-blue.
It's worth noting that the default lara-light-blue theme that ships with PrimeNG handles this correctly. The discrepancy arises when exporting a configured theme (even though you don't need to change any of the config) and re-importing this theme into a project.

Hi @Gykonik,
Thanks for reporting the issue! We'll discuss that with the team and decide what to do about it. For now, could you please provide some screenshots demonstrating the difference between the two themes so we can clearly see the issue.

Sure, the following example is from the Website

And this is the example taken from here. It's basically the same, except I've used a custom style. For the custom style, I directly exported Lara-Light from PrimeNGs Theme Designer without any modifications. The result is, that when you try to select items with the keyboard, they are not highlighted (even though I can properly tab, expand, collapse, etc.)
In the following image, the "File" is selected using the keyboard only, and no highlight is visible at all (unlike the example on the website where everything works as expected). So I'm pretty sure, the selectors are off in the "exported Theme".


fix(setup.sh): Enable LLVM tools installation on Ubuntu 24.04

Purpose of PR?:
Fixes #1755
LLVM tools are not installed successfully on Ubuntu 24.04 via sudo ./llvm.sh 14 because of no available release channel. They need to be installed via the llvm-14-tools package.
Does this PR introduce a breaking change?
No
If the changes in this PR are manually verified, list down the scenarios covered::
Additional information for reviewer? :
Mention if this PR is part of any design or a continuation of previous PRs
Checklist:

[x] Bug fix. Fixes #1755
[x] PR Title follows the convention of  <type>(<scope>): <subject>

@kranurag7 regarding the 2 point, we need gotip in arm64 case only?
Can you test this in an arm machine:
# install golang
echo "Installing golang binaries..."
arch=$(uname -m)
if [ "$arch" == "aarch64" ]; then
    arch="arm64"
elif [ "$arch" == "x86_64" ]; then
    arch="amd64"
else
    echo "Unsupported architecture: $arch"
    exit 1
fi

if command -v go &>/dev/null; then
    if [ "$arch" == "arm64" ]; then
        echo "Go is already installed on ARM architecture, setting up gotip..."
        go install golang.org/dl/gotip@latest
        gotip download
        echo "export PATH=\$PATH:\$HOME/sdk/gotip/bin" >> ~/.bashrc
        echo "export GOTOOLDIR=\$HOME/sdk/gotip/pkg/tool/linux_arm64" >> ~/.bashrc
        source ~/.bashrc
    else
        echo "Go is already installed."
    fi
else
    goBinary=$(curl -s https://go.dev/dl/ | grep "linux-$arch" | grep -Eo 'go[0-9.]+\.linux-'$arch'\.tar\.gz' | head -n 1)
    wget --quiet https://dl.google.com/go/$goBinary -O /tmp/build/$goBinary
    sudo tar -C /usr/local -xzf /tmp/build/$goBinary
fi

I have changed how goBinary gets computed as the earlier approach didn't work in case of arm64

When go is installed:
Details

# ./go.sh
+ echo 'Installing golang binaries...'
Installing golang binaries...
++ uname -m
+ arch=aarch64
+ '[' aarch64 == aarch64 ']'
+ arch=arm64
+ command -v go
+ '[' arm64 == arm64 ']'
+ echo 'Go is already installed on ARM architecture, setting up gotip...'
Go is already installed on ARM architecture, setting up gotip...
+ go install golang.org/dl/gotip@latest
go: downloading golang.org/dl v0.0.0-20240716205829-396652c1bbd0
+ gotip download
./go.sh: line 20: gotip: command not found
+ echo 'export PATH=$PATH:$HOME/sdk/gotip/bin'
+ echo 'export GOTOOLDIR=$HOME/sdk/gotip/pkg/tool/linux_arm64'
+ source /root/.bashrc
++ '[' -z '' ']'
++ return

When go is not installed:
Details

~ [2]# ./go.sh
+ echo 'Installing golang binaries...'
Installing golang binaries...
++ uname -m
+ arch=aarch64
+ '[' aarch64 == aarch64 ']'
+ arch=arm64
+ command -v go
++ curl -s https://go.dev/dl/
++ grep -Eo 'go[0-9.]+\.linux-arm64\.tar\.gz'
++ grep linux-arm64
++ head -n 1
+ goBinary=go1.22.5.linux-arm64.tar.gz
+ wget --quiet https://dl.google.com/go/go1.22.5.linux-arm64.tar.gz -O /tmp/build/go1.22.5.linux-arm64.tar.gz
/tmp/build/go1.22.5.linux-arm64.tar.gz: No such file or directory
+ sudo tar -C /usr/local -xzf /tmp/build/go1.22.5.linux-arm64.tar.gz
tar (child): /tmp/build/go1.22.5.linux-arm64.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

@navin772 I've not looked into the details here but this is the raw output, ping me if you need any help here.


When create event for 5 days Getting error

const [events,setEvents]= useState([
{
id: '1',
start: '2023-03-13T06:00:00Z',
end: '2023-03-17T07:00:00Z',
color:'red',
])
I am adding static dates 13-17 dates. But the event shows only 13,14,16 dates. not showing for the 15 and 17 dates. I have attached a screenshot for your reference.

@howljs Thank you


(gimp) Migrated to AU

Added update.ps1 script
Updated install script
Updated icon url
updated package source url

NOTE: Requires force push

Updated with the added comment

@AdmiringWorm thanks for doing this one! Have just pushed a new package fix notation version to Chocolatey.org.

@gep13 No problem, always happy to help out.

@gep13 btw, any reason you just didn't add [AU: gimp] to the commit message when you merged this pr?
Wouldn't that have forced pushing a new version?

It would have, but I pushed the big green button in the GitHub UI 😄

Ah, I thought you could change the merge message when you merge through github.
Maybe that's just when you rebase or squash then.

@AdmiringWorm if you can do that, I would love to know about it, but I don't think you can 😢

This is what I usually gets after I press the merge/rebase or squash button on pull requests in my repositories.

With the exception of Use your administrator privileges to merge this pull request when all required
tests has passed.
Maybe this has something to do with me using protected branches, and requiring an accepted review
before merging them

Just found out, it doesn't work when rebasing. Only ordinary merge and squash

Interesting, I have never seen that UI.  Would love to know how to enable that, as it would be really useful for the situation you mentioned above.

if it is dependent on protected branches, you can go into repository settings -> branches
and add the master branch to protected branches

I have that UI too.

@AdmiringWorm @majkinetor so you both get that UI when you click on the Merge Pull Request button?

@gep13 on my own repositories I do yes, except if I do a rebase instead of a merge.

@AdmiringWorm so is this all you have done:

Or other stuff also?
Would you still get that UI if there was already a completed review?

I have a few other checks that needs to pass before I merge, but that should suffice.
It all depends on your requirements for this repository

Note though, that an administrator of this repository can still merge without an approved review.
He just gets an checkbox he needs to tick before merging.

sorry, missed the last question. I do always get that ui, with the exception of the administration privileges
checkbox if all checks has passed and it has one approved review

@gep13 could you remove the requirement for requiring an approved review?
it prevents majkinetor from pushing directly to the master branch.
it also seems that the reason you're missing the ui, must be related to something else.

@AdmiringWorm @majkinetor removed the review required.


Implement an "English only" Tokenizer

Hi, tadashi
Thanks a lot for creating this plugin! It accelerates my input speed a lot, especially on mobile phone.
However, after a while, I find two inconveniences for me. I am using "default" tokenization strategy and I only need English word completion.  My note is like below
中文abcd
abc
$lmb

The two inconveniences are:

After typing "abc", plugin doesn't show completion because in the first line, chinese characters are combined with "abcd" as a single word.
After typing "lmb" (I define "lmb" to be "\mathbf{}" to quickly type latex equation on mobile), there are no completion since "$lmb" are considered as one word.

Both problems are due to that various-complement lacks an "English only" tokenization strategy.
I just read through the code and would like to add a new tokenizer. But I quickly find if we can expose TRIM_CHAR_PATTERN as a parameter, my problem can be perfectly solved. The TRIM_CHAR_PATTERN serves as a delimiter pattern to split words, so I just define it as "/^[a-zA-Z0-9_-]+$/", then "中文abcd" will be splitted to "中"、"文"、"abcd"，"$lmb" will be splitted to "$" and "lmb". It exactly matches my need.
I also suggest exposing the parameter as name "delimiter pattern" since it is more intuitive.
If exposing this parameter directly is too advanced for end users, we can expose an tokenization strategy "English only", which is in fact a DefaultTokenizer with TRIM_CHAR_PATTERN to be "/^[a-zA-Z0-9_-]+$/", exactly matches the regex used for "onlyComplementEnglishOnCurrentFileComplement" option.
Does the suggestion look good to you? I can submit a PR if you are fine with the change.
Thanks,
anselmwang

Hi, @anselmwang. Thank you for your excellent suggestion!
I am sure that your suggestion is the best workaround except for implementing each language tokenizer 😄

I also suggest exposing the parameter as name "delimiter pattern" since it is more intuitive. If exposing this parameter directly is too advanced for end users, we can expose an tokenization strategy "English only",

I like to add a new tokenizer, named EnglishOnlyTokenizer. As you said, TRIM_CHAR_PATTERN is too hard to explain for end users. There is no guarantee that it is a delimiter.

Does the suggestion look good to you? I can submit a PR if you are fine with the change.

Since I have changed my codebase and confirmed it as I expected, It's both OK.  Thanks!

Thanks @tadashi-aikawa for your quick response!
Since you already implement the feature, please go ahead.
Looking forward to the greater success of various-complements!

@anselmwang
I have released v5.6.0.beta2 🚀
If you use BRAT, please confirm whether it works as you expected.

I have created a new English-only tokenizer that is only changing TRIM_CHAR_PATTERN, but also tuning for analyzing the current input token :)

Thanks Tadashi, it works!

I have released v5.6.0 🚀
Many thanks!

Thanks a lot, I have upgraded to latest version!


Empty date

I'm importing a JSON feed into a section with a Date field and some of the dates are empty. Whether I set the value to null or '' today's date gets filled in. Is there a way to keep the field empty?

Not at the moment I'm afraid - FeedMe 2.0 will allow you to set field defaults. However, I do feel this goes against how its expected to work, so will mark this to be fixed.

Seconded. I have an events calendar where some items have a registration cutoff date, but only if registration is required. Therefore, most of my dates get returned as null.
I'm working around this by testing another field - if the registration link field is not empty - then posting the date. I won't always have the luxury of this kind of workaround, but I use this plugin on many of my client websites. It's uber helpful. :)

Field defaults have finally been added to Feed Me 2.


Cannot build R repo with repo2docker 2022.02.0

Bug description
It looks like that compiling a R environment with repo2docker 2022.02.0 is failing.
Former and expected behaviour
With repo2docker 2021.08.0:
$ jupyter-repo2docker --version
2021.08.0
$ jupyter-repo2docker https://github.com/plasmabio/template-r/
Picked Git content provider.
Clonage dans '/tmp/repo2docker42mzl1lz'...
remote: Enumerating objects: 11, done.
remote: Counting objects: 100% (11/11), done.
remote: Compressing objects: 100% (10/10), done.
remote: Total 11 (delta 0), reused 7 (delta 0), pack-reused 0
Dépaquetage des objets: 100% (11/11), 4.12 Kio | 602.00 Kio/s, fait.
Using CondaBuildPack builder
Step 1/65 : FROM buildpack-deps:bionic
 ---> 0dd28a87935f
[...]
    To access the notebook, open this file in a browser:
        file:///home/pierre/.local/share/jupyter/runtime/nbserver-515-open.html
    Or copy and paste this URL:
        http://<IP_ADDRESS>:52047/?token=0ae72921d81b6cfc932876b78a26b9a265b59d2a2a91c9e5

Everything is fine. Please note the repo https://github.com/plasmabio/template-r/ is a basic R environment we are using for our project Plasma for a couple of years now and it used to play nicely with repo2docker.
Actual behaviour
With repo2docker 2022.02.0:
$ jupyter-repo2docker --version
2022.02.0
$ jupyter-repo2docker https://github.com/plasmabio/template-r/
Picked Git content provider.
Clonage dans '/tmp/repo2docker7ko1gxnk'...
remote: Enumerating objects: 11, done.
remote: Counting objects: 100% (11/11), done.
remote: Compressing objects: 100% (10/10), done.
remote: Total 11 (delta 0), reused 7 (delta 0), pack-reused 0
Dépaquetage des objets: 100% (11/11), 4.12 Kio | 527.00 Kio/s, fait.
Traceback (most recent call last):
  File "/home/pierre/.soft/miniconda3/envs/repo2docker/lib/python3.9/site-packages/repo2docker/semver.py", line 42, in parse_version
    return semver.VersionInfo.parse(vstr)
  File "/home/pierre/.soft/miniconda3/envs/repo2docker/lib/python3.9/site-packages/semver.py", line 726, in parse
    raise ValueError("%s is not valid SemVer string" % version)
ValueError:  is not valid SemVer string

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/pierre/.soft/miniconda3/envs/repo2docker/bin/jupyter-repo2docker", line 8, in <module>
    sys.exit(main())
  File "/home/pierre/.soft/miniconda3/envs/repo2docker/lib/python3.9/site-packages/repo2docker/__main__.py", line 418, in main
    r2d.start()
  File "/home/pierre/.soft/miniconda3/envs/repo2docker/lib/python3.9/site-packages/repo2docker/app.py", line 830, in start
    self.build()
  File "/home/pierre/.soft/miniconda3/envs/repo2docker/lib/python3.9/site-packages/repo2docker/app.py", line 780, in build
    picked_buildpack.render(), extra=dict(phase="building")
  File "/home/pierre/.soft/miniconda3/envs/repo2docker/lib/python3.9/site-packages/repo2docker/buildpacks/base.py", line 478, in render
    for user, script in self.get_preassemble_scripts():
  File "/home/pierre/.soft/miniconda3/envs/repo2docker/lib/python3.9/site-packages/repo2docker/buildpacks/conda/__init__.py", line 401, in get_preassemble_scripts
    scripts.extend(self.get_env_scripts())
  File "/home/pierre/.soft/miniconda3/envs/repo2docker/lib/python3.9/site-packages/repo2docker/buildpacks/conda/__init__.py", line 373, in get_env_scripts
    scripts += rstudio_base_scripts(self.r_version)
  File "/home/pierre/.soft/miniconda3/envs/repo2docker/lib/python3.9/site-packages/repo2docker/buildpacks/_r_base.py", line 17, in rstudio_base_scripts
    if V(r_version) <= V("4.1"):
  File "/home/pierre/.soft/miniconda3/envs/repo2docker/lib/python3.9/site-packages/repo2docker/semver.py", line 48, in parse_version
    return semver.VersionInfo.parse(vstr)
  File "/home/pierre/.soft/miniconda3/envs/repo2docker/lib/python3.9/site-packages/semver.py", line 726, in parse
    raise ValueError("%s is not valid SemVer string" % version)
ValueError: .0.0 is not valid SemVer string

We obtain the exact same behaviour with mybinder:

Your personal set up

OS: Linux Ubuntu 20.04
Docker version: 20.10.14, build a224086
repo2docker version : 2022.02.0

This should've been fixed by https://github.com/jupyterhub/repo2docker/pull/1141.
Please can you try installing the main branch and tell us if the issue still occurs?

Thanks for your suggestion @manics. So I did:
$ python -m pip install git+https://github.com/jupyterhub/repo2docker
$ jupyter-repo2docker --version
2022.02.0+19.g1d218af
$ jupyter-repo2docker https://github.com/plasmabio/template-r/
Picked Git content provider.
Clonage dans '/tmp/repo2dockerjktt371q'...
remote: Enumerating objects: 11, done.
remote: Counting objects: 100% (11/11), done.
remote: Compressing objects: 100% (10/10), done.
remote: Total 11 (delta 0), reused 7 (delta 0), pack-reused 0
Dépaquetage des objets: 100% (11/11), 4.12 Kio | 602.00 Kio/s, fait.
Using CondaBuildPack builder
Step 1/64 : FROM buildpack-deps:bionic
 ---> 0dd28a87935f
[...]
    To access the notebook, open this file in a browser:
        file:///home/pierre/.local/share/jupyter/runtime/nbserver-521-open.html
    Or copy and paste this URL:
        http://<IP_ADDRESS>:48421/?token=e52c735fdb02cb0c880c522867e9a4f7067a8d30dc92cf80

And it worked fine :tada: Thank you very much for your help :pray: @manics
Do you have any idea when a new release of repo2docker that incorporates the fix https://github.com/jupyterhub/repo2docker/pull/1141 will be published?
I guess you can also close the present issue.


Try getting a sponsor from codesponsor.io so the devs can have some (well-deserved!) compensation

https://codesponsor.io
This has not been posted before.

I'm not sure how this would be integrated. RTD already serves ads on their own and also have the gold memberships.

I talk with Eric from CodeSponsor regularly and we are focused on figuring out the areas we can work together. Currently, however, we do run our own ads and that's what pays the bills (mostly devs).
I think this issue can be closed.

Thank you for the suggestion, @CrazyPython!


WIP

disable keys when payment fails
allow people to create new keys if previous payment fails ONLY if no outstanding balance

Can you split the formatting changes into their own PR?

If the user has an outstanding balance, do they have a way of paying it from our UI?


[Spotify Player] A command to play the AI DJ

Extension
https://www.raycast.com/mattisssa/spotify-player
Description
It could be great to be able to have a command to start the AI DJ.

Who will benefit from this feature?
Everyone
Anything else?
No response

I tried to do this, but unfortunately it doesn't seem like the spotify app likes doing this.
The URI for the DJ is spotify:playlist:37i9dQZF1EYkqdzj48dyYq , but doing a curl request like so:
curl --request PUT \
  --url https://api.spotify.com/v1/me/player/play \
  --header 'Authorization: Bearer D74...a04' \
  --header 'Content-Type: application/json' \
  --data '{
    "context_uri": "spotify:playlist:37i9dQZF1EYkqdzj48dyYq"
}'

doesn't seem to work.

Feel like this guy has the same issue https://community.spotify.com/t5/Spotify-for-Developers/What-Spotify-Web-API-does-the-DJ-button-use/td-p/5660189

Yup, I saw that post.


Test for unrecognized properties on QNode and QEdge

Currently, CAM-KP-API responds to unrecognized properties on QNode and QEdge by silently discarding them. However, TRAPI requires that "If a server receives a property on a QNode[/QEdge] that it does not recognize, it SHOULD generate a warning and MAY continue processing." (as per https://github.com/NCATSTranslator/ReasonerAPI/pull/322):
https://github.com/NCATSTranslator/ReasonerAPI/blob/1e0795a1c4ff5bcac3ccd5f188fdc09ec6bd27c3/ImplementationRules.md?plain=1#L50-L57
WIP: I've added a test for a log entry in the results, but haven't yet implemented the code.

Unfortunately, Circe doesn't seem to have a strict decoding mode built-in. So it looks like the two options for fixing this are:

When initially parsing the HTTP body, validate it against either a JSON schema or just navigate to the QNode and QEdge objects and then check to see if they have keys we don't recognize.
The Circe generic-extras package allows you to use a ConfiguredJsonCodec that allows you to turn strictDecoding on and has the code for decoding a JSON object strictly.

I'll try option 1, but only after I'm done with all the other TRAPI 1.3 changes.

If the goal is to produce log entries for these, RTX KG2 is a good example of a KG that produces log entries and responds correctly to this issue.


Rewrite with ES6(?)

@ChopperLee2011 Can you have a look and share your ideas about whether we should rewrite the thing with ES6? Please talk with @CCharlieLi directly and if you think we should please send this task to him (and give guidances as needed).

As @ChopperLee2011 suggested, no.


Add support for cluster workers

I moved the contents of index.js to app.js and let it export a server. in index.js it will start servers based on the CPU core count.


CurseForge and Modrinth files are different

I found that the CurseForge and Modrinth files are different. Why is that?

v1.1.1 on CurseForge - SHA256: 948FEBB6A5C9D0A6E67350ADC02A6D0C86E7E8B5ADDA8D763054799EB20C6A1B
v1.1.1 on Modrinth - SHA256: 3076E3D9BC522AD1C3FF0D65347247A5C375424F77A7CAC70949079F4A507A12

Only reason I could think that'd cause this is that I run the publishing tasks separately for modrinth and curse so it builds the jar once for each.
Making a single task should probably fix this but either way this really shouldn't be that important.

Thanks for the explanation.


feat(Popup): popup is now capable to detect overflow and re-adjust

Summary
Type

Enhancement

Popup Enhancement
Our home made popup is used by quite a lot of components (Tooltip, Popover, Menu), it works well but it was lacking some more smart behaviours. In fact the popup was quite often going out of screen. In the best case we have a scroll bar but in the worst you can't see half of the content.

Introducing: Smart Positionning ✨
A new function has been created getPopupOverflowFromParent(). This function has only one purpose, calculate how much the popup overflow from it's parent and so from screen. It is capable to calculate for any placements (top, bottom, right, left).
Thanks to this function we are now capable to re-adjust the position of the popup. We also re-adjust the position of the arrow on the popup to follow the dynamic position.
Here is the result:

No more overflow, no more hidden values, popup is now smarter! 🚀

j'ai une blague! j'ai une blague!
1+1 = toujours 2! C'est Matthoumatique!
🤣


Fix failed commands

Fixes #297
@jaivigneshvenugopal help me improve the behaviour of the first test in AddPictureCommandTest.java. Currently fails (as in does not throw exception) when AlicePauline.jpg is present.

Coverage decreased (-0.02%) to 90.56% when pulling 50ccdc96bc691c988f6e62e77a58afc791a36fb9 on khooroko:Fix_failed_commands into 9803354a3e93eacc854ca4a8da518f23a8d2b11f on CS2103AUG2017-T17-B1:master.


Convert complex PNG in a Blog Post from PPT/PNG to SVG with High Quality

This is a Bug Report

Problem:
The image files in  #38918 need to be converted to an SVG. Currently, they are PNG.
The originals are PPT files that can be found at https://github.com/kubernetes/website/pull/38918#issuecomment-1381981797
Earlier attempts to convert them to SVG resulted in poor-quality images.
Proposed Solution:
If anyone has the tools and expertise to convert the PNG/PPT to high-quality SVG that will look the same as the PNGs, we welcome the help.
Page to Update:
https://kubernetes.io/blog/2023/01/20/security-behavior-analysis/

/assign
If anyone gets to this first: great!

hey! looking to contribute to this project !..can I?

/triage accepted

I've made progress on this and hope to send in a PR later this week.


BUG - PROD kibana not showing rabbitmq messages

Describe the bug
When sending a message from traction, kibana doesnt show the message in its logs.
Not sure if UAT is or not

@harrietc52 @JamesGlover do we know if this is still relevant?


working on more tests

Pull Request Test Coverage Report for Build 374022864

0 of 0   changed or added relevant lines in 0 files are covered.
15 unchanged lines in 2 files lost coverage.
Overall coverage decreased (-2.9%) to 18.164%

Files with Coverage Reduction
New Missed Lines
%

src/extractor/extractSizes.ts
5
0%

src/extractor/extractRadii.ts
10
0%

Totals

Change from base Build 374019463:
-2.9%

Covered Lines:
53

Relevant Lines:
315

💛  - Coveralls


Prompt user with info about terminal config, add settings search by @id, and add sendToShell setting

Use @id: to search for one or more comma separated settings ids
Use keyboard shortcuts on the terminal corresponding to terminal.integrated.commandsToSkipShell commands and see an alert to configure terminal settings. Clicking Configure or Don't show again should result in never seeing the prompt again as the same user. Clicking the x on the prompt will show the prompt again the next time it's triggered.
Set terminal.integrated.sendToShell: true and use any key-bindings that trigger something to happen in the terminal. They should work and not be handled by the workbench. For example, Ctrl+E should jump to the end of the line instead of opening the quick pick.
You should still be able to use Ctrl+1-9 to navigate around the editor groups.

You don't have to keep merging master into your PR, unless there are conflicts to resolve or some new change that you want to base this on.

Built this and tried it out and I'm wondering, maybe I should only ever see this notification once. It's really easy to trigger, and my muscle memory is just to press escape when I want it to go away. Then I end up seeing it over and over.

@roblourens yes right now it only closes if you select a prompt choice. I can make it never show again if you close the prompt if that's how most of them work.


configuration for hop_size 256

when I configure factors for [4,4,4,2,2]   to match with hop_size=256 but I could not find  segment_length
Would you have idea  for exactly matching  segment_length  to match dilation, padding for the configuration?
I got error below  with segment_length=7200
Traceback (most recent call last):
  File "train.py", line 185, in <module>
    run(config, args)
  File "train.py", line 92, in run
    loss = model.compute_loss(mels, batch)
  File "/content/WaveGrad/model/diffusion_process.py", line 176, in compute_loss
    eps_recon = self.nn(mels, y_noisy, continuous_sqrt_alpha_cumprod)
  File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 722, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/content/WaveGrad/model/nn.py", line 119, in forward
    ublock_outputs = ublock(x=ublock_outputs, scale=scale, shift=shift)
  File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 722, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/content/WaveGrad/model/upsampling.py", line 82, in forward
    outputs = self.first_block_main_branch['modulation'](outputs, scale, shift)
  File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 722, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/content/WaveGrad/model/upsampling.py", line 30, in forward
    outputs = self.featurewise_affine(x, scale, shift)
  File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 722, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/content/WaveGrad/model/linear_modulation.py", line 98, in forward
    outputs = scale * x + shift
RuntimeError: The size of tensor a (450) must match the size of tensor b (448) at non-singleton dimension 2

full configuration
{
    "model_config": {
        "factors": [4,4,4,2,2],
        "upsampling_preconv_out_channels": 768,
        "upsampling_out_channels": [512, 512, 256, 128, 128],
        "upsampling_dilations": [
            [1, 2, 1, 2],
            [1, 2, 1, 2],
            [1, 2, 4, 8],
            [1, 2, 4, 8],
            [1, 2, 4, 8]
        ],
        "downsampling_preconv_out_channels": 32,
        "downsampling_out_channels": [128, 128, 256, 512],
        "downsampling_dilations": [
            [1, 2, 4], [1, 2, 4], [1, 2, 4], [1, 2, 4]
        ]
    },
    "data_config": {
        "sample_rate": 22050,
        "n_fft": 1024,
        "win_length": 1024,
        "hop_length": 256,
        "f_min": 0,
        "f_max": 8000,
        "n_mels": 80
    },

Segment length should match the condition 'segment length % hop_length == 0'. And 7200 doesn't match it. Try 7168, for example.

thanks for your confirm. train start well with hop_size=256 and  segment_size=7200  .

Oh, and what was the origin of your problem then?


[Question] Cookies options not clear to me

I don't understand how to handle cookies' properties (sameSite & secure) during development vs production
In production the fastify server is behind an nginx reverse proxy connected via HTTP, so I set secure true and SameSite None
But during development I don't use any proxy and connect directly with HTTP

You can set the cookie options based on the environment:
const cookieOptions = {
    secure: process.env.NODE_ENV === 'production',
    ...
}

Thanks for the response, that's a nice solution actually!
However, the real problem for me was http localhost development, which I guess can only be done in Firefox as of now (I mean, cross-site cookies, the rest works)
It looks to me that it is just a browser rule, so we just have to deal with it. Closing the issue now


Cannot access certain imports - Overriding components

What version of starlight are you using?
0.11.0
What version of astro are you using?
latest
What package manager are you using?
pnpm
What operating system are you using?
Linux
What browser are you using?
Firefox
Describe the Bug
Certain imports used by overridable components are not exported. utils is one I find I often need to access. Either because the builtin component uses it, or I need translation strings, etc.
List of missing exports I've noticed/needed so far.

utils
constants

Workaround
You can use a direct path to the node_modules folder to work around the missing exports.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-bd7al8?file=src%2FTest.astro
Participation

[x] I am willing to submit a pull request for this issue.

Adding to this, types are not exposed for the virtual module. The situation is a little different and will require documenting, but you can place this directive in your env.d.ts file to load types for the virtual modules. I feel this can be exposed via @astrojs/starlight/virtual or something like that, then we can document that you can add this to fix typescript.
/// <reference<EMAIL_ADDRESS>

Thanks for the issue @TheOtterlord! This is partly intentional, although we should still find a way to support what you need to do.
Basically one of the aims of my refactors in #709 was to move as much logic as possible up out of components so we can keep utils/ as internal implementation details, so they’re easy to change without breaking people’s sites.
Translation strings
The one thing I decided was out of scope there was the translation strings for a couple of reasons:

Time is limited, so I just decided to put off that work 😁
Our current useTranslations() system is very basic and not really a proper solution for generic i18n needs. We’ve spoken about replacing it with a more battle-tested solution like i18next. Exposing our existing functions only to later change them seemed a shame if avoidable. (More about why a more robust system may be needed in “Lessons From Linguistics: i18n Best Practices for Front-End Developers” on the Shopify blog.)

One interim solution I like the sound of more is just to pre-generate the strings as part of generateRouteData() so that component props include a labels object which can be accessed directly, something like:
- import { useTranslations } from '../utils/translations';
- const t = useTranslations(Astro.props.locale);
- const label = t('page.editLink');
+ const label = Astro.props.labels['page.editLink'];

This would hide our implementation methods in return for a data-only model until we have time to investigate the more complex option of a full i18n system.
Other utils
Were there other things you need from utils? I’d love to apply a similar logic as much as possible: we offer you the data you need in props without needing further methods.
Constants
Maybe we take a similar approach and expose constants on the route data objects as well to avoid documenting the extra export? I agree that it’s useful to have this exposed — I already had to use _top without the constant in a docs example.
Types
Yeah, I realised this late in the day too and after trying a few things couldn’t type these automatically for people. I don’t know if we WANT those exposed though either for the same reason that the virtual module imports are kind of internal. What are you using them for? Maybe there’s another way to make sure the same data is available.

Just posted #861 and saw right now that it shares some points with this feedback so I can answer for me regarding the last point.

What are you using them for? Maybe there’s another way to make sure the same data is available.

So far for me, accessing virtual:starlight/user-config has been used for:

Figuring out the default locale to format some dates/currencies
Generating entryMeta when creating new routes
Check if some features are disabled like editLink, etc.

Most of the time, requiring either utils or the virtual modules, it comes down to the existing implementation of a component that I copy into the new component. Sometimes some or all of these dependencies can be removed, but other times, I may only be overriding to add my own component, keeping the majority of the code the same.
I can replace certain component imports from a virtual module with the @astrojs/starlight/components/... import, but this would prevent any direct sub-components I've overridden from being included (e.g. I override PageSidebar and TableOfContents) requiring me to update those too (and depending on the scenario, still provide them as an override?).
pathWithBase is also used to override the SiteTitle link in the Astro docs. Maybe this is more of a niche scenario, but it's also something that could probably be exposed as a config option?
+1 on accessing the user config. This can be a really helpful module.

I think most of this has been addressed, so closing. We can open more specific issues if needed. Thanks again @TheOtterlord!

Heyhey,
can we please reopen this?
I tried to override/customize the Page component and it just doesnt work properly without the util exports... without generateStarlightPageRouteData from utils/starlight-page.ts, how should I have values for Astro.props.entry? Or do I miss something?
All the best,
Florian

Hi @fsmeier — <Page> is passed the route data as its props! No need to call it yourself, just read Astro.props.


regression curves for multiple series via data module

I am trying to get Loess regressions added for several series all imported via the data module (csvURL).  But for starters, getting the default working would be great. So in the chart, I have
data: {             csvURL: window.location.origin + '/file.csv'           },
That works fine for plotting and customizing all of the series included in that file.
         series: [{             marker: {               enabled: false,               symbol: 'circle'             }, {},{},etc. }],
But when I add the regression for any one or all of them, nothing happens.  All of the examples I found had the "data" attribute defined in the series object.  I was hoping that the regression function would inherit the appropriate data values for each series.  (I also tried adding the dummy "data:[]," in each series along with "regression:true," but that didn't change the outcome).
Is there a way to use the data module and apply regression curves to any/all of the series that were imported?
Thanks,
Brian

I left this go for a while, but would like to revisit it.  I messed around again without success.  Is there a way to use this handy regression tool in combination with the data object created by csvURL?  (my CSV file has a date column and 5 series columns, and I'd like to apply a Loess regression to 3 of the 5 series)


NormalizingMsisdnMiddleware breaks if the MSISDN is None.

2015-03-09 08:53:57+0000 Unhandled Error
        Traceback (most recent call last):
          File "/var/praekelt/vumi-go/ve/src/vumi/vumi/connectors.py", line 65, in handler
            return self._consume_message(mtype, msg)
          File "/var/praekelt/vumi-go/ve/src/vumi/vumi/connectors.py", line 89, in _consume_message
            d = self._middlewares.apply_consume(mtype, msg, self.name)
          File "/var/praekelt/vumi-go/ve/src/vumi/vumi/middleware/base.py", line 216, in apply_consume
            self.consume_middlewares, handler_name, message, connector_name)
          File "/var/praekelt/vumi-go/ve/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 1237, in unwindGenerator
            return _inlineCallbacks(None, gen, Deferred())
        --- <exception caught here> ---
          File "/var/praekelt/vumi-go/ve/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 1099, in _inlineCallbacks
            result = g.send(result)
          File "/var/praekelt/vumi-go/ve/src/vumi/vumi/middleware/base.py", line 206, in _handle
            message = yield handler(message, connector_name)
          File "/var/praekelt/vumi-go/ve/src/vumi/vumi/middleware/base.py", line 115, in handle_consume_outbound
            return self.handle_outbound(message, connector_name)
          File "/var/praekelt/vumi-go/go/vumitools/middleware.py", line 57, in handle_outbound
            country_code=self.country_code)
          File "/var/praekelt/vumi-go/ve/src/vumi/vumi/utils.py", line 192, in normalize_msisdn
            if len(raw) <= 5:
        exceptions.TypeError: object of type 'NoneType' has no len()

Ready for review.

Aside from the one question, looks good.

Ready for re-review.

:+1: when Travis is happy.


mobile sign up frame

created the mobile sign up frame, added the color style, added input fields, button, and all the necessary content.

https://www.figma.com/file/LEKdq0JqyuzzOGxv0tZWjh/WalletFriendly?node-id=1951%3A17647


Taking the first N bytes of a str that still make up valid UTF-8

In the past I've done stuff like &s[..max_len.min(s.len())] to truncate strings, but it turns out this is subtly broken (and will panic) for strings where max_len happens to be in the middle of a multibyte utf8-sequence (e.g. for the case !s.is_char_boundary(max_len)).
I've made a utility function for this (below), but it would be nice if a method on str existed for this case. In particular, I think the fact that the naive solution is broken on non-ASCII text makes it worthwhile, since developers are less likely to test on such text.
I have no opinions on its name (I'm genuinely terrible at names), nor on further extensions / variations or anything like that.
Anyway, below is the source for my version of it, provided mostly as to be completely clear on what I'm talking about. I think in practice this would go as a method on str and so would have a somewhat different implementation.
pub fn slice_up_to(s: &str, max_len: usize) -> &str {
    if max_len >= s.len() {
        return s;
    }
    let mut idx = max_len;
    while !s.is_char_boundary(idx) {
        idx -= 1;
    }
    &s[..idx]
}

This kinda feels a bit too niche to be in std rather than crates.io. In particular, why do you need this operation in the first place? Where does max_len come from? Do you really want up to some number of bytes, rather than characters? If the latter, given things like Unicode combining code points, what does "character" really mean in this context?

Also, such a function may not break the string on a meaningful boundary, such as between diacritical marks. Would be really weird for the substring to be missing a diacritic, and the rest to have an orphaned diacritic at the beginning.
If the concern is transmission/storage, UTF-8 is already well-equipped for processing as the bytes come, as the encoding has, in each byte, saying either that the byte is part of a codepoint, or tells exactly how many such after-beginning bytes are left before the codepoint can be resolved. Once a codepoint arrives and is consumed, further bytes will never invalidate it.

FWIW, i've also needed and written this function before.

At the very least, it should split at grapheme cluster boundaries. Unicode code point is not the same as visible character.

Presumably any time you need to fill a fixed size buffer with text, and either have no way to return the overflow, or simply don't want to have to preserve the encoder/decoder state when encoding/decoding across multiple buffers.

FWIW, str itself implements this to put some kind of simple limit on its panic message for slicing errors @ truncate_to_char_boundary.

Similar methods are being added in https://github.com/rust-lang/rust/pull/86497


Fix function reference

Not relevant after merge from @markFieldman
Thanks for this PR anyway!
https://www.youtube.com/watch?v=7lsdJDiJ0QE


Failed when connecting: Connection closed (code: 1000)

As per above screenshot I'm getting VNC Disconnected.
This is hosted on remote server using docker. This is "Docker in Docker implementation"
this is my docker-compose file
version: "3"
networks:
selenoid:
external:
name: selenoid
services:
selenoid:
networks:
selenoid: null
image: "aerokube/selenoid:latest-release"
restart: always
ports:
- "4444:4444"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- "$PWD/selenoidconfig:/etc/selenoid/:ro"
- $HOME/Projects/videos:/opt/selenoid/video
- "$PWD/logs:/opt/selenoid/logs"
environment:
- OVERRIDE_VIDEO_OUTPUT_DIR=$HOME/Projects/videos
command: ["-video-output-dir", "/opt/selenoid/video", "-log-output-dir", "/opt/selenoid/logs","-container-network", "selenoid","-timeout","8h","-service-startup-timeout","10m","-session-attempt-timeout","10m", ]
selenoid-ui:
networks:
selenoid: null
image: "aerokube/selenoid-ui"
restart: always
depends_on:
- selenoid
ports:
- "8081:8080"
command: ["--selenoid-uri", "http://selenoid:4444"]
I can't watch video live. But I can watch old videos when I clicked Videos link.
And I can see this console error -->  Failed when connecting: Connection closed (code: 1000) rfb.js:668
I managed to get below error from --> docker-compose logs --follow
[VNC ERROR] [dial tcp <IP_ADDRESS>:5900: connect: connection refused
I managed to catch some error outputs as well.
I can see below errors
`95439231.695][INFO]: Waiting for pending navigations...
[1595439231.695][DEBUG]: DevTools WebSocket Command: Runtime.evaluate (id=355) 907E8B9EDE154FC01AEB8BC2D449BDD9 {
"expression": "1"
}
[1595439231.695][DEBUG]: DevTools WebSocket Response: Runtime.evaluate (id=355) 907E8B9EDE154FC01AEB8BC2D449BDD9 {
"result": {
"description": "1",
"type": "number",
"value": 1
}
}
[1595439231.695][INFO]: Done waiting for pending navigations. Status: ok
[1595439231.695][INFO]: [5193d46ce8e3cb8ce787f4e283b3e674] RESPONSE ClickElement
--- x11vnc loop: waiting for: 413
error opening logfile: /home/selenium/x11vnc.log
open: Permission denied
--- x11vnc loop: sleeping 500 ms ---
--- x11vnc loop: 8 ---
[1595439232.699][INFO]: [5193d46ce8e3cb8ce787f4e283b3e674] COMMAND ExecuteAsyncScript {
"args": [ "" ],
"script": "try { return (function anonymous(\n) {\nfunction getNg1Hooks(selector, injectorPlease) {\n  function tryEl(el) {\n    try {\n      if (!injectorPlease && angular.getTestability) {\n        var $$testabil..."
}
[1595439232.699][DEBUG]: DevTools WebSocket Event: DOM.childNodeCountUpdated 907E8B9EDE154FC01AEB8BC2D449BDD9 {
"childNodeCount": 15,
"nodeId": 23
}
[1595439232.699][DEBUG]: DevTools WebSocket Event: DOM.attributeModified 907E8B9EDE154FC01AEB8BC2D449BDD9 {
"name": "class",
"nodeId": 23,
"value": " ng-scope "
}`

@godomainz are you using image with vnc prefix in browsers.json?

@vania-pooh yes. this is my browsers.json
        "default": "81.0",
        "versions": {
            "81.0": {
                "image": "selenoid/vnc:chrome_81.0",
                "port": "4444",
                "path": "/",
                "shmSize" :<PHONE_NUMBER>
            },
            "80.0": {
                "image": "selenoid/vnc:chrome_80.0",
                "port": "4444",
                "path": "/",
                "shmSize" :<PHONE_NUMBER>
            }
        }
    }
}

@godomainz could also be SELinux issue. If you are running everything under CentOS \ RedHat - try to disable SELinux.
error opening logfile: /home/selenium/x11vnc.log
open: Permission denied

Because of this permissions issue VNC server does not start.

@vania-pooh I'm running ubuntu 18.04
There is no Selinux installed.
I'm getting below error when I run sestatus command
-bash: sestatus: command not found
btw where is this /home/selenium/x11vnc.log mounted (I don't see that folder on my host)?
thats in the docker container right ?
So there shouldn't be any issue for the container right ?
I can see video when I'm running as root for the main docker host.
Should I give permissions for any special folder ?

@godomainz this file is being created inside container. Everything inside container is being run as user selenium.

@vania-pooh so why there is a permission issue ?
is it mounted to host ?

@godomainz File exists only inside container. Possible reasons are explained here: https://github.com/moby/moby/issues/1295#issuecomment-269058662

@vania-pooh thanks for your help. I removed the image. Then pulled it using normal user. I must have pulled the image using root. Now it works.


Bing Search API subscriptions will expire on 3/31/2017

I was going through Bing Search API and came across this notice at the top of the page which says Bing Search API will expire on 3/31/2017 and new subscriptions can be made by using Azure.com
We are using this for Media Library Web Search Import. Will it impact us and do we need to make any changes for this?
Snapshot of the Bing Search API page is attached here:

Duplicate of https://github.com/OrchardCMS/Orchard/issues/7118


Project Feedback!

 Congrats on completing the third project!
I have provided a detailed Project 3 Feedback Guide here which covers the most common issues with this submitted project. Read through the feedback guide point-by-point to determine how you could improve your submission.
Let us know if you have any other thoughts or questions about this assignment. Hopefully by now you feel pretty comfortable with all the major pieces to basic Android apps (Views, Controllers, Models, Authentication, API Communication, Preferences, ActionBar, et al) and see how they all fit together.

Hello! I received a 5 out of 7 on this assignment. Based on the rubric, I'm assuming I missed points because the gif didn't show the login process with oAuth. My emulator won't allow me to log in again because it remembers my account information. There's no way for me to demonstrate I completed that task.

 Congrats on completing the fourth project!
I have provided a detailed Project 4 Feedback Guide here which covers the most common issues with this submitted project. Read through the feedback guide point-by-point to determine how you could improve your submission.
Let us know if you have any other thoughts or questions about this assignment. Hopefully by now you feel pretty comfortable with all the major pieces to basic Android apps (Views, Controllers, Models, Authentication, API Communication, Preferences, ActionBar, et al) and see how they all fit together.
/cc @codepathreview


Add attribute for default.retries

There is no attribute to define retries parameter in default section. The default value, 3, is forced, and we do not want that.
This PR fixes this : https://github.com/hw-cookbooks/haproxy/pull/93
Can you please merge it?

looks to be merged, can we close this? @emexelem

Yep sure, thanks


Documentation doesn't list environment variables available for configuration

Issue description
The Configuration With Environment Variables section of the documentation page Advanced Usage of Pipenv doesn't appear to list all the available environment variables
Expected result
I expect variables such as PIPENV_SPINNER to be documented.
Actual result
Only PIPENV_HIDE_EMOJIS is documented, along with some functions.
Steps to replicate
n/a

Please run $ pipenv --support, and paste the results here. Don't put backticks (`) around it! The output already contains Markdown formatting.
n/a

Yes, that is true. We currently could use help here.

I can definitely fix this issue, assign it to me

Issue description
The Configuration With Environment Variables section of the documentation page Advanced Usage of Pipenv doesn't appear to list all the available environment variables
Expected result
I expect variables such as PIPENV_SPINNER to be documented.
Actual result
Only PIPENV_HIDE_EMOJIS is documented, along with some functions.
Steps to replicate
n/a
Please run $ pipenv --support, and paste the results here. Don't put backticks (`) around it! The output already contains Markdown formatting.
n/a

Issue description
The Configuration With Environment Variables section of the documentation page Advanced Usage of Pipenv doesn't appear to list all the available environment variables
Expected result
I expect variables such as PIPENV_SPINNER to be documented.
Actual result
Only PIPENV_HIDE_EMOJIS is documented, along with some functions.
Steps to replicate
n/a
Please run $ pipenv --support, and paste the results here. Don't put backticks (`) around it! The output already contains Markdown formatting.
n/a

so you want me to past the result in
pipenv/docs/advanced.rst
below or above the  PIPENV_HIDE_EMOJIS section.

I can definitely fix this issue, assign it to me

Guys I have submitted the pull request, everything is crisp and clear all system environment are listed