cargo-release icon indicating copy to clipboard operation
cargo-release copied to clipboard

The tool attempts to release many crates too rapidly

Open ilyvion opened this issue 2 years ago • 9 comments

error: failed to publish to registry at https://crates.io

Caused by:
  the remote server responded with an error (status 429 Too Many Requests): You have published too many crates in a short period of time. Please try again after Thu, 30 Jun 2022 15:07:44 GMT or email [email protected] to have your limit increased.

ilyvion avatar Jun 30 '22 15:06 ilyvion

Huh, never ran across this. Out of curiosity, how many did you release?

Now to figure out what the rate limits are so we can stay inside of them ...

epage avatar Jun 30 '22 16:06 epage

It was 7 crates, that message came on the fifth one.

ilyvion avatar Jun 30 '22 17:06 ilyvion

Huh, I think I've exceeded that limit with clap.

epage avatar Jul 02 '22 02:07 epage

I sent an e-mail to [email protected] and got this response; maybe it can help you figure out how to rate limit appropriately:

The rate limit for creating new crates is 1 crate every 10 minutes, with a burst of 5 crates.

The rate limit for new versions of existing crates is 1 per minute, with a burst of 30 crates, so when releasing new versions of these crates, you shouldn't hit the limit.

It's not particularly secret, we just don't publish it other than in the code because it's subject to change. The responses from the rate limited requests on when to try again contain the most accurate information.

ilyvion avatar Jul 03 '22 08:07 ilyvion

@alexschrod were you releasing new crates?

epage avatar Jul 05 '22 14:07 epage

@epage Yeah.

ilyvion avatar Jul 06 '22 06:07 ilyvion

We need to tread carefully with this so people don't just ctrl-c cargo-release and end up in a similar situation

epage avatar Jul 11 '22 20:07 epage

I intended to release all these crates (the workspace is 7 separate crates that go together), but I wasn't aware of the low burst limit until I first tried running this tool. Mostly because I'm lazy and didn't want to have to manually run cargo publish 7 times. As evidenced by the response I got, I will not be having this issue when doing new releases, since the burst for that is 30 rather than 5.

ilyvion avatar Jul 13 '22 09:07 ilyvion

Yes, this is more of a concern for the initial release, so it can be worked around which lowers its priority.

epage avatar Jul 13 '22 13:07 epage

In considering this, I feel like the needed sleep times would be unacceptable for a user to sit at the program waiting, so I'm just adding an error check for this situation. We can further refine this over time.

epage avatar Oct 14 '22 20:10 epage