-
Notifications
You must be signed in to change notification settings - Fork 691
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
Forward new provider for python in filter_layer #697
Conversation
PyInfo, from Bazel >= 0.23.0, is forwarded if available, otherwise the old py attribute is forwarded for backwards compatibility
Hi @aaliddell. Thanks for your PR. I'm waiting for a bazelbuild member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Ah, unfortunately Starlark behaves slightly differently from what I expected from full Python when using identifiers that are not defined in a not-taken branch. I can't see an obvious way around this to allow picking the correct provider when Perhaps instead of proxying an externally created |
Hi @aaliddell, thanks for sending the PR. We can wait until Bazel 0.23.0 is out before making this change. And once the --incompatible_disallow_legacy_py_provider flag is flipped in either Bazel 0.24.0 or 0.25.0, we can remove forwarding legacy py provider at all. |
Ok. If you're going to require Bazel 0.23.0 anyway, you might as well always forward the PyInfo provider to match the behaviour of the built-in python rules, such as (not tested):
Then in 0.24.0 or 0.25.0, the branch containing py can be dropped. |
Yes. We can hold on this until Bazel 0.23.0 is out. |
I've implemented the proposed change assuming 0.23.0+, which was just released. Once things have settled and the CI version has been updated, this can be retested. |
CI has switched to 0.23.1 and the tests passed. Can you fix the buildifier issue? |
The buildifier issue appears to have come in with the merge from master and the output on buildkite contains no useful info. Any ideas what it might be complaining about? |
It's because Buildifier on Buildkite CI is upgraded today bazelbuild/continuous-integration@6d48796. Hold on a little on this PR and we will fix it. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: aaliddell, xingao267 If they are not already assigned, you can assign the PR to them by writing The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
In upcoming Bazel 0.23.0, the legacy
py
provider has been changed toPyInfo
, with both being allowed to work currently. However, in a future release the use ofpy
will be not be permitted, which can be simulated with--incompatible_disallow_legacy_py_provider
.This change forwards the old
py
provider infilter_layer
in older Bazel, andPyInfo
in newer Bazel and has been tested to work correctly when--incompatible_disallow_legacy_py_provider
is enabled. Prior to this change,filter_layer
would fail when run in this mode.