Skip to content

Flip incompatible_strict_action_env in examples #3160

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

hofbi
Copy link
Contributor

@hofbi hofbi commented Aug 11, 2025

Reproduce what we found in bazelbuild/bazel#26587 (comment)

@hofbi hofbi force-pushed the flip-incompatible_strict_action_env branch from fd4e075 to 57d1645 Compare August 11, 2025 22:23
@hofbi
Copy link
Contributor Author

hofbi commented Aug 12, 2025

@rickeylev I am currently working on bazelbuild/bazel#26587 and @meteorcloudy helped me to trigger https://buildkite.com/bazel/bcr-bazel-compatibility-test/builds/492 to test the flip. We found an issue in the rules_python windows build here which should be in https://github.com/bazel-contrib/rules_python/tree/main/examples/multi_python_versions.

Now I am trying to reproduce this in this repo, but CI is still green. Am I setting the flag at the right spot?

@rickeylev
Copy link
Collaborator

am i setting the flag right?

I don't think so. I think that error is coming from the bzlmod example, not multi_python_versions. Which makes sense, this is running the tests that modules have configured for BCR to test, right? Yeah, that'd be examples/bzlmod for rules_python.

I updated the pr to set the flag in the bzlmod rc file, lets see how CI goes.

@rickeylev
Copy link
Collaborator

Something that may be relevant to --incompatible_strict_action_env: iirc, part of how the "windows launcher maker" thing in bazel works is it looks up python from PATH, I think as a fallback? I can't remember exactly.

@hofbi
Copy link
Contributor Author

hofbi commented Aug 14, 2025

Thanks @rickeylev for helping out here. Now with CI being green again, do you have any suggestion how to reproduce the errors found here?

@rickeylev
Copy link
Collaborator

Hm. The two suggestions I have are:

  • Flip the flag everywhere in rules_python. Maybe one of the other jobs will exhibit the same behavior. I'd be +1 on a PR to do this where ever we can anyways.
  • Do you have a windows machine? clone rules_python, cd to the example dir, then run the builds.
  • Try and identify a difference between the BCR environment and the Bazel-CI environment used by rules_python. Different OS versions? Are the env vars and the bazel command line args the same between the two?

An oddity with the error is that it reports files missing or giving permission denied (either could mean the other, though). This is weird because those exe files should always exist (they're generated by bazel after all). I would expect more an error like: those exe's run, then fail to find python.exe (because, for some reason, they get it from PATH).

My guess is its something to do with PATH, but that's just a guess. Maybe try having it print the PATH when things pass, print it when it fails, and then try to figure out what's missing, adding bits and pieces back to see the effect.

@hofbi
Copy link
Contributor Author

hofbi commented Aug 16, 2025

Unfortunately I don't have a windows machine available, but I can make the PR and try to identify diffs in the env.

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

Successfully merging this pull request may close these issues.

2 participants