Skip to content

Bazel@Head fails because bzlmod example test relies on tilde in repo names #2105

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

Closed
sgowroji opened this issue Aug 1, 2024 · 4 comments · Fixed by #2119
Closed

Bazel@Head fails because bzlmod example test relies on tilde in repo names #2105

sgowroji opened this issue Aug 1, 2024 · 4 comments · Fixed by #2119

Comments

@sgowroji
Copy link
Contributor

sgowroji commented Aug 1, 2024

CI: https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/4026#_

Platform: Multiple

Logs:

FAIL: �[0m//:test_with_transition (Exit 1) (see /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/0acef35a08d1e3c67dd20c415a7fc51f/execroot/_main/bazel-out/k8-fastbuild-ST-b38abb23f0a1/testlogs/test_with_transition/test.log)
FAIL: test_coverage_sys_path (__main__.ExampleTest)
Error: unexpectedly None : Expected to find toolchain coverage, but it was not found.
FAIL: �[0m//:test (Exit 1) (see /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/0acef35a08d1e3c67dd20c415a7fc51f/execroot/_main/bazel-out/k8-fastbuild/testlogs/test/test.log)
FAIL: test_coverage_sys_path (__main__.ExampleTest)
Error: unexpectedly None : Expected to find toolchain coverage, but it was not found.
Error: The command exited with status 1�[0m
error: The plugin docker command hook exited with status 1

Culprit:

CC Greenteam @fweikert

@sgowroji
Copy link
Contributor Author

sgowroji commented Aug 9, 2024

CC @rickeylev

@rickeylev
Copy link
Collaborator

I wasn't able to repro this. Is this happening, still?

Posterity: it looks like this occurs in the examples/bzlmod workspace in rules_python

@rickeylev
Copy link
Collaborator

I can repro now. It requires running bazel coverage, not build.

@rickeylev
Copy link
Collaborator

I think I found the problem: The separator char between bzlmod repo names changed to + instead of ~. This is due to bazelbuild/bazel#23098. There was an incompatible flag, so I'm surprised this didn't get reported earlier.

In any case, we can fix the rules_python test. It's just trying to verify the order of some paths and including the ~ character to be more certain about what it's matching. It's easy to change it to match either plus or tilde.

@rickeylev rickeylev changed the title [Bazel CI] test and test_with_transition testcases are failed at Bazel@Head Bazel@Head fails because bzlmod example test relies on tilde in repo names Aug 13, 2024
github-merge-queue bot pushed a commit that referenced this issue Aug 13, 2024
Bazel is changing its separate character from tilde (`~`) to plus (`+`)
to address a performance issue on Windows. The test was using tilde to
help match files of interest.

To fix, have the test look for either tilde or plus.

Fixes #2105
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 a pull request may close this issue.

2 participants