flex
flex copied to clipboard
What happens when Github API rate limit is reached while updating recipes?
Hello,
I have a few questions about the composer recipes:update command. Let me know if i'm on the wrong repo for these questions, I hesitated with symfony/recipes.
What happens to the recipe when running composer update:recipe user/project and Github API rate limit is reached?
I see some changes in the repo, so I guess at least part of the recipe is applied, but I have no clue if the recipe is totally applied and the only part failing is about changelog and issues so I can still continue to work?
Also, why does using --quiet still fails if the calls are only related to changelogs and general information?
Last time I hit the limit was while calculating a recipe's changelog.
You need to use composer with an auth token to have a reasonably high hit limit. For the update command, we use a not-rate-limited endpoint to access the JSONs for public recipes. Of course, that doesn't fully answer your question. I just don't have the answer because I never hit it. Note that computing the changelog consumes way more rate limiting tokens. I'm closing because this is not actionable. But please let us know if you manage to answer your question. Eg maybe start with hitting the limit by calculating a recipe's changelog, then run the update command in the same row?
Well, the limit was reached during an upgrade process: update dependencies then apply new recipes, multiple time (I was in the process of upgrading from Symfony 3.x to 4.4). The limit was reached even with a valid token.
When applying recipes, it states that the recipe was successfully applied before the token issue, so I guess the API calls are mainly to fetch changelogs. This answers to the question about the recipe being applied or not.
As the limit is clearly annoying, there still may be something to do when running with the --quiet flag.
Would you be able to investigate this for a fix?
Sadly, no. That being said, I'll dig a bit in the code in the next days.
This happens when you're doing a BIG recipe update. But, it's harmless: the CHANGELOG fails to render, but the recipe IS successfully applied.
Unfortunately, iirc, I couldn't find a hook in Composer that would allow me to "catch" the final error and tell the user that it's ok. I'm open to suggestions - e.g. we could print out a:
Recipe successfully applied
message before we generate the CHANGELOG.
Well, it's been two months now and I still don't have time to check for the changes being pulled with --quiet flag... Thanks for the explanations, I'm closing this.