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

Update gcloud and add to tool-cache #7101

Closed
8 of 11 tasks
sethvargo opened this issue Feb 13, 2023 · 3 comments
Closed
8 of 11 tasks

Update gcloud and add to tool-cache #7101

sethvargo opened this issue Feb 13, 2023 · 3 comments

Comments

@sethvargo
Copy link

Tool name

gcloud

Tool license

Apache 2

Add or update?

  • Add
  • Update

Desired version

latest

Approximate size

600MB

Brief description of tool

The gcloud CLI already exists, but it is installed from a package manager (e.g. apt). This is problematic because:

  1. The version of gcloud that is installed with a package manager cannot install additional components like kubectl or cloud-run-proxy (example). It also prevents using alpha or beta commands (since those are actually separate components. This forces users to re-install the entire 600MB+ package just to install a 2MB optional component. That adds a ton of unnecessary bandwidth and working runtime.

  2. The gcloud SDK is not included in the tool-cache, so searching the tool-cache to see if a version of gcloud is installed will always fail. This leads to spurious additional installations (example).

URL for tool's homepage

https://cloud.google.com/sdk

Provide a basic test case to validate the tool's functionality.

gcloud version

Platforms where you need the tool

  • Azure DevOps
  • GitHub Actions

Runner images where you need the tool

  • Ubuntu 18.04
  • Ubuntu 20.04
  • Ubuntu 22.04
  • macOS 11
  • macOS 12
  • Windows Server 2019
  • Windows Server 2022

Can this tool be installed during the build?

I'm not sure what "during the build" means. Users can install the tool themselves using https://github.com/google-github-actions/setup-gcloud, but due to the size of the package (particularly on Windows), this adds 5min+ to build times. It also consumes unnecessary bandwidth and resources.

Tool installation time in runtime

2 minutes

Are you willing to submit a PR?

Yes, but I would like pre-approval before doing the work

@erik-bershel
Copy link
Contributor

Hello @sethvargo! We'll return with an answer a bit later after a little investigation.

@mikhailkoliada
Copy link
Contributor

@sethvargo Hello!

GCP is generally to be deprecated and removed from all runners, the currently existing apt version was provided long ago and will be removed eventually, there are no plans to add it to more OSes or provide it via toolcache. Customers who need more advanced functionality / better installation should still use the setup-gcloud GitHub action.

ethanmdavidson added a commit to ethanmdavidson/setup-gcloud that referenced this issue Apr 28, 2023
Based on github's comments in actions/runner-images#7101 it's my understanding that at some point the system-installed gcloud will no longer be included in the runners. When that happens, anyone workflows with `skip_install: true` will stop working

Signed-off-by: Ethan Davidson <ethanmdavidson@gmail.com>
sethvargo pushed a commit to google-github-actions/setup-gcloud that referenced this issue Apr 29, 2023
Based on github's comments in
actions/runner-images#7101 it's my
understanding that at some point the system-installed gcloud will no
longer be included in the runners. When that happens, I assume any
workflows with `skip_install: true` will stop working

(also fyi: the readme
[references](https://github.com/google-github-actions/setup-gcloud#contributing)
CONTRIBUTING.md, but that file doesn't exist)

---------

Signed-off-by: Ethan Davidson <ethanmdavidson@gmail.com>
@arikkfir
Copy link

arikkfir commented Sep 5, 2023

Hi @mikhailkoliada & @erik-bershel,

I was wondering - are there similar plans to remove the AWS CLI and Azure CLI from all runners, like mentioned above for the Google Cloud CLI? (according to https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md all three CLIs are still installed to runners).

Perhaps the original plans changed?

figadore added a commit to vivantehealth/gcloud-workload-identity-action that referenced this issue Oct 31, 2024
* use system gcloud by default

this is faster by about 20 seconds per job. this is a breaking change for any job that installs custom gcloud components, which at the moment does not appear to include any repos. this will also mean that the latest gcloud is not always installed if the default github actions runner does not have the latest version

this may be a breaking change when ubuntu/latest starts to refer to 24.04. see actions/runner-images#7101 (comment) and https://github.com/search?q=repo%3Aactions%2Frunner-images%20google-cloud&type=code

* update readme repo name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants