Skip to content
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

Forthcoming Bazel 6 release breaks Drake's python coverage support #18615

Closed
rpoyner-tri opened this issue Jan 18, 2023 · 2 comments · Fixed by #18616
Closed

Forthcoming Bazel 6 release breaks Drake's python coverage support #18615

rpoyner-tri opened this issue Jan 18, 2023 · 2 comments · Fixed by #18616
Assignees
Labels
component: build system Bazel, CMake, dependencies, memory checkers, linters type: bug

Comments

@rpoyner-tri
Copy link
Contributor

What happened?

I let the Ubuntu update tools bump bazel to 6.0, then tried to do a bazel test --config kcov build. It fails, with stack traces from the bazel-generated python wrapper stubs when trying to collect python coverage data.

Version

cb7d2b7

What operating system are you using?

Ubuntu 20.04

What installation option are you using?

compiled from source code using Bazel

Relevant log output

rico@puget-161804-10:~/checkout/drake$ bazel --version
bazel 6.0.0
rico@puget-161804-10:~/checkout/drake$ bazel test --config kcov //bindings/pydrake/common/... 
Starting local Bazel server and connecting to it...
INFO: Analyzed 27 targets (229 packages loaded, 15822 targets configured).
INFO: Found 27 test targets...
FAIL: //bindings/pydrake/common:py/eigen_pybind_test (see /home/rico/.cache/bazel/_bazel_rico/7f8997f28c9253517a55d673c67a6c74/execroot/drake/bazel-out/k8-opt/testlogs/bindings/pydrake/common/py/eigen_pybind_test/test.log)
INFO: From Testing //bindings/pydrake/common:py/eigen_pybind_test:
==================== Test output for //bindings/pydrake/common:py/eigen_pybind_test:
Traceback (most recent call last):
  File "/home/rico/.cache/bazel/_bazel_rico/7f8997f28c9253517a55d673c67a6c74/execroot/drake/bazel-out/k8-opt/bin/bindings/pydrake/common/py/eigen_pybind_test.runfiles/drake/bindings/pydrake/common/py/eigen_pybind_test", line 541, in <module>
    Main()
  File "/home/rico/.cache/bazel/_bazel_rico/7f8997f28c9253517a55d673c67a6c74/execroot/drake/bazel-out/k8-opt/bin/bindings/pydrake/common/py/eigen_pybind_test.runfiles/drake/bindings/pydrake/common/py/eigen_pybind_test", line 527, in Main
    ExecuteFile(
  File "/home/rico/.cache/bazel/_bazel_rico/7f8997f28c9253517a55d673c67a6c74/execroot/drake/bazel-out/k8-opt/bin/bindings/pydrake/common/py/eigen_pybind_test.runfiles/drake/bindings/pydrake/common/py/eigen_pybind_test", line 343, in ExecuteFile
    ret_code = _RunForCoverage(python_program, main_filename, args, env,
  File "/home/rico/.cache/bazel/_bazel_rico/7f8997f28c9253517a55d673c67a6c74/execroot/drake/bazel-out/k8-opt/bin/bindings/pydrake/common/py/eigen_pybind_test.runfiles/drake/bindings/pydrake/common/py/eigen_pybind_test", line 380, in _RunForCoverage
    with open(rcfile_name, "w") as rcfile:
FileNotFoundError: [Errno 2] No such file or directory: '/home/rico/.cache/bazel/_bazel_rico/7f8997f28c9253517a55d673c67a6c74/execroot/drake/bazel-out/k8-opt/testlogs/bindings/pydrake/common/py/eigen_pybind_test/test.outputs/kcov/.coveragerc'
================================================================================
...
@rpoyner-tri rpoyner-tri added type: bug component: build system Bazel, CMake, dependencies, memory checkers, linters labels Jan 18, 2023
@rpoyner-tri rpoyner-tri self-assigned this Jan 18, 2023
@rpoyner-tri
Copy link
Contributor Author

Patch in progress.

@rpoyner-tri
Copy link
Contributor Author

See #18616

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: build system Bazel, CMake, dependencies, memory checkers, linters type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant