Skip to content

Add --incompatible_repo_env_ignores_action_env option#25238

Closed
Silic0nS0ldier wants to merge 2 commits intobazelbuild:masterfrom
Silic0nS0ldier:incompatible-action-env-repo-fix
Closed

Add --incompatible_repo_env_ignores_action_env option#25238
Silic0nS0ldier wants to merge 2 commits intobazelbuild:masterfrom
Silic0nS0ldier:incompatible-action-env-repo-fix

Conversation

@Silic0nS0ldier
Copy link
Copy Markdown
Contributor

@Silic0nS0ldier Silic0nS0ldier commented Feb 10, 2025

This adds a new flag --incompatible_repo_env_ignores_action_env which when flipped stops --action_env=NAME=VALUE from affecting repository rule and module extension environments.

Split from #24404.

@Silic0nS0ldier Silic0nS0ldier requested a review from a team as a code owner February 10, 2025 11:56
@Silic0nS0ldier Silic0nS0ldier requested review from aranguyen and removed request for a team February 10, 2025 11:56
@github-actions github-actions bot added team-Configurability platforms, toolchains, cquery, select(), config transitions awaiting-review PR is awaiting review from an assigned reviewer labels Feb 10, 2025
@meteorcloudy meteorcloudy added team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. and removed team-Configurability platforms, toolchains, cquery, select(), config transitions labels May 16, 2025
@meteorcloudy meteorcloudy requested review from Wyverald, fmeum and meteorcloudy and removed request for aranguyen May 16, 2025 12:42
@meteorcloudy
Copy link
Copy Markdown
Member

Sorry for the delay of review here.

@Wyverald @fmeum I think adding this flag and perhaps flipping it to true by default eventually make sense to me. I was a bit surprised that repo env vars are affected by --action_env in the first place.

Copy link
Copy Markdown
Collaborator

@fmeum fmeum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really like this change, this will avoid a bunch of repo rule invalidations down the line.

We may be able to come up with a more descriptive name for the flag. --incompatible_repo_env_ignores_action_env perhaps?

@meteorcloudy
Copy link
Copy Markdown
Member

--incompatible_repo_env_ignores_action_env does sound more intuitive.

@Silic0nS0ldier Can you please make this change? Thanks!

@meteorcloudy meteorcloudy added awaiting-user-response Awaiting a response from the author and removed awaiting-review PR is awaiting review from an assigned reviewer labels May 20, 2025
@fmeum
Copy link
Copy Markdown
Collaborator

fmeum commented May 28, 2025

@Silic0nS0ldier Friendly reverse ping, you can probably also just agree to having the Bazel team make the change on import :-)

@Silic0nS0ldier Silic0nS0ldier force-pushed the incompatible-action-env-repo-fix branch from 2786202 to e0853d2 Compare June 2, 2025 09:20
@Silic0nS0ldier
Copy link
Copy Markdown
Contributor Author

Apologies for the slow response. PR has been updated, feel free to make whatever changes you (Bazel maintainers) deem necessary to merge.

@Silic0nS0ldier Silic0nS0ldier changed the title Add --incompatible_action_env_no_repo option Add --incompatible_repo_env_ignores_action_env option Jun 2, 2025
@meteorcloudy meteorcloudy added awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally and removed awaiting-user-response Awaiting a response from the author labels Jun 3, 2025
@fmeum
Copy link
Copy Markdown
Collaborator

fmeum commented Jun 3, 2025

@bazel-io fork 8.3.0

@meteorcloudy
Copy link
Copy Markdown
Member

@Silic0nS0ldier Thanks, we are importing this PR. In the meantime, can you fill out https://github.com/bazelbuild/bazel/issues/new?template=incompatible_change.yml to better document this change?

@copybara-service copybara-service bot closed this in 216ae9d Jun 4, 2025
@github-actions github-actions bot removed the awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally label Jun 4, 2025
bazel-io pushed a commit to bazel-io/bazel that referenced this pull request Jun 4, 2025
This adds a new flag `--incompatible_repo_env_ignores_action_env` which when flipped stops `--action_env=NAME=VALUE` from affecting repository rule and module extension environments.

Split from bazelbuild#24404.

Closes bazelbuild#25238.

PiperOrigin-RevId: 767031987
Change-Id: I1683935ab2728f6bbfcf499ea8a598770002020d
github-merge-queue bot pushed a commit that referenced this pull request Jun 10, 2025
This adds a new flag `--incompatible_repo_env_ignores_action_env` which
when flipped stops `--action_env=NAME=VALUE` from affecting repository
rule and module extension environments.

Split from #24404.

Closes #25238.

PiperOrigin-RevId: 767031987
Change-Id: I1683935ab2728f6bbfcf499ea8a598770002020d

Commit
216ae9d

Co-authored-by: Jordan Mele <jordan.mele@outlook.com.au>
@iancha1992
Copy link
Copy Markdown
Member

The changes in this PR have been included in Bazel 8.3.0 RC1. Please test out the release candidate and report any issues as soon as possible.
If you're using Bazelisk, you can point to the latest RC by setting USE_BAZEL_VERSION=8.3.0rc1. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants