Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gcp-cli/setup improperly attempts to uninstall newer versions when requesting latest version #73

Closed
novedevo opened this issue May 2, 2023 · 3 comments · Fixed by #77

Comments

@novedevo
Copy link

novedevo commented May 2, 2023

Orb version

3.0.1

What happened

Using the google/cloud-sdk:latest Docker image and running gcp-cli/setup to authenticate, without specifying a version (i.e. defaulting to "latest"), sometimes causes the orb to detect a version mismatch (when the most recent version of the Google Cloud SDK (https://cloud.google.com/sdk/docs/release-notes) is lower than the most recent version of the Docker Hub image (https://hub.docker.com/r/google/cloud-sdk/tags)). This mismatch causes the orb to attempt to uninstall the Google Cloud SDK, but since the Docker image apparently does not include sudo, this fails, and causes the entire pipeline to fail.

This behaviour makes sense when you specify an individual version, but not the blanket "latest" tag.

https://app.circleci.com/pipelines/bitbucket/siqomega/oddsharvester/390/workflows/524dc159-0bac-405b-8744-3ca7006364ad/jobs/866

The version installed (429.0.0) differs from the version requested (428.0.0).
Uninstalling v429.0.0...
sudo is required to uninstall the Google Cloud SDK.
Please install it and try again.
Failed to uninstall the current version.

Expected behavior

If the configuration file requests the latest version of the Google Cloud SDK, a more recent version being preinstalled should not cause the job to try to uninstall the newer version, and instead should continue as normal.

As well, the orb could provide a way to setup an authenticated Google Cloud SDK environment without attempting to install it, if there is already a version installed.

@aprilsourz
Copy link

I'm also experiencing this issue.

@alph486
Copy link

alph486 commented Jun 22, 2023

Me too, thoughts:
One could argue that the :latest tag should refer to only the latest version of the image which is pinned to a version of the SDK which gets preinstalled. I think in the context of using a docker image it would make the most sense.

@w1mvy
Copy link

w1mvy commented Jul 3, 2023

I have a similar problem too. And I have prepared a PR to add skip_install option and am waiting for a review.

#66

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 a pull request may close this issue.

4 participants