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

Fix wait-for-publish with sparse registry #11356

Merged
merged 1 commit into from
Nov 10, 2022
Merged

Conversation

arlosi
Copy link
Contributor

@arlosi arlosi commented Nov 9, 2022

The wait-for-publish feature doesn't work when publishing a new version of an existing crate on a sparse registry.

The invalidate_cache method doesn't clear the fresh list, so repeated requests just use the in-memory data if it's available. This didn't show up in the tests, because the test only simulated the not found to crate available transition, rather than the old file to crate available transition.

This change modifies the test by capturing the publish request, then deferring it until after later request for the index file.

r? @epage

Fixes #11314

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 9, 2022
@arlosi
Copy link
Contributor Author

arlosi commented Nov 9, 2022

Additionally, the progress looks a little bit odd, where the number of "27 complete" represents how many times we've polled. Probably a separate issue though.
27

@epage
Copy link
Contributor

epage commented Nov 9, 2022

I wonder if this is the root cause for #11314.

@arlosi
Copy link
Contributor Author

arlosi commented Nov 9, 2022

I wonder if this is the root cause for #11314.

Seems extremely likely. I'll update the description.

@epage
Copy link
Contributor

epage commented Nov 9, 2022

@bors r+

@bors
Copy link
Contributor

bors commented Nov 9, 2022

📌 Commit 90c6b58 has been approved by epage

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 9, 2022
@bors
Copy link
Contributor

bors commented Nov 9, 2022

⌛ Testing commit 90c6b58 with merge 0756938...

@bors
Copy link
Contributor

bors commented Nov 10, 2022

☀️ Test successful - checks-actions
Approved by: epage
Pushing 0756938 to master...

@bors bors merged commit 0756938 into rust-lang:master Nov 10, 2022
@epage
Copy link
Contributor

epage commented Nov 10, 2022

@arlosi could you backport this to the rust-1.66.0 branch so people don't hit this when testing sparse registry?

bors added a commit that referenced this pull request Nov 10, 2022
[BETA-1.66] Fix wait-for-publish with sparse registry

Beta backport of #11356

r? `@epage`
Manishearth pushed a commit to Manishearth/rust that referenced this pull request Nov 11, 2022
9 commits in 9286a1beba5b28b115bad67de2ae91fb1c61eb0b..a3dfea71ca0c888a88111086898aa833c291d497
2022-11-04 06:41:49 +0000 to 2022-11-11 03:50:47 +0000
- fix: return non UTF-8 error message (rust-lang/cargo#11321)
- Extract `two_kinds_of_msg_format_err` message to de-duplicate it (rust-lang/cargo#11358)
- Propagate change of artifact bin dep to its parent fingerprint (rust-lang/cargo#11353)
- Fix not a hyperlink warnings (rust-lang/cargo#11357)
- Fix wait-for-publish with sparse registry (rust-lang/cargo#11356)
- Add `rm` alias to configuration docs (rust-lang/cargo#11351)
- Add `registries.crates-io.protocol` docs (rust-lang/cargo#11350)
- test(features2): test to prevent regressing of optional host deps of dep (rust-lang/cargo#11342)
- Bump to 0.68.0, update changelog (rust-lang/cargo#11340)
Manishearth added a commit to Manishearth/rust that referenced this pull request Nov 11, 2022
Update cargo

9 commits in 9286a1beba5b28b115bad67de2ae91fb1c61eb0b..a3dfea71ca0c888a88111086898aa833c291d497 2022-11-04 06:41:49 +0000 to 2022-11-11 03:50:47 +0000
- fix: return non UTF-8 error message (rust-lang/cargo#11321)
- Extract `two_kinds_of_msg_format_err` message to de-duplicate it (rust-lang/cargo#11358)
- Propagate change of artifact bin dep to its parent fingerprint (rust-lang/cargo#11353)
- Fix not a hyperlink warnings (rust-lang/cargo#11357)
- Fix wait-for-publish with sparse registry (rust-lang/cargo#11356)
- Add `rm` alias to configuration docs (rust-lang/cargo#11351)
- Add `registries.crates-io.protocol` docs (rust-lang/cargo#11350)
- test(features2): test to prevent regressing of optional host deps of dep (rust-lang/cargo#11342)
- Bump to 0.68.0, update changelog (rust-lang/cargo#11340)

r? `@ghost`
Manishearth added a commit to Manishearth/rust that referenced this pull request Nov 11, 2022
Update cargo

9 commits in 9286a1beba5b28b115bad67de2ae91fb1c61eb0b..a3dfea71ca0c888a88111086898aa833c291d497 2022-11-04 06:41:49 +0000 to 2022-11-11 03:50:47 +0000
- fix: return non UTF-8 error message (rust-lang/cargo#11321)
- Extract `two_kinds_of_msg_format_err` message to de-duplicate it (rust-lang/cargo#11358)
- Propagate change of artifact bin dep to its parent fingerprint (rust-lang/cargo#11353)
- Fix not a hyperlink warnings (rust-lang/cargo#11357)
- Fix wait-for-publish with sparse registry (rust-lang/cargo#11356)
- Add `rm` alias to configuration docs (rust-lang/cargo#11351)
- Add `registries.crates-io.protocol` docs (rust-lang/cargo#11350)
- test(features2): test to prevent regressing of optional host deps of dep (rust-lang/cargo#11342)
- Bump to 0.68.0, update changelog (rust-lang/cargo#11340)

r? ``@ghost``
Manishearth added a commit to Manishearth/rust that referenced this pull request Nov 11, 2022
Update cargo

9 commits in 9286a1beba5b28b115bad67de2ae91fb1c61eb0b..a3dfea71ca0c888a88111086898aa833c291d497 2022-11-04 06:41:49 +0000 to 2022-11-11 03:50:47 +0000
- fix: return non UTF-8 error message (rust-lang/cargo#11321)
- Extract `two_kinds_of_msg_format_err` message to de-duplicate it (rust-lang/cargo#11358)
- Propagate change of artifact bin dep to its parent fingerprint (rust-lang/cargo#11353)
- Fix not a hyperlink warnings (rust-lang/cargo#11357)
- Fix wait-for-publish with sparse registry (rust-lang/cargo#11356)
- Add `rm` alias to configuration docs (rust-lang/cargo#11351)
- Add `registries.crates-io.protocol` docs (rust-lang/cargo#11350)
- test(features2): test to prevent regressing of optional host deps of dep (rust-lang/cargo#11342)
- Bump to 0.68.0, update changelog (rust-lang/cargo#11340)

r? ```@ghost```
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Nov 12, 2022
Update cargo

9 commits in 9286a1beba5b28b115bad67de2ae91fb1c61eb0b..a3dfea71ca0c888a88111086898aa833c291d497 2022-11-04 06:41:49 +0000 to 2022-11-11 03:50:47 +0000
- fix: return non UTF-8 error message (rust-lang/cargo#11321)
- Extract `two_kinds_of_msg_format_err` message to de-duplicate it (rust-lang/cargo#11358)
- Propagate change of artifact bin dep to its parent fingerprint (rust-lang/cargo#11353)
- Fix not a hyperlink warnings (rust-lang/cargo#11357)
- Fix wait-for-publish with sparse registry (rust-lang/cargo#11356)
- Add `rm` alias to configuration docs (rust-lang/cargo#11351)
- Add `registries.crates-io.protocol` docs (rust-lang/cargo#11350)
- test(features2): test to prevent regressing of optional host deps of dep (rust-lang/cargo#11342)
- Bump to 0.68.0, update changelog (rust-lang/cargo#11340)

r? ````@ghost````
@ehuss ehuss added this to the 1.67.0 milestone Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cargo publish times out waiting for crate to be in index with sparse-registry with JFrog
5 participants