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

handle changed error responses from crates.io API #2370

Merged
merged 1 commit into from
Dec 29, 2023

Conversation

syphar
Copy link
Member

@syphar syphar commented Dec 28, 2023

Since Dec 18 we were seeing errors when parsing search responses from crates.io, deployed on the evening of Dec 16th:

error decoding response body: missing field crates at line 1 column 47

grafik

Some digging lead me to this crates.io change which changed the status code for errors, which lead to error_for_status not doing the early return.

@syphar syphar requested a review from a team as a code owner December 28, 2023 11:59
@github-actions github-actions bot added S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed labels Dec 28, 2023
@syphar
Copy link
Member Author

syphar commented Dec 28, 2023

fyi @Turbo87

@GuillaumeGomez
Copy link
Member

Some tests broke but other than that, looks good to me.

@Turbo87
Copy link
Member

Turbo87 commented Dec 28, 2023

sorry about that. it was ultimately a bug in crates.io that it did not comply with the interface description that cargo expects. it should hopefully be more consistent now, and once we switch the feature flag off there will be an official announcement blog post before we do so.

@syphar
Copy link
Member Author

syphar commented Dec 28, 2023

sorry about that. it was ultimately a bug in crates.io that it did not comply with the interface description that cargo expects. it should hopefully be more consistent now, and once we switch the feature flag off there will be an official announcement blog post before we do so.

no worries, it's also on me that I didn't check how cargo itself handles the responses & errors :)

@syphar
Copy link
Member Author

syphar commented Dec 28, 2023

Some tests broke but other than that, looks good to me.

@GuillaumeGomez
the test failure is unrelated, re-running fixed it (I'll dig into this separately, looks like a race condition between the tests when run in parallel).

@syphar syphar merged commit 14f8b62 into rust-lang:master Dec 29, 2023
12 checks passed
@syphar syphar deleted the crates-io-search-errors branch December 29, 2023 05:34
@github-actions github-actions bot added S-waiting-on-deploy This PR is ready to be merged, but is waiting for an admin to have time to deploy it and removed S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed labels Dec 29, 2023
@syphar syphar removed the S-waiting-on-deploy This PR is ready to be merged, but is waiting for an admin to have time to deploy it label Jan 3, 2024
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

Successfully merging this pull request may close these issues.

3 participants