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
Test logs not copied to bazel-testlogs when test target has incoming edge transition #13674
Comments
Something I've noticed is a difference in the test output paths. When changing the data to make the test fail, we can see the following paths.
I suspect that bazel is copying everything from |
Thanks for the clear & easy repro, @prestonvanloon . This is a known design blemish. Your second comment is spot on with the analysis. Transitions change output directory bases to prevent the same action configured in two different ways in the same build to write to the same output (which wouldn't be safe). The logic that sets This hasn't been solved yet because it's not a trivial fix. The symlink logic may be able to merge both results into the same base, if the actual outputs never clash. Alternatively, each configuration could appear in its own subdirectory under This is probably less pressing than symlinks like This flag speaks to the issue somewhat, although I think it's logic is too simple for your use case. I'd love to see this cleaned up as a design / feature request. I'm not aware of anyone with the bandwidth to try tackling it now. I don't think it has to be a huge project. But it does need to be consciously thought out. |
Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 14 days unless any other activity occurs or one of the following labels is added: "not stale", "awaiting-bazeler". Please reach out to the triage team ( |
@bazelbuild/triage I believe this is still an issue. Thanks |
Description of the problem:
When running
bazel test
on a test target with an starlark incoming edge transition, no test outputs are copied to bazel-testlogs directory.Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
I've made a minimal reproduction repository here: https://github.com/prestonvanloon/bazel-starlark-edge-transition-bug
What operating system are you running Bazel on?
linux - ubuntu 20.04
What's the output of
bazel info release
?release 4.1.0
If
bazel info release
returns "development version" or "(@non-git)", tell us how you built Bazel.N/A
What's the output of
git remote get-url origin ; git rev-parse master ; git rev-parse HEAD
?N/A
Have you found anything relevant by searching the web?
No
Any other information, logs, or outputs that you want to share?
With the example repo linked above, here are some notes:
We expect a test target with an incoming edge transition would behave the same as one without an incoming edge transition.
When running these two targets, we expect to see the test outputs under bazel-testlogs.
However, we only see testlogs for
//:80columns
.We should have seen the same outputs for the transition test, but nothing was copied.
You can also reproduce the issue by running only the test target
bazel test //:80columns_with_transition
and seeing that bazel-testlogs does not have anything from that target.The text was updated successfully, but these errors were encountered: