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
Member

@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?

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