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 API functionality to query if a crate was published to completion #3677

Closed
sebschmi opened this issue Jun 3, 2021 · 1 comment
Closed

Comments

@sebschmi
Copy link

sebschmi commented Jun 3, 2021

Is your feature request related to a problem? Please describe.
This is motivated by this issue in cargo-release.

cargo-release allows automated publishing of a workspace, but it runs into problems where if two interdependent crates are published too short after each other, the publish might fail.

Say e.g. crate A is to be published with version 1.0.0 and crate B is to be published with 1.0.0 as well, where crate B depends on crate A, version 1.0.0.
If we simply run cargo publish for crate A first, and then immediately after the process terminates run cargo publish for crate B, then then the publish of B might fail because crate A does not exist yet with 1.0.0.

Describe the solution you'd like
Instead of repeatedly trying to publish crate B until it is successful, it would be nice to be able to query crates.io for whatever condition crate A needs to fulfil to have crate B published. Alternatively it would be nice to have the API call that does the publishing only return after crate A is completely published.

Describe alternatives you've considered
Waiting a fixed number of seconds between publishes: Sometimes crates.io takes longer than the constant, and then the second publish still fails. When setting the constant very large, it becomes tedious to wait for publishing a few crates.
Just retrying the publish: While that likely would work, it is not a very nice solution.

@Turbo87
Copy link
Member

Turbo87 commented Jun 3, 2021

this seems to be a duplicate of #3512

@Turbo87 Turbo87 closed this as completed Jun 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants