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

Fails to install components if gcloud came from apt #69

Open
mgabeler-lee-6rs opened this issue Feb 22, 2023 · 0 comments
Open

Fails to install components if gcloud came from apt #69

mgabeler-lee-6rs opened this issue Feb 22, 2023 · 0 comments

Comments

@mgabeler-lee-6rs
Copy link

Orb version

3.0.1

What happened

We embed steps from this orb in an orb of our own, and so sometimes we end up calling it in a workflow that is running from an image that has at least the base gcloud already installed, such as gcr.io/google.com/cloudsdktool/cloud-sdk, since our orb steps that need gcloud sometimes run in containers without gcloud pre-installed, and sometimes in ones that have it installed.

This orb detects that gcloud is already installed, but then when trying to install the requested components, it always uses gcloud components install ..., which is not allowed when gcloud was installed via apt (or some other package manager). This causes the install step to fail with an error like this:

ERROR: (gcloud.components.install) 
You cannot perform this action because the Google Cloud CLI component manager 
is disabled for this installation. You can run the following command 
to achieve the same result for this installation: 

sudo apt-get install google-cloud-sdk-gke-gcloud-auth-plugin

Expected behavior

It should install the requested components via apt-get when necessary.

Additional Notes

Google is in the process of trying to transition the name of the "sdk" package to "cli", and the names of the component packages needs to match the main gcloud package, so e.g. if google-cloud-cli is installed, component packages need to be installed as google-cloud-cli-<component>, trying to install google-cloud-sdk-<component> will fail, and vice versa. It doesn't help matters that the error message from gcloud components install always tells you to use the sdk variant even when that's wrong.

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

No branches or pull requests

1 participant