Repository navigation
Stage micro-VM assets without gcloud's parallel composite uploads - #112
Merged
Merged
Conversation
The "stage micro-VM assets" step failed on a workstation with gcloud's context-aware access enabled (context_aware/use_client_certificate = true): after the 50 s asset download, `gcloud storage cp` died with `[SSL] PEM lib (_ssl.c:4181)` three times and `Temporary components were not uploaded correctly`. gcloud splits each large upload into components sent by worker processes, and each worker reads the per-invocation client certificate file the parent gcloud writes and removes. Half the assets and the gcloud/tmp/parallel_composite_uploads/ parts were left in the asset bucket, the SandboxConfig was never applied, and the wizard's [s] reset the sandbox choice to gVisor. Replaying the same step with CLOUDSDK_STORAGE_PARALLEL_COMPOSITE_UPLOAD_ENABLED=False in the environment uploaded all four assets and created the SandboxConfig. microVMEnv now sets that variable, so both the staging step and the demo counter-microvm step carry it. It reaches both staging paths: the pinned v1.0.0-rc.1 tree's hack/install-microvm-deps.sh (whose stage-to-gcs.sh runs a bare `gcloud storage cp`) and, on trees from agent-substrate/substrate#2092 on, `ate-setup deploy sandboxconfig`, whose Go code shells out to the same command with an environment built from os.Environ(). gcloud storage cp has no flag for this; the storage/parallel_composite_upload_enabled property is the only switch, and sequential upload of four objects costs nothing noticeable. The env test for the two micro-VM specs asserts the variable, and the README's hand-run re-staging commands say to set it too. Fixes #111
MushuEE
approved these changes
Nov 3, 2026
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.
On a workstation with gcloud's context-aware access enabled, the "stage micro-VM assets" step fails after the asset download:
gcloud storage cpsplits each large upload into components sent by worker processes, each worker reads the per-invocation client certificate file the parent writes and removes, and the upload dies with[SSL] PEM lib (_ssl.c:4181)×3 andTemporary components were not uploaded correctly. Half the assets andgcloud/tmp/parallel_composite_uploads/…parts are left in the bucket, the SandboxConfig is never applied, and the wizard's[s]resets the choice to gVisor. Replaying the same step withCLOUDSDK_STORAGE_PARALLEL_COMPOSITE_UPLOAD_ENABLED=Falseuploaded all four assets and created the SandboxConfig.This change:
microVMEnvsetsCLOUDSDK_STORAGE_PARALLEL_COMPOSITE_UPLOAD_ENABLED=False, so both the staging step and the demo counter-microvm step carry it. It covers both staging paths: the pinned v1.0.0-rc.1 tree'shack/install-microvm-deps.sh(stage-to-gcs.shruns a baregcloud storage cp) and newer trees'ate-setup deploy sandboxconfig, whose Go code shells out to the same command with an environment built fromos.Environ().gcloud storage cphas no per-command flag for this; thestorage/parallel_composite_upload_enabledproperty is the only switch.TestMicroVMDepsPinArchAndStagingTargetasserts the variable on both specs.#88's local copy of the staging script makes the same
gcloud storage cpcall; once it lands, its step should carry this environment too.Tests:
gofmt -l,go vet ./...,go test ./internal/snapshot/...(only the pre-existing, machine-specificTestFetchTreesFetchesBothCommitsfailure).Fixes #111