fix(ci): replace deprecated R2 uploader - #2009
Open
eoinest wants to merge 1 commit into
Open
Conversation
Contributor
size-limit report 📦
|
Comment on lines
+63
to
+66
| aws s3 cp "$SOURCE_DIR" "$target" \ | ||
| --recursive \ | ||
| --endpoint-url "https://${R2_ACCOUNT_ID}.r2.cloudflarestorage.com" \ | ||
| --no-progress |
Contributor
There was a problem hiding this comment.
latest prefix retains removed-platform binaries
aws s3 cp --recursive only adds/overwrites objects; it has no --delete equivalent (that flag belongs to aws s3 sync). If a future release drops support for a platform, the stale binary will remain in the cli/latest and gtx-cli/latest prefixes indefinitely. Using aws s3 sync --delete for the latest destination uploads (not the versioned ones) would keep that prefix clean and exactly matching the current release.
Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/actions/r2-upload/action.yml
Line: 63-66
Comment:
**`latest` prefix retains removed-platform binaries**
`aws s3 cp --recursive` only adds/overwrites objects; it has no `--delete` equivalent (that flag belongs to `aws s3 sync`). If a future release drops support for a platform, the stale binary will remain in the `cli/latest` and `gtx-cli/latest` prefixes indefinitely. Using `aws s3 sync --delete` for the `latest` destination uploads (not the versioned ones) would keep that prefix clean and exactly matching the current release.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
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.
Summary
Testing
pnpm exec oxfmt --check .github/actions/r2-upload/action.yml .github/workflows/asset-upload.yml .github/workflows/release.yml— passedactionlint .github/workflows/asset-upload.yml .github/workflows/release.yml— passed with actionlint v1.7.12Notes
Greptile Summary
This PR replaces the third-party
ryand56/r2-upload-action@v1.4with a repository-local composite action that drives the AWS CLI directly, gaining standard retry logic and automatic multipart support for large binary uploads..github/actions/r2-upload/action.yml): accepts six inputs, validates prerequisites (AWS CLI present, source directory exists), normalises thedestination-dirinput to handle empty,./, and bare-path forms, then runsaws s3 cp --recursivewith credentials supplied via environment variables and retry config viaAWS_RETRY_MODE=standard/AWS_MAX_ATTEMPTS=5.release.ymlandasset-upload.yml: four upload steps and one asset-upload step are updated touses: ./.github/actions/r2-uploadwith identical input mappings to the old action; no other workflow logic is changed.Confidence Score: 4/5
Safe to merge; the local composite action is a clean, self-contained replacement with no behavioural regressions relative to the removed third-party action.
The action handles all destination-dir edge cases correctly, credentials are never interpolated directly into the shell command, and retry/checksum settings are appropriate for Cloudflare R2. The one gap is that
aws s3 cp --recursivecannot delete objects, so thelatestprefix will accumulate binaries from any platforms that are later dropped.Files Needing Attention: .github/actions/r2-upload/action.yml — worth a second look on the
aws s3 cpvsaws s3 sync --deletechoice for thelatestdestination prefix.Important Files Changed
latestuploads won't purge removed-platform binaries sinceaws s3 cplacks --delete.Prompt To Fix All With AI
Reviews (1): Last reviewed commit: "fix(ci): replace deprecated R2 uploader" | Re-trigger Greptile