Closed BenTheElder closed 5 years ago
the last bit is probably the relevant part:
File "/private/var/tmp/_bazel_bentheelder/4c072a8c986e7dd2b494f380f92d80d4/execroot/io_k8s_test_infra/bazel-out/darwin-fastbuild/bin/experiment/generate_tests.runfiles/io_k8s_test_infra/experiment/generate_tests.py", line 69, in get_sha1_hash
sha1_hash.update(data)
TypeError: Unicode-objects must be encoded before hashing
I suspect we're not forcing the right python version
this also fails on my linux workstation with 0.28.1
symlinking bazel to bazelisk results in the same issue.
@BenTheElder
It appears that since bazel 0.25.0 the default python version for py_binary
is python3.
So, while this file was written for python2 (inferred from the fact that hashlib
accepts a str
in python2 and bytes
in python3) it is running under python3, which like you suggest explains the encoding error.
I am actively working on python2 -> python3 migration, so I will go ahead and apply the updates to this script (and BUILD
) and send out a PR.
thank you!
On Wed, Jul 31, 2019 at 4:08 PM Kubernetes Prow Robot < notifications@github.com> wrote:
Closed #13693 https://github.com/kubernetes/test-infra/issues/13693 via
13702 https://github.com/kubernetes/test-infra/pull/13702.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kubernetes/test-infra/issues/13693?email_source=notifications&email_token=AAHADKZ7MJ2UN7Y6RQYI6OTQCILONA5CNFSM4IIAR4NKYY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOSZ6UBFY#event-2524790935, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHADKZDJ6KVQGMRS7FHFYLQCILONANCNFSM4IIAR4NA .
on macOS with bazel 0.28.1 gives a ton of output and fails, this is what was left in my buffer: