You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, there is a cache (in GitHubEnvironmentService.java) for 422 errors that don't retry to call Github for the last 1000 errors. When it happends, a standard error message is displayed.
It can create some issues:
deadlocks
_As the decision to call github or not is solely based on the entry, if the 422 problem is fixed on the Github repo side, the update on Github will still be blocked
_If there isn't a lot of new errors, github will never be called again
This can create a deadlock where a repo will never be updated while it could be
overflow
On the opposite side, if there is too many different errors sent, the Github API rate limit could be overflowed
To handle all this issues, i would suggest to:
_add a time system to the cache so we both don't overflow nor deadlock based on the amount of different errors happening
_when Github sends a 422 error, store the code sent by Github (list -> map) and add it in the standardized error message
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, there is a cache (in GitHubEnvironmentService.java) for 422 errors that don't retry to call Github for the last 1000 errors. When it happends, a standard error message is displayed.
It can create some issues:
deadlocks
_As the decision to call github or not is solely based on the entry, if the 422 problem is fixed on the Github repo side, the update on Github will still be blocked
_If there isn't a lot of new errors, github will never be called again
This can create a deadlock where a repo will never be updated while it could be
overflow
On the opposite side, if there is too many different errors sent, the Github API rate limit could be overflowed
lose of information
_the 422 errors from Github come with a code indicating what specific issue happened https://docs.github.com/en/rest/using-the-rest-api/troubleshooting-the-rest-api?apiVersion=2022-11-28#validation-failed
_this code is lost in the generic 422 - noretry - error message
_With logs rotation, in case of a deadlock, it becomes impossible to know the reason why Github sent a 422 (and so it becomes way harder to fix the issue).
To handle all this issues, i would suggest to:
_add a time system to the cache so we both don't overflow nor deadlock based on the amount of different errors happening
_when Github sends a 422 error, store the code sent by Github (list -> map) and add it in the standardized error message
What do you think about it ?
Beta Was this translation helpful? Give feedback.
All reactions