Repository navigation
fix(azure): add copy-public-builds support for PROVIDER=azure - #3531
michalsuba-e2b wants to merge 1 commit into
Conversation
The aws/gcp branches were the only ones handled; PROVIDER=azure fell through to the gcp else-branch and tried to build a gs:// bucket name from the unset GCP_BUCKET_PREFIX, producing a malformed "gs://-fc-kernels/" path. Downloads from the same public GCS bucket as the other two branches (using `gcloud storage cp` rather than `gsutil`, which gates on Python 3.9-3.13 and isn't needed for the newer command), then uploads via `az storage blob upload-batch` into the fc-kernels/fc-versions/fc-busybox containers using AZURE_STORAGE_ACCOUNT_NAME. Containers are unprefixed (unlike AWS/GCP's per-purpose-prefixed buckets), since BYOC's Azure storage account already carries the unique prefix in its own name. Verified end-to-end against live Azure BYOC environments. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
LGTM — straightforward addition of an azure arm to copy-public-builds, mirroring the existing aws branch pattern.
Extended reasoning...
Overview
The change is confined to a single Makefile target (copy-public-builds), adding an else ifeq ($(PROVIDER),azure) branch alongside the existing aws and gcp/default branches. It downloads the public kernel/firecracker/busybox artifacts from the shared public GCS bucket via gcloud storage cp, then uploads them into Azure Blob Storage containers via az storage blob upload-batch --auth-mode login, using the same mkdir/cleanup scaffolding already used by the aws branch.
Security risks
None of note. This is operator-invoked build tooling, not a request-serving code path. --auth-mode login relies on the invoking identity's existing Azure RBAC (Storage Blob Data Contributor per the PR description) rather than embedding credentials, and the GCS source bucket is the same public, already-trusted bucket the aws/gcp branches use. No user input, no secrets embedded in the diff.
Level of scrutiny
Low. This is a Makefile/build-tooling change, structurally identical to the pre-existing aws branch (mkdir temp dirs → cp from public bucket → upload to per-provider destination → rm temp dirs), just retargeted to Azure CLI commands. There's no business logic, no data model or security-boundary change, and it only affects a manual self-host/BYOC workflow rather than the production request path.
Other factors
The PR description states this was extracted unchanged from a branch that has run end-to-end against live Azure BYOC environments, and it's consumed by a companion e2b-dev/byoc submodule bump. The bug-hunting pass found no issues, and my own read of the diff didn't surface anything beyond the pattern already established by the aws branch. Given the small, self-contained, low-blast-radius nature of the change, this doesn't need human review.
|
Closing in favor of e2b-dev/belt#1330 — same diff, re-targeted per the belt-first process (development in e2b-dev/belt |
`make copy-public-builds` (`oss/infra/Makefile`) only handled `PROVIDER=aws`/gcp; `azure` fell through to the gcp else-branch and built a malformed `gs://-fc-kernels/` path from the unset `GCP_BUCKET_PREFIX`. Adds the azure arm: download from the same public GCS bucket (`gcloud storage cp` — avoids `gsutil`'s Python version gate), upload via `az storage blob upload-batch --auth-mode login` into the `fc-kernels`/`fc-versions`/`fc-busybox` containers addressed by `AZURE_STORAGE_ACCOUNT_NAME`. Containers are unprefixed, unlike AWS/GCP's per-purpose-prefixed buckets — the BYOC Azure storage account already carries the unique prefix in its own name. The `--auth-mode login` data-plane call works because BYOC's terraform grants the apply runner `Storage Blob Data Contributor` on that account for exactly this flow. Extracted unchanged from infra's `2026-06-Azure-PoC` branch, where it has run end-to-end against live Azure BYOC environments. **Process note**: replaces #3531 (same diff, opened directly against infra before the belt-first announcement — closing it in favor of this). Once this syncs out to e2b-dev/infra main, e2b-dev/byoc#197 re-bumps its infra-services pin to consume it. 🤖 Generated with [Claude Code](https://claude.com/claude-code) GitOrigin-RevId: 07106b4726568ec49498f341db85b6362727da63
make copy-public-buildsonly handledPROVIDER=aws/gcp;azurefell through to the gcp else-branch and built a malformedgs://-fc-kernels/path from the unsetGCP_BUCKET_PREFIX.Adds the azure arm: download from the same public GCS bucket (
gcloud storage cp— avoidsgsutil's Python version gate), upload viaaz storage blob upload-batch --auth-mode logininto thefc-kernels/fc-versions/fc-busyboxcontainers addressed byAZURE_STORAGE_ACCOUNT_NAME. Containers are unprefixed, unlike AWS/GCP's per-purpose-prefixed buckets — the BYOC Azure storage account already carries the unique prefix in its own name. The--auth-mode logindata-plane call works because the BYOC terraform grants the apply runnerStorage Blob Data Contributoron that account for exactly this flow.Extracted unchanged from the
2026-06-Azure-PoCbranch, where it has run end-to-end against live Azure BYOC environments. Consumed by e2b-dev/byoc via its submodule pin (companion byoc PR bumps it).🤖 Generated with Claude Code