fix: build tag rate limit issues #224
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The build-images GH action is sometimes failing to fetch repo latest tags. Adding some debug prints showed it was getting rate limited. GH rate limits by IP for unauthenticated requests. Fix by using GH token to fetch the tag.
I did not want to pass the token itself as it seems insecure, so passing tag payload mkosi variable. Alternate solution could be to introduce some waits, but according to API unauthenticated requests are 60/hour... https://docs.github.com/en/rest/using-the-rest-api/rate-limits-for-the-rest-api?apiVersion=2022-11-28
Not sure why downloading the release assets doesn't appear to be hitting this limit, but in the meantime I've run the entire build 3 times and haven't seen failures so far.