feat: hash-suffixed GCS deploy + upload-release-to-gcs script#21
Conversation
Adds scripts/upload-release-to-gcs.sh that locates a fc-kernels release by commit hash and uploads its vmlinux-*.bin assets to GCS under vmlinux-<version>-<short_hash>/<arch>/vmlinux.bin (legacy non-arch path preserved for amd64). Existing objects are never overwritten and --dry-run previews the plan. Replaces the single-bucket upload step in the release workflow with a deploy matrix (staging, juliett, foxtrot, public) that calls the script with each environment's GCP vars, mirroring the fc-versions pipeline.
PR SummaryMedium Risk Overview Direct workflow artifact upload to GCS is replaced with a new Documentation updates the GCS destination format and notes the manual upload command and non-overwrite behavior. Reviewed by Cursor Bugbot for commit 5e08233. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix prepared a fix for 1 of the 2 issues found in the latest run.
- ✅ Fixed: SIGPIPE breaks script under
set -eo pipefail- Replaced 'head -1' with 'sed -n "1p"' to prevent SIGPIPE (exit 141) when gh api --paginate produces more output than consumed.
Or push these changes by commenting:
@cursor push d2b7a6555a
Preview (d2b7a6555a)
diff --git a/scripts/upload-release-to-gcs.sh b/scripts/upload-release-to-gcs.sh
--- a/scripts/upload-release-to-gcs.sh
+++ b/scripts/upload-release-to-gcs.sh
@@ -62,7 +62,7 @@
# we locate the matching release by scanning bodies.
RELEASE_TAG=$(gh api "repos/$REPO/releases?per_page=100" --paginate \
--jq ".[] | select((.body // \"\") | contains(\"$FULL_HASH\")) | .tag_name" \
- | head -1)
+ | sed -n '1p')
if [[ -z "$RELEASE_TAG" ]]; then
echo "ERROR: no release in $REPO references commit $FULL_HASH" >&2You can send follow-ups to the cloud agent here.
Reviewed by Cursor Bugbot for commit 5e08233. Configure here.
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| environment: [staging, juliett, foxtrot] |
There was a problem hiding this comment.
Deploy matrix missing the public environment
High Severity
The PR description explicitly states the deploy matrix covers four environments (staging, juliett, foxtrot, public) and mentions "The four environments must exist," but the matrix only lists three: [staging, juliett, foxtrot]. The public environment is missing, meaning production/public buckets won't receive kernel deployments.
Reviewed by Cursor Bugbot for commit 5e08233. Configure here.
There was a problem hiding this comment.
Bugbot Autofix determined this is a false positive.
The removal of 'public' from the deploy matrix was intentional as evidenced by commit 5e08233 'drop public from deploy matrix'.
You can send follow-ups to the cloud agent here.
| # we locate the matching release by scanning bodies. | ||
| RELEASE_TAG=$(gh api "repos/$REPO/releases?per_page=100" --paginate \ | ||
| --jq ".[] | select((.body // \"\") | contains(\"$FULL_HASH\")) | .tag_name" \ | ||
| | head -1) |
There was a problem hiding this comment.
SIGPIPE breaks script under set -eo pipefail
Low Severity
The gh api --paginate ... | head -1 pattern combined with set -eo pipefail will cause the script to abort with exit code 141 (SIGPIPE) when gh produces more than one line of output. This happens when multiple releases reference the same commit, or when pagination is active (>100 releases) and the match is found early. Using head -1 as a pipe consumer under pipefail is a well-documented bash pitfall.
Reviewed by Cursor Bugbot for commit 5e08233. Configure here.



Adds
scripts/upload-release-to-gcs.shthat locates a fc-kernels release by commit hash and uploads itsvmlinux-*.binassets to a GCS bucket under hash-suffixed names:gs://<bucket>/vmlinux-<version>-<short_hash>/<arch>/vmlinux.bings://<bucket>/vmlinux-<version>-<short_hash>/vmlinux.bin(legacy = amd64)Skips any object that already exists and supports
--dry-run.The release workflow's single-bucket upload step is replaced by a deploy matrix over
staging,juliett,foxtrot,public, each calling the script with its environment-scoped GCP vars (GCP_PROJECT_ID,GCP_WORKLOAD_IDENTITY_PROVIDER,GCP_SERVICE_ACCOUNT,GCP_BUCKET_NAME) — mirroring the fc-versions release pipeline. The four environments must exist with those variables configured before merging.