Add documentation about the publishing rate limit
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:
- https://github.com/rust-lang/crates.io/issues/1643
- https://github.com/rust-lang/crates.io/pull/1596
- https://github.com/rust-lang/crates.io/pull/1644
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 https://github.com/rust-lang/cargo/pull/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?
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 https://github.com/rust-lang/crates.io/issues/1643 should be closed, as Cargo will display the body in its normal error handling.
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 :smiley:
@CPerezz any reason for reopening this issue? did I understand correctly that this can be closed?
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! :smiley: