-
Notifications
You must be signed in to change notification settings - Fork 543
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
regression: pip_compile
ignores env
attribute
#2270
Labels
Comments
kpark-hrp
changed the title
regression: Oct 3, 2024
env
parameter is dropped when forwarding to py_binary
in pip_compile
pip_compile
ignores when env
attribute
kpark-hrp
changed the title
regression:
regression: Oct 3, 2024
pip_compile
ignores when env
attributepip_compile
ignores env
attribute
Whipped up #2277. Haven't tested it yet, but does it seem reasonable thus far? |
I'm not sure there's a great way to write a test for this, but the I did test an env = {"CUSTOM_COMPILE_COMMAND": "__TEST_REQUIREMENTS_CUSTOM_COMPILE_COMMAND__"} and that works as expected, so I think it'll fix this issue. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
🐞 bug report
Affected Rule
The issue is caused by the rule:
pip_compile
but exposed to public ascompile_pip_requirements
During this change below,
env
parameter used to be captured bykwargs
and then passed asattrs
to respectivepy_binary
. But nowenv
withinkwargs
is being ignored, so any environment variables that is set withpip_compile
rule is being ignored.e923f9e#diff-a92cc6468f47191b8e22d4bbe2564d3968d3dd4bbc383b9f3df3c4c520e1583eL147-R165
Is this a regression?
Yes.
env
parameter that was passed topip_compile
was respected in0.34.0
but now it's not on0.36.0
.Description
A clear and concise description of the problem...🔬 Minimal Reproduction
Then run
bazel run :requirements.update
on0.34.0
vs0.36.0
🔥 Exception or Error
No particular exception, but the environment variables are not picked up when running
bazel run :requirements.update
🌍 Your Environment
Operating System: MacOS 14.7
Output of
bazel version
: bazel 6.5.0Rules_python version:
0.34.0
trying to upgrade to0.36.0
The text was updated successfully, but these errors were encountered: