Make release script more robust and send user agent - #577
Merged
Conversation
The data access policy of crates.io requires a `user-agent` header that identifies the application. Otherwise it may block the request, which we saw in previous runs. See https://crates.io/data-access for details. This commit adds the required user-agent header and also fixes a related bug that misclassified the error response as 'release does not exist yet'. We now only create a new release if we're sure that the release does not exist yet. Errors are raised and fail the CI job so that we can investigate them.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The data access policy of crates.io requires a
user-agentheader that identifies the application. Otherwise it may block the request. See https://crates.io/data-access for details.This commit adds the required user-agent header and also fixes a related bug that misclassified the error response as 'release does not exist yet'. We now only create a new release if we're sure that the release does not exist yet. Errors are raised and fail the CI job so that we can investigate them.
Discovered in https://github.com/rust-osdev/bootloader/actions/runs/30249893235/job/89925267279
The API returned an error here and the script misclassified it as 'no release exists' and tried to publish.