-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(install): improve reliability of latest version detection by using non rate limited api #2129
fix(install): improve reliability of latest version detection by using non rate limited api #2129
Conversation
…g non rate limited api Signed-off-by: Reuben Miller <reuben.d.miller@gmail.com>
Robot Results
Passed Tests
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM,
Why don't we use authenticated users for the GH installations?
Because we would have to inject the github token into the containers where the tests are running from...but using an authenticated api request does not make sense to for the install script anyway so there is no point adding it for a special cause for the integration tests. |
Proposed changes
Improve the get thin-edge.io install script to avoid rate limiting enforced by GitHub. Sometimes the install script was failing due to the latest version detection logic which relied on the
api.github.com
endpoint which has fairly low limits for unauthenticated requests.For example, if a user does too many requests, then the following response is returned by GitHub.
The error was mostly occurred in the integration test runs in GitHub as the rate limiting would be hit due to parallel workflow runs which are attributed to the same IP address.
Below shows the before and after the change.
Before
The requests are limited after about 60 attempts in a short period of time
Output
After
No rate limiting (or an at least the limit has not been found yet)
Output
#... success - attempt 116 success - attempt 117 success - attempt 118 success - attempt 119 success - attempt 120 success - attempt 121 success - attempt 122 success - attempt 123 success - attempt 124 success - attempt 125
Types of changes
Paste Link to the issue
Checklist
cargo fmt
as mentioned in CODING_GUIDELINEScargo clippy
as mentioned in CODING_GUIDELINESFurther comments