Skip to content

fix: add GCS migration and upload-release scripts#22

Closed
ValentaTomas wants to merge 6 commits into
mainfrom
fix/migrate-flat-firecrackers-to-amd64
Closed

fix: add GCS migration and upload-release scripts#22
ValentaTomas wants to merge 6 commits into
mainfrom
fix/migrate-flat-firecrackers-to-amd64

Conversation

@ValentaTomas
Copy link
Copy Markdown
Member

Scripts

scripts/migrate-gcs-arch.sh

Copies flat-path firecracker binaries ({version}/firecracker) into {version}/amd64/firecracker for old builds that predate the arch-subdir layout. Skips versions that already have the amd64/ path. Supports dry-run and --apply.

scripts/upload-release-to-gcs.sh

Downloads firecracker-{amd64,arm64} assets from a GitHub release and uploads them to GCS at the correct arch-subdir layout. Existing objects are never overwritten. Supports --dry-run.

# migrate old flat-path binaries
./scripts/migrate-gcs-arch.sh gs://my-bucket --apply

# upload a release to GCS
./scripts/upload-release-to-gcs.sh --tag v1.14.1_f0a35a1 --bucket my-bucket

Before ARM64 support was added, firecracker binaries were uploaded to GCS
at the flat path firecrackers/{version}/firecracker. The orchestrator's
arch-aware path resolution expects firecrackers/{version}/amd64/firecracker,
so old builds are not found via the arch-based lookup.

Add migrate-gcs-arch.sh to dry-run/copy (and optionally delete) existing
flat-path GCS objects into the amd64/ subdirectory.
@cla-bot cla-bot Bot added the cla-signed label May 13, 2026
@cursor
Copy link
Copy Markdown

cursor Bot commented May 13, 2026

PR Summary

Medium Risk
Operational risk: scripts can copy/upload artifacts in GCS if run with write flags, so incorrect bucket/tag inputs could place binaries in wrong locations. No runtime codepaths are changed; impact is limited to build/artifact storage workflows.

Overview
Adds scripts/migrate-gcs-arch.sh to find legacy flat-path .../<version>/firecracker objects in GCS and (optionally, via --apply) copy them to .../<version>/amd64/firecracker, skipping destinations that already exist.

Adds scripts/upload-release-to-gcs.sh to fetch firecracker-{amd64,arm64} (and legacy firecracker) assets from a GitHub release and upload them to gs://<bucket>/<tag>/<arch>/firecracker (and /<tag>/firecracker), with --dry-run support and no overwrites.

Reviewed by Cursor Bugbot for commit 0cd7a29. Bugbot is set up for automated code reviews on this repo. Configure here.

@ValentaTomas ValentaTomas deleted the fix/migrate-flat-firecrackers-to-amd64 branch May 13, 2026 06:01
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is ON, but it could not run because the branch was deleted or merged before autofix could start.

Reviewed by Cursor Bugbot for commit 0cd7a29. Configure here.

dst="${BUCKET_URI}/${TAG}/firecracker"
else
continue
fi
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upload script missing legacy flat-path copy for amd64

High Severity

The script's header comment documents that it uploads to both <bucket>/<version_name>/<arch>/firecracker and <bucket>/<version_name>/firecracker (legacy amd64 copy). However, when handling a firecracker-amd64 asset, the code only uploads to the arch-specific path and never creates the legacy flat-path copy. build.sh explicitly creates both paths for amd64 with a comment noting "so existing production nodes that expect the old layout keep working." New releases lacking a bare firecracker asset will have no legacy path, breaking backward compatibility.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 0cd7a29. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant