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

Add documentation about the publishing rate limit #3229

Open
CPerezz opened this issue Feb 1, 2021 · 4 comments
Open

Add documentation about the publishing rate limit #3229

CPerezz opened this issue Feb 1, 2021 · 4 comments
Labels
C-documentation 📜 Category: Documentation of crates.io itself

Comments

@CPerezz
Copy link

CPerezz commented Feb 1, 2021

Yesterday I came across this issue in Cargo and I made a PR to improve the error message for the cases where the burst given to the publisher is not enough.

The only problem that we have in the PR to solve that is that, as @Eh2406 suggested, we should add a link in the error description so that the user can see some documentation/info about the publishing rate and then, slow down the publishing process or take any other actions.
The thing is that this info is only found either in the code(link I added above) or in the issues. See:

Therefore the idea was to add a link to a page like: https://crates.io/policies and add there some documentation about this rate (or at least a way to arrive to some documentation about it).

This might not be a big issue now (the burst set at 30 is more than enough for almost all of the cases IMO). But providing better error messages allows maybe to decrease this burst (and maybe the rate) when users publish entire workspaces since if they get the propper error they know they just need to wait a bit to publish the next crate.

This would help to close rust-lang/cargo#9119 which at the end solves the error reporting to users about the publishing rate limit.

Would it be ok to document it in https://crates.io/policies ? If so, where exactly?

@Eh2406
Copy link
Contributor

Eh2406 commented Feb 2, 2021

Looking at the code, it looks like it sets the retry_after field and then uses it in the response with a fairly reasonable explanation in the body. I wonder if Cargo needs to do anything at all to display a good error. It looks to me like #1643 should be closed, as Cargo will display the body in its normal error handling.

@CPerezz
Copy link
Author

CPerezz commented Feb 2, 2021

That's true, I didn't see it. Thanks @Eh2406 , And therefore, means that this can be closed too!

I'll make sure to forward your message there and once the issues are closed, I think we can close rust-lang/cargo#9119 and obviously this PR. The error that they add is inside the headers but we display them too. So this means we can close this too!

Thanks a lot for your time @Eh2406 .

Can someone close #1643 and then, and depending on wether the publishing rate should be documented somewhere or not, we can close this too 😃

@Turbo87
Copy link
Member

Turbo87 commented Feb 5, 2021

@CPerezz any reason for reopening this issue? did I understand correctly that this can be closed?

@CPerezz
Copy link
Author

CPerezz commented Feb 5, 2021

Hey. I left it since the issue aside from rise awanress of the rate limitation issues opened etc.. So that #1643 was closed.

Also awaiting for an answer on wether this should be documented in crates.io website.

If you consider it shouldn't, then feel free to close! 😃

@Turbo87 Turbo87 added C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works and removed C-feature-request labels Feb 11, 2021
@Turbo87 Turbo87 changed the title Add documentation about the rate publishing limit. Add documentation about the publishing rate limit Feb 14, 2021
@Turbo87 Turbo87 added C-documentation 📜 Category: Documentation of crates.io itself and removed C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works labels Mar 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-documentation 📜 Category: Documentation of crates.io itself
Projects
None yet
Development

No branches or pull requests

3 participants