Skip to content

fix: Setup a writable gcloud SDK before installing Spanner emulator component - #39852

Open
christogav wants to merge 1 commit into
apache:masterfrom
christogav:spanner-emulator-setup-gcloud
Open

fix: Setup a writable gcloud SDK before installing Spanner emulator component#39852
christogav wants to merge 1 commit into
apache:masterfrom
christogav:spanner-emulator-setup-gcloud

Conversation

@christogav

Copy link
Copy Markdown
Contributor

Follow-up to #39850.

That PR added a gcloud components install cloud-spanner-emulator --quiet step to beam_PreCommit_Go.yml for the Go Spanner change-streams IO integration tests. Once merged, the step ran but failed on the self-hosted runner with:

ERROR: (gcloud.components.install) You cannot perform this action because you do not have permission to modify the Google Cloud SDK installation directory [/usr/local/google-cloud-sdk].

Re-run the command with sudo: sudo /usr/local/google-cloud-sdk/bin/gcloud ...

The runner's pre-baked gcloud SDK at /usr/local/google-cloud-sdk isn't writable by the job's user, so any component install against it fails, not just this one. Other workflows in this repo (e.g. beam_CleanUpGCPResources.yml, which installs the cbt component) avoid this by running google-github-actions/setup-gcloud first, which provisions its own writable SDK copy instead of relying on the runner's baked-in install. This PR does the same for beam_PreCommit_Go.yml.


  • N/A: no user-facing change, CI workflow fix only.

See the Contributor Guide for more tips on how to make review process smoother.

gcloud components install fails on self-hosted runners with:

  ERROR: (gcloud.components.install) You cannot perform this action
  because you do not have permission to modify the Google Cloud SDK
  installation directory [/usr/local/google-cloud-sdk].

The runner's pre-baked gcloud SDK at /usr/local/google-cloud-sdk isn't
writable by the job's user, so any component install there fails
regardless of which component. Other workflows in this repo (e.g.
beam_CleanUpGCPResources.yml) work around this by running
google-github-actions/setup-gcloud first, which provisions its own
writable SDK copy instead of relying on the runner's baked-in one.
@github-actions github-actions Bot added the build label Aug 22, 2026
@christogav christogav changed the title Setup a writable gcloud SDK before installing Spanner emulator component fix: Setup a writable gcloud SDK before installing Spanner emulator component Aug 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Assigning reviewers:

R: @Abacn for label build.

Note: If you would like to opt out of this review, comment assign to next reviewer.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

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