Skip to content

Conversation

@franciscovalentecastro
Copy link
Contributor

@franciscovalentecastro franciscovalentecastro commented Dec 1, 2025

Since gcloud storage is now GA 1 it is recommended to stop using gsutil. This may alleviate/fix some test flakes that occur when gsutil is installed or executed.

Followup to #456 , #457 by installing gcloud when missing in some distributions (e.g. sles-12, sles-15).

Testing in : GoogleCloudPlatform/ops-agent#2145.

b/462768459

Footnotes

  1. https://docs.cloud.google.com/storage/docs/gsutil-transition-to-gcloud

@franciscovalentecastro franciscovalentecastro changed the title [gce_test] Create InstallGcloudIfNeeded to migrate from gsutil to gcloud storage. [gce_test] Migrate from gsutil to gcloud storage and create InstallGcloudIfNeeded. Dec 15, 2025
@franciscovalentecastro franciscovalentecastro requested review from a team and LujieDuan and removed request for a team December 15, 2025 18:49
Copy link
Contributor

@avilevy18 avilevy18 left a comment

Choose a reason for hiding this comment

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

LGTM, I added a suggestion, but feel free to ignore it if you disagree.

Copy link
Contributor

Choose a reason for hiding this comment

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

I know this isn't part of the migration, but I think we should add another check to see if we have gcloud working now and fail if it can't call it.

Maybe lets factor out:

if _, err := RunRemotely(ctx, logger, vm, "sudo gcloud --version"); err == nil {
		// Success, no need to install gcloud.
		return nil
	}

into its own method.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I created verifyGcloudInstallation. I think it is valuable to log the installed gcloud version after the installation steps. Done.

@franciscovalentecastro franciscovalentecastro merged commit 6c8bfa0 into master Dec 16, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants