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

fix: pass kwargs env to both update and test targets #2277

Merged
merged 2 commits into from
Oct 9, 2024

Conversation

lpulley
Copy link
Contributor

@lpulley lpulley commented Oct 7, 2024

Fixes #2270.

@cj81499
Copy link
Contributor

cj81499 commented Oct 7, 2024

Seems reasonable to me. If it's not too much a hassle, it'd be good to write an automated test for this to avoid future breakage.

@lpulley lpulley marked this pull request as ready for review October 7, 2024 19:32
@lpulley lpulley requested review from aignas and groodt as code owners October 7, 2024 19:32
Copy link
Collaborator

@aignas aignas left a comment

Choose a reason for hiding this comment

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

Could you please add a CHANGELOG note to mentioned what was fixed?

@lpulley lpulley requested a review from rickeylev as a code owner October 8, 2024 14:40
@lpulley
Copy link
Contributor Author

lpulley commented Oct 8, 2024

Could you please add a CHANGELOG note to mentioned what was fixed?

Done!

@lpulley lpulley requested a review from aignas October 8, 2024 14:41
@lpulley lpulley force-pushed the fix-pip-compile-py-binary-env branch from 5d26d19 to 6c29c8a Compare October 8, 2024 14:41

py_binary(
name = name + ".update",
env = env,
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm surprised that we need the fake USERPROFILE only for _test and not for .update too.

Why is that the case?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well... X_test runs as a Bazel action. X.update is only expected to be invoked by the user directly, in a normal environment.

Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like a possible source of confusion to have different behavior here, but I trust your (and @aignas's) judgement on this.

@lpulley lpulley force-pushed the fix-pip-compile-py-binary-env branch from 6c29c8a to f66e55a Compare October 9, 2024 13:39
Copy link
Collaborator

@aignas aignas left a comment

Choose a reason for hiding this comment

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

Thank you!

@aignas aignas added this pull request to the merge queue Oct 9, 2024
Merged via the queue into bazelbuild:main with commit 83eb5e8 Oct 9, 2024
4 checks passed
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.

regression: pip_compile ignores env attribute
3 participants