Skip to content
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

The tool attempts to release many crates too rapidly #483

Closed
ilyvion opened this issue Jun 30, 2022 · 10 comments · Fixed by #545
Closed

The tool attempts to release many crates too rapidly #483

ilyvion opened this issue Jun 30, 2022 · 10 comments · Fixed by #545
Labels
bug Not as expected

Comments

@ilyvion
Copy link

ilyvion commented Jun 30, 2022

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.
@epage
Copy link
Collaborator

epage commented Jun 30, 2022

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 epage added the bug Not as expected label Jun 30, 2022
@ilyvion
Copy link
Author

ilyvion commented Jun 30, 2022

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

@epage
Copy link
Collaborator

epage commented Jul 2, 2022

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

@ilyvion
Copy link
Author

ilyvion commented Jul 3, 2022

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.

@epage
Copy link
Collaborator

epage commented Jul 5, 2022

@alexschrod were you releasing new crates?

@ilyvion
Copy link
Author

ilyvion commented Jul 6, 2022

@epage Yeah.

@epage
Copy link
Collaborator

epage commented Jul 11, 2022

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

@ilyvion
Copy link
Author

ilyvion commented Jul 13, 2022

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.

@epage
Copy link
Collaborator

epage commented Jul 13, 2022

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

epage added a commit to epage/cargo-release that referenced this issue Oct 14, 2022
Not thrilled with erroring but putting in a sleep for 10 minutes would
probably make people unhappy.  We can always refine this further.

Fixes crate-ci#483
@epage
Copy link
Collaborator

epage commented Oct 14, 2022

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 added a commit to epage/cargo-release that referenced this issue Oct 14, 2022
Not thrilled with erroring but putting in a sleep for 10 minutes would
probably make people unhappy.  We can always refine this further.

Fixes crate-ci#483
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Not as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants