PublishNew was allowing 1 new crate an hour rather than every 10 minutes #6961
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.
In #6875, @pietroalbini said:
but the code didn't match that intention, which explains why we were getting so many emails asking for rate limit increases since that PR went out.
The problem was that the
default_rate_seconds
forPublishNew
was set to60 * 60
, aka 1 hour, when the intention was that it would be set to10 * 60
, or 10 minutes.I added a new test, and for
PublishNew
it fails with:because the
last_refill
times get set to the time at which you're publishing if you're not rate limited.The CI run for the first commit shows the failure, then the second commit shows the test passing (modulo the flaky test).