Please drastically speed up gcloud installs
andaag opened this issue · comments
TL;DR
Since the gke-gcloud-auth-plugin is required our build times in quite many places got way worse. I have some jobs where google-github-actions/setup-gcloud@v1 takes over a minute, and all the other steps are less than 5s.
Detailed design
The step we are currently using to install gcloud sdk:
- name: "Setup gcloud sdk"
uses: google-github-actions/setup-gcloud@v1
with:
version: '412.0.0'
install_components: gke-gcloud-auth-plugin
Additional information
No response
Hi @andaag
Unfortunately there's nothing we can do to improve gcloud download times. The gcloud binary is a few hundred megabytes (gigabytes for Windows). It's just downloading and decompressing a tarball, so there's no room for optimization.
Hi @andaag
If you don't need a specific version, you can skip setup-gcloud and use the system-provided version (by GitHub) instead. Then just manually install the component:
run: 'gcloud components install foo bar --quiet'
The next version of setup-gcloud
will let you pass skip_install: true
, if that's helpful.
Ah that is very helpful, thank you!
Hello @sethvargo, the skip install flag seems not working neither :
Run google-github-actions/setup-gcloud@v1
Skipping installation ("skip_install" was true)
Error: google-github-actions/setup-gcloud failed with: failed to execute command `gcloud --quiet components install beta`: 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
Using runner ubuntu-latest (22)
Am i missing something ?
Thanks
Hmm - that's interesting. It looks like GitHub might install gcloud from apt instead of from the sources.
Hello 👋
I've created a simple GitHub Action that installs the gke-gcloud-auth-plugin
component with apt. Feel free to use this until someone integrates this into get-gke-credentials
(or something else). I'll try to keep users of simenandre/setup-gke-gcloud-auth-plugin
updated on using gke-gcloud-auth-plugin
with GitHub Actions as we go.
To get started, drop this in your workflow:
- uses: simenandre/setup-gke-gcloud-auth-plugin@v1
Feel free to open issues and PRs here: https://github.com/simenandre/setup-gke-gcloud-auth-plugin