Skip to content

refactor: replace legacy gsutil calls with gcloud#5530

Open
amcolin wants to merge 1 commit intoGoogleCloudPlatform:mainfrom
amcolin:migrate-gsutil
Open

refactor: replace legacy gsutil calls with gcloud#5530
amcolin wants to merge 1 commit intoGoogleCloudPlatform:mainfrom
amcolin:migrate-gsutil

Conversation

@amcolin
Copy link
Copy Markdown
Contributor

@amcolin amcolin commented Apr 21, 2026

Description

Updated scripts to use gcloud storage commands instead of the legacy gsutil tool. This aligns with the current Google Cloud recommendations for improved performance and unified authentication.

Fixes Internal b/498645997

Checklist

  • I have followed Contributing Guidelines from CONTRIBUTING.MD
  • Tests pass: go test -v ./.. (see Testing)
  • Code formatted: gofmt (see Formatting)
  • Vetting pass: go vet (see Formatting)
  • These samples need a new API enabled in testing projects to pass (let us know which ones)
  • These samples need a new/updated env vars in testing projects set to pass (let us know which ones)
  • This sample adds a new sample directory, and I updated the CODEOWNERS file with the codeowners for this sample
  • This sample adds a new Product API, and I updated the Blunderbuss issue/PR auto-assigner with the codeowners for this sample
  • Please merge this PR for me once it is approved

@product-auto-label product-auto-label Bot added the samples Issues that are directly related to samples. label Apr 21, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request replaces gsutil commands with gcloud storage across several deployment and testing scripts. Feedback includes correcting the ACL flag format in the Makefile from publicRead to public-read and addressing potential compatibility issues with the Google Cloud SDK version on legacy Debian images.

Comment thread testing/gimmeproj/Makefile Outdated
Comment thread memorystore/redis/gce_deployment/startup-script.sh
@amcolin
Copy link
Copy Markdown
Contributor Author

amcolin commented Apr 22, 2026

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request migrates storage operations from gsutil to gcloud storage across several scripts and configuration files, while also updating the GCE deployment to use Debian 12 and an E2-series machine type. The review identifies a critical compatibility issue where the legacy google-fluentd agent in the startup script is unsupported on Debian 12. Additionally, it is recommended to include the --quiet flag in gcloud commands within scripts and Makefiles to ensure non-interactive execution and prevent automated processes from hanging.

Comment thread memorystore/redis/gce_deployment/deploy.sh Outdated
Comment thread memorystore/redis/gce_deployment/deploy.sh
Comment thread memorystore/redis/gce_deployment/startup-script.sh
Comment thread testing/gimmeproj/Makefile
@amcolin
Copy link
Copy Markdown
Contributor Author

amcolin commented Apr 22, 2026

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request migrates storage operations from gsutil to gcloud storage across deployment scripts, CI configurations, and Makefiles, while also updating GCE instance images to Debian 11 and machine types to e2-small. The review feedback identifies that the -q flag is incorrectly used with the gcloud storage cp command, which will cause execution failures in the deployment scripts and Makefile.

Comment thread memorystore/redis/gce_deployment/deploy.sh Outdated
Comment thread memorystore/redis/gce_deployment/startup-script.sh Outdated
Comment thread testing/gimmeproj/Makefile Outdated
@amcolin amcolin marked this pull request as ready for review April 22, 2026 22:39
@amcolin amcolin requested review from a team as code owners April 22, 2026 22:39
@XrossFox
Copy link
Copy Markdown

LGTM

Copy link
Copy Markdown

@angelcaamal angelcaamal left a comment

Choose a reason for hiding this comment

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

LGTM

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

Labels

samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants