add crates release - #250
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #250 +/- ##
=======================================
Coverage 86.35% 86.35%
=======================================
Files 34 34
Lines 9422 9422
Branches 9422 9422
=======================================
Hits 8136 8136
Misses 1153 1153
Partials 133 133 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Claude finished @simonmarty's task in 1m 57s —— View job Code Review:
|
|
Claude finished @simonmarty's task in 58s —— View job Code Review:
|
i-am-SR
left a comment
There was a problem hiding this comment.
The following seem worth addressing and easy fixes:
1. **Idempotency check treats every non-200 as "not published."** A transient `429`/`5xx` from the crates.io API falls through to `cargo publish`. Consider gating the skip decision specifically on `404`, so a flaky API response fails loudly instead of attempting a publish: ```shell if [[ "$http_code" == "200" ]]; then echo "$crate@$version already published — skipping" elif [[ "$http_code" == "404" ]]; then cargo publish -p "$crate" else echo "unexpected HTTP $http_code from crates.io for $crate@$version" >&2 exit 1 fi ``` [Fix this →](https://claude.ai/code?q=In%20.github%2Fworkflows%2Fpublish-crates.yml%20on%20branch%20add-crates-release%2C%20the%20idempotency%20check%20in%20the%20%22Publish%20crates%22%20step%20treats%20any%20non-200%20HTTP%20code%20as%20%22not%20published%22.%20Change%20it%20so%20only%20404%20triggers%20cargo%20publish%2C%20200%20skips%2C%20and%20any%20other%20code%20fails%20the%20step%20with%20an%20error%20message.&repo=aws/aws-workload-credentials-provider) 2. **No `concurrency` group.** Two overlapping runs (e.g. a manual `workflow_dispatch` during a release) could race on the same version. Adding `concurrency: { group: publish-crates, cancel-in-progress: false }` is cheap insurance.
|
Claude finished @simonmarty's task in 35s —— View job Code Review:
|
|
|
Claude encountered an error after 3m 26s —— View job I'll analyze this and get back to you. |
Description
Why is this change being made?
What is changing?
Related Links
Testing
How was this tested?
When testing locally, provide testing artifact(s):
Reviewee Checklist
Update the checklist after submitting the PR
If not, why:
If not, why:
If not, why:
If not, why:
If not, why:
If not, why:
If not, why:
If not, why:
If not, why:
If not, why:
Reviewer Checklist
All reviewers please ensure the following are true before reviewing:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.