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

Consider supplying a hermetic gcloud command #1

Closed
alexeagle opened this issue Oct 17, 2024 · 2 comments
Closed

Consider supplying a hermetic gcloud command #1

alexeagle opened this issue Oct 17, 2024 · 2 comments

Comments

@alexeagle
Copy link

In https://github.com/aspect-build/rules_aws one of our first tasks was to provide a hermetic bazel run @aws command so that we don't depend on what's on the users computer. Have you considered doing something similar to get the gcloud command?

@malt3
Copy link
Collaborator

malt3 commented Oct 17, 2024

We have plans for giving users a better experience when it comes to credential fetching that is more Bazel native and doesn’t require the gcloud tool. Expect something in the next weeks!

@malt3
Copy link
Collaborator

malt3 commented Jan 14, 2025

Just to follow up on this: we now have tweag-credential-helper as a fast, hermetic way to obtain Google (and other) credentials in Bazel.
I thought about providing gcloud, but doing this wouldn't help in this context, since --credential_helper must reference a workspace relative path, an absolute path or a binary in $PATH. It can never refer to a Bazel label. A credential helper also cannot invoke Bazel itself, since it is already running under Bazel.

I do think that a hermetic gcloud is still a nice idea, it just doesn't fit well into this ruleset.

@malt3 malt3 closed this as completed Jan 14, 2025
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

2 participants