-
Notifications
You must be signed in to change notification settings - Fork 136
Not working with bazel 0.25rc1 #305
Comments
looking into this now |
Hi @Globegitter , |
Nicolas, your repro attempt is being foiled by bazelbuild/bazel#4815. That bug means that regardless of what Python version is decided for a target, the actual Python interpreter invoked at execution time is, by default, the "python" command on |
thanks for the clarifications. I am able to reproduce this by passing a |
thanks again for clarifications @brandjon,
I'm pretty sure this is a bug in bazel 0.25.1 (or I need to pass some other extra flag for host python outputs to be produced correctly?) |
Unfortunately we don't have granular control over the host configuration, so all targets built in the host configuration have the same Python version, which now defaults to PY3. See bazelbuild/bazel#6443. A rather coarse-grained workaround is to override all host tools to PY2 with |
more context in response here: https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/bazel-sig-python/cZvjanFL1AM/ZpjOweVyBwAJ @brandjon does that mean that all rules_docker and rules_k8s builds will start failing with 0.25.x or some upcoming version (i.e., is the switch to PY3 as default python version coming out before exec configuration is rolled out) unless we use @Globegitter as per @brandjon we wont be able to use this feature of 0.25.0 until the exec configuration is introduced. |
Note that in 0.25, the default host Python version is already PY3. But without the new It might be a few releases before the exec configuration is available and even then it'll be on a case-by-case basis as each rule type needs to adapt to use it. What rule do you have that relies on a Python target in host configuration? Is it a genrule? |
+@katre, FYI. |
thanks for the additional comments. |
I also have several other Starlark rules that have similar dependencies on python targets |
FYI rules_k8s is among the projects that fail on buildkite in the incompatible change pipeline, and that should therefore have |
Which versions does rules_k8s work with now? Can you go all the way to 0.27? |
@mariusgrigoriu afaik, yes. Please do let us know if you see any issues. |
The latest rc changed the default python version to py3 so now we are seeing:
Fixing this should be as easy as explicitly setting the
python_version
toPY2
on the binaries.The text was updated successfully, but these errors were encountered: