-
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
Add retry support to sparse registries #11069
Conversation
r? @epage (rust-highfive has picked a reviewer for you, use r? to override) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've taken a look and it seems good but I would want @Eh2406 to take a look as I assume they have more recently reviewed this area of code.
r? @Eh2406 |
☔ The latest upstream changes (presumably #11068) made this pull request unmergeable. Please resolve the merge conflicts. |
Had some time to look this over and it looks good to me. Ed has some good questions about nomenclature. Is there some way we can add tests? Perhaps a setup like #11062 where the server takes a few tries to give a 200. |
I pulled in the test framework changes from #11062 and added a test. |
pub fn truncate_with_ellipsis(s: &str, max_width: usize) -> String { | ||
// We should truncate at grapheme-boundary and compute character-widths, | ||
// yet the dependencies on unicode-segmentation and unicode-width are | ||
// not worth it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unicode-width
is already a dependency, maybe we should open an issue asking for this function to be updated to use it.
@bors r+ |
☀️ Test successful - checks-actions |
9 commits in 3cdf1ab25dc4fe56f890e8c7330d53a23ad905d3..b8f30cb23c4e5f20854a4f683325782b7cff9837 2022-10-07 17:34:03 +0000 to 2022-10-10 19:16:06 +0000 - Add more doc comments for three modules (rust-lang/cargo#11207) - docs: fix (rust-lang/cargo#11208) - Add completions for `cargo remove` (rust-lang/cargo#11204) - Config file loaded via CLI takes priority over env vars (rust-lang/cargo#11077) - Use `#[default]` when possible (rust-lang/cargo#11197) - Implement RFC 3289: source replacement ambiguity (rust-lang/cargo#10907) - Use correct version of cargo in test (rust-lang/cargo#11193) - Check empty input for login (rust-lang/cargo#11145) - Add retry support to sparse registries (rust-lang/cargo#11069)
Update cargo 9 commits in 3cdf1ab25dc4fe56f890e8c7330d53a23ad905d3..b8f30cb23c4e5f20854a4f683325782b7cff9837 2022-10-07 17:34:03 +0000 to 2022-10-10 19:16:06 +0000 - Add more doc comments for three modules (rust-lang/cargo#11207) - docs: fix (rust-lang/cargo#11208) - Add completions for `cargo remove` (rust-lang/cargo#11204) - Config file loaded via CLI takes priority over env vars (rust-lang/cargo#11077) - Use `#[default]` when possible (rust-lang/cargo#11197) - Implement RFC 3289: source replacement ambiguity (rust-lang/cargo#10907) - Use correct version of cargo in test (rust-lang/cargo#11193) - Check empty input for login (rust-lang/cargo#11145) - Add retry support to sparse registries (rust-lang/cargo#11069)
Sparse (HTTP) registries currently do not respect Cargo's retry policy for http requests.
This change makes sparse registries use the same retry system as package downloads.