-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
publish-timeout not receiving updated index #11253
Comments
Something seems to be short circuiting. For a couple iterations, the index update puts the source back in
Going to keep looking. |
Confirmed there is a cache somewhere causing problems by re-loading the source inside the loop. |
So We are calling But nothing sets needs_update: bool, // Does this registry need to be updated?
updated: bool, // Has this registry been updated this session? If we are only allowed to update once per session, then what is the point of |
You should be okay with removing the Maybe we should completely remove the Calling |
fix(publish): Check remote git registry more than once post-publish With `publish-timeout` on remote git registries, we were checking once and never checking again. There were 3 layers of guards preventing the cache from being updating - `needs_update`, handled via `invalidate_cache` - `config.updated_sources()`,. handled by removing from the HashSet - `updated`, inaccessible This change collapses `updated` into `config.updated_sources()`, allowing the cache to be updated Tested by publishing `epage-publish-test`. After about 7 registry updates, it succeded. Before, it just hit the timeout of 60s. No tests are added as we don't have the plumbing setup to be able to control when the test remote git registry publishes. All of our tests focus on the remote http registry. Fixes #11253
Problem
I'm trying to test out the publish timeout, and I can't seem to get it to work. I'm running the command:
CARGO_PUBLISH_TIMEOUT=60 cargo publish -Zpublish-timeout
It waits for 60 seconds, and then prints the warning:
Steps
CARGO_PUBLISH_TIMEOUT=60 cargo publish -Zpublish-timeout
Possible Solution(s)
No response
Notes
I did some basic instrumenting, and it doesn't look like cargo is reaching the network to update the index (
CARGO_HTTP_DEBUG
).I also monitored the GitHub index, and the package is showing up within a few seconds.
Version
Tried latest nightly
cargo 1.66.0-nightly (b332991a5 2022-10-13)
and latest master 3ff0443.The text was updated successfully, but these errors were encountered: