Closed joshgc closed 8 months ago
Hi @joshgc - we can definitely change the warning, but we added it because many users were submitting issues when the authentication was missing (often due to skipping actions/checkout or resetting the workspace between steps).
Warnings are just that – warnings. If you know what you're doing and things are working, you can ignore it.
Additionally, I'm not sure what value setup-gcloud is providing in your case. If you're using ADC from the default metadata server on self-hosted runners, you may be better bundling gcloud into your base image and skipping the download; gcloud is quite large and if you've already taken the plunge to use self-hosted runners, you'd see a major performance benefit from skipping this step entirely.
Thanks @sethvargo agreed its just a warning and so this is not a p0 feature request. So right now we are using the default actions-runner-controller image and not a layer built-ontop of it, which is why we still install gcloud with this action. Then we pull and run a dynamic much more sophisticated image with all of our dependencies that may change from commit-to-commit (eg. python deps in requirements.txt).
How would you feel about checking this method isAuthenticated
and then if its false we check and warn on the creds file?
https://github.com/google-github-actions/setup-cloud-sdk/blob/main/src/index.ts#L157
Thanks!
TL;DR
We run out GHA on self-hosted runners on GKE. When using v1 like...
we get the following warning
However gcloud works fine.
Detailed design
Looking at the code here, I expect the issue is that no credentials file is present but gcloud is able to find the GCE Metadata server. This seems like a safe path so I'm wondering if we could drop the warning?
Additional information
No response