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

Support a way to pass cache-irrelevant information to locally executed actions #21231

Closed
afq984 opened this issue Feb 7, 2024 · 2 comments
Closed
Labels
team-Local-Exec Issues and PRs for the Execution (Local) team type: feature request untriaged

Comments

@afq984
Copy link

afq984 commented Feb 7, 2024

Description of the feature request:

Add a build flag --local_action_env=KEY=VALUE which exposes the environment variable KEY=VALUE to build actions only if they are locally executed. Moreover the environment would not end up in the action key.

Which category does this issue belong to?

No response

What underlying problem are you trying to solve with this feature?

Our ChromeOS portage build wraps other build systems (somewhat like rules_foreign_cc) and would benefit from inter-action artifact caching. Our non-Bazel equivalent uses ccache to achieve that.

We would like to use the proposed --local_action_env to pass the path of the ccache directory (and possibly other configs) into the build action. The environment variable passed this way shouldn't end up in the action key because that would make remotely cached artifacts unusable. The environment variable also shouldn't be exposed to remotely executed actions because the local ccache directory path does not make sense to the remote executors.

Which operating system are you running Bazel on?

No response

What is the output of bazel info release?

No response

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What's the output of git remote get-url origin; git rev-parse HEAD ?

No response

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

Internal discussion document and thread

Also thanks @lberki for this idea!

@tjgq
Copy link
Contributor

tjgq commented Feb 7, 2024

What's the difference between this and #20950?

@afq984
Copy link
Author

afq984 commented Feb 7, 2024

Oops, this is a dupe.

@afq984 afq984 closed this as completed Feb 7, 2024
@iancha1992 iancha1992 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-Local-Exec Issues and PRs for the Execution (Local) team type: feature request untriaged
Projects
None yet
Development

No branches or pull requests

5 participants