Open
Description
https://github.com/mvukov/rules_ros/releases/tag/v0.2.0 turns out to be incomplete
- Since we support Bazel 6.x (in the current BCR config), WORKSPACE file needs to exist in the root of the repo
- https://github.com/mvukov/rules_ros/blob/v0.2.0/.bcr/presubmit.yml#L2 tests the examples folder (which is fine).
- BCR PR [email protected] bazelbuild/bazel-central-registry#3471
- The chatter test fails https://buildkite.com/bazel/bcr-presubmit/builds/9642#0193f47d-288b-4a3b-9b6e-b2fca1c50ec2:
... logging to /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/27dd0e5810ffc8cf2b9672226d831285/sandbox/linux-sandbox/163/execroot/_main/bazel-out/k8-fastbuild/testlogs/chatter/talker_tests/test.outputs/rostest-bk-docker-92ms-12.log
[ROSUNIT] Outputting test results to /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/27dd0e5810ffc8cf2b9672226d831285/sandbox/linux-sandbox/163/execroot/_main/bazel-out/k8-fastbuild/testlogs/chatter/talker_tests/test.outputs/results.xml
[Testcase: testadvertisetest] ... ERROR!
ERROR: Unable to contact my own server at [http://bk-docker-92ms:43971/].
This usually means that the network is not configured properly.
A common cause is that the machine cannot connect to itself. Please check
for errors by running:
ping bk-docker-92ms
For more tips, please see
http://wiki.ros.org/ROS/NetworkSetup
File "/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/27dd0e5810ffc8cf2b9672226d831285/execroot/_main/external/rules_python~~python~python_3_10_x86_64-unknown-linux-gnu/lib/python3.10/unittest/case.py", line 59, in testPartExecutor
yield
File "/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/27dd0e5810ffc8cf2b9672226d831285/execroot/_main/external/rules_python~~python~python_3_10_x86_64-unknown-linux-gnu/lib/python3.10/unittest/case.py", line 587, in run
self._callSetUp()
File "/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/27dd0e5810ffc8cf2b9672226d831285/execroot/_main/external/rules_python~~python~python_3_10_x86_64-unknown-linux-gnu/lib/python3.10/unittest/case.py", line 546, in _callSetUp
self.setUp()
File "/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/27dd0e5810ffc8cf2b9672226d831285/sandbox/linux-sandbox/163/execroot/_main/bazel-out/k8-fastbuild/bin/chatter/talker_tests.runfiles/rules_ros~/third_party/ros/rostest/runner.py", line 221, in setUp
self.test_parent.setUp()
File "/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/27dd0e5810ffc8cf2b9672226d831285/sandbox/linux-sandbox/163/execroot/_main/bazel-out/k8-fastbuild/bin/chatter/talker_tests.runfiles/rules_ros~/third_party/ros/rostest/rostest_parent.py", line 99, in setUp
self._start_infrastructure()
File "/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/27dd0e5810ffc8cf2b9672226d831285/sandbox/linux-sandbox/163/execroot/_main/bazel-out/k8-fastbuild/bin/chatter/talker_tests.runfiles/rules_ros~/third_party/ros/roslaunch/parent.py", line 290, in _start_infrastructure
self._start_server()
File "/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/27dd0e5810ffc8cf2b9672226d831285/sandbox/linux-sandbox/163/execroot/_main/bazel-out/k8-fastbuild/bin/chatter/talker_tests.runfiles/rules_ros~/third_party/ros/roslaunch/parent.py", line 241, in _start_server
self.server.start()
File "/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/27dd0e5810ffc8cf2b9672226d831285/sandbox/linux-sandbox/163/execroot/_main/bazel-out/k8-fastbuild/bin/chatter/talker_tests.runfiles/rules_ros~/third_party/ros/roslaunch/server.py", line 429, in start
raise RLException("""Unable to contact my own server at [%s].
--------------------------------------------------------------------------------
[Testcase: testpublishtest] ... ERROR!
ERROR: Unable to contact my own server at [http://bk-docker-92ms:35775/].
This usually means that the network is not configured properly.
A common cause is that the machine cannot connect to itself. Please check
for errors by running:
ping bk-docker-92ms
For more tips, please see
http://wiki.ros.org/ROS/NetworkSetup
File "/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/27dd0e5810ffc8cf2b9672226d831285/execroot/_main/external/rules_python~~python~python_3_10_x86_64-unknown-linux-gnu/lib/python3.10/unittest/case.py", line 59, in testPartExecutor
yield
File "/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/27dd0e5810ffc8cf2b9672226d831285/execroot/_main/external/rules_python~~python~python_3_10_x86_64-unknown-linux-gnu/lib/python3.10/unittest/case.py", line 587, in run
self._callSetUp()
File "/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/27dd0e5810ffc8cf2b9672226d831285/execroot/_main/external/rules_python~~python~python_3_10_x86_64-unknown-linux-gnu/lib/python3.10/unittest/case.py", line 546, in _callSetUp
self.setUp()
File "/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/27dd0e5810ffc8cf2b9672226d831285/sandbox/linux-sandbox/163/execroot/_main/bazel-out/k8-fastbuild/bin/chatter/talker_tests.runfiles/rules_ros~/third_party/ros/rostest/runner.py", line 221, in setUp
self.test_parent.setUp()
File "/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/27dd0e5810ffc8cf2b9672226d831285/sandbox/linux-sandbox/163/execroot/_main/bazel-out/k8-fastbuild/bin/chatter/talker_tests.runfiles/rules_ros~/third_party/ros/rostest/rostest_parent.py", line 99, in setUp
self._start_infrastructure()
File "/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/27dd0e5810ffc8cf2b9672226d831285/sandbox/linux-sandbox/163/execroot/_main/bazel-out/k8-fastbuild/bin/chatter/talker_tests.runfiles/rules_ros~/third_party/ros/roslaunch/parent.py", line 290, in _start_infrastructure
self._start_server()
File "/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/27dd0e5810ffc8cf2b9672226d831285/sandbox/linux-sandbox/163/execroot/_main/bazel-out/k8-fastbuild/bin/chatter/talker_tests.runfiles/rules_ros~/third_party/ros/roslaunch/parent.py", line 241, in _start_server
self.server.start()
File "/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/27dd0e5810ffc8cf2b9672226d831285/sandbox/linux-sandbox/163/execroot/_main/bazel-out/k8-fastbuild/bin/chatter/talker_tests.runfiles/rules_ros~/third_party/ros/roslaunch/server.py", line 429, in start
raise RLException("""Unable to contact my own server at [%s].
--------------------------------------------------------------------------------
[ROSTEST]-----------------------------------------------------------------------
SUMMARY
�[1;31m * RESULT: FAIL�[0m
* TESTS: 0
�[1;31m * ERRORS: 2�[0m
* FAILURES: 0
rostest log file is in /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/27dd0e5810ffc8cf2b9672226d831285/sandbox/linux-sandbox/163/execroot/_main/bazel-out/k8-fastbuild/testlogs/chatter/talker_tests/test.outputs/rostest-bk-docker-92ms-12.log
I saw something similar like this in this failed action: https://github.com/mvukov/rules_ros/actions/runs/12435495796/job/34721453787#step:4:98
2024/12/20 17:09:39 Downloading https://releases.bazel.build/7.4.1/release/bazel-7.4.1-linux-x86_64...
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
INFO: Invocation ID: c73879b4-6532-4b8f-8db1-0748dacb3f1c
INFO: Reading 'startup' options from /home/runner/.bazelrc: --output_base=/home/runner/.bazel
INFO: Options provided by the client:
Inherited 'common' options: --isatty=0 --terminal_columns=80
INFO: Reading rc options for 'test' from /home/runner/work/rules_ros/rules_ros/.bazelrc:
Inherited 'build' options: --noincompatible_sandbox_hermetic_tmp --incompatible_default_to_explicit_init_py --cxxopt=-std=c++17 --@rules_python//python/config_settings:python_version=3.10 --sandbox_default_allow_network=false --incompatible_strict_action_env --heap_dump_on_oom --noexperimental_check_output_files --nolegacy_external_runfiles
INFO: Reading rc options for 'test' from /home/runner/.bazelrc:
Inherited 'build' options: --disk_cache=/home/runner/.cache/bazel-disk --repository_cache=/home/runner/.cache/bazel-repo
INFO: Reading rc options for 'test' from /home/runner/work/rules_ros/rules_ros/.github/workflows/ci.bazelrc:
Inherited 'build' options: --announce_rc --repository_cache=/github/home/.cache/bazel-repo --show_progress_rate_limit=60
INFO: Reading rc options for 'test' from /home/runner/work/rules_ros/rules_ros/.bazelrc:
'test' options: --build_tests_only
INFO: Reading rc options for 'test' from /home/runner/work/rules_ros/rules_ros/.github/workflows/ci.bazelrc:
'test' options: --test_output=errors --test_env=XDG_CACHE_HOME
Computing main repo mapping:
Loading:
Loading: 1 packages loaded
Analyzing: 10 targets (13 packages loaded, 0 targets configured)
Analyzing: 10 targets (13 packages loaded, 0 targets configured)
INFO: Analyzed 10 targets (244 packages loaded, 11646 targets configured).
INFO: From Compiling src/signalhandler.cc:
external/glog~/src/signalhandler.cc: In function 'void google::{anonymous}::DumpStackFrameInfo(const char*, void*)':
external/glog~/src/signalhandler.cc:247:112: note: '#pragma message: Symbolize functionality is not available for target platform: stack dump will contain empty frames.'
247 | "Symbolize functionality is not available for target platform: stack dump will contain empty frames.")
| ^
[251 / 297] 1 / 10 tests; Compiling clients/roscpp/src/libros/connection_manager.cpp; 3s disk-cache, linux-sandbox ... (5 actions, 3 running)
FAIL: //test/rostest:simple_tests_ros (see /home/runner/.bazel/execroot/_main/bazel-out/k8-fastbuild/testlogs/test/rostest/simple_tests_ros/test.log)
==================== Test output for //test/rostest:simple_tests_ros:
... logging to /home/runner/.bazel/sandbox/linux-sandbox/183/execroot/_main/bazel-out/k8-fastbuild/testlogs/test/rostest/simple_tests_ros/test.outputs/rostest-fv-az847-313-12.log
INFO: From Testing //test/rostest:simple_tests_ros:
[ROSUNIT] Outputting test results to /home/runner/.bazel/sandbox/linux-sandbox/183/execroot/_main/bazel-out/k8-fastbuild/testlogs/test/rostest/simple_tests_ros/test.outputs/results.xml
[Testcase: testsimple_tests] ... ERROR!
ERROR: Unable to contact my own server at [http://fv-az847-313:33487/].
This usually means that the network is not configured properly.
A common cause is that the machine cannot connect to itself. Please check
for errors by running:
ping fv-az847-313
For more tips, please see
http://wiki.ros.org/ROS/NetworkSetup
File "/home/runner/.bazel/execroot/_main/external/rules_python~~python~python_3_10_x86_64-unknown-linux-gnu/lib/python3.10/unittest/case.py", line 59, in testPartExecutor
yield
File "/home/runner/.bazel/execroot/_main/external/rules_python~~python~python_3_10_x86_64-unknown-linux-gnu/lib/python3.10/unittest/case.py", line 587, in run
self._callSetUp()
File "/home/runner/.bazel/execroot/_main/external/rules_python~~python~python_3_10_x86_64-unknown-linux-gnu/lib/python3.10/unittest/case.py", line 546, in _callSetUp
self.setUp()
File "/home/runner/.bazel/sandbox/linux-sandbox/183/execroot/_main/bazel-out/k8-fastbuild/bin/test/rostest/simple_tests_ros.runfiles/_main/third_party/ros/rostest/runner.py", line 221, in setUp
self.test_parent.setUp()
File "/home/runner/.bazel/sandbox/linux-sandbox/183/execroot/_main/bazel-out/k8-fastbuild/bin/test/rostest/simple_tests_ros.runfiles/_main/third_party/ros/rostest/rostest_parent.py", line 99, in setUp
self._start_infrastructure()
File "/home/runner/.bazel/sandbox/linux-sandbox/183/execroot/_main/bazel-out/k8-fastbuild/bin/test/rostest/simple_tests_ros.runfiles/_main/third_party/ros/roslaunch/parent.py", line 290, in _start_infrastructure
self._start_server()
File "/home/runner/.bazel/sandbox/linux-sandbox/183/execroot/_main/bazel-out/k8-fastbuild/bin/test/rostest/simple_tests_ros.runfiles/_main/third_party/ros/roslaunch/parent.py", line 241, in _start_server
self.server.start()
File "/home/runner/.bazel/sandbox/linux-sandbox/183/execroot/_main/bazel-out/k8-fastbuild/bin/test/rostest/simple_tests_ros.runfiles/_main/third_party/ros/roslaunch/server.py", line 429, in start
raise RLException("""Unable to contact my own server at [%s].
--------------------------------------------------------------------------------
[ROSTEST]-----------------------------------------------------------------------
SUMMARY
* RESULT: FAIL
* TESTS: 0
* ERRORS: 1
* FAILURES: 0
rostest log file is in /home/runner/.bazel/sandbox/linux-sandbox/183/execroot/_main/bazel-out/k8-fastbuild/testlogs/test/rostest/simple_tests_ros/test.outputs/rostest-fv-az847-313-12.log
================================================================================
INFO: Found 10 test targets...
INFO: Elapsed time: 121.327s, Critical Path: 20.38s
INFO: 306 processes: 113 internal, 193 linux-sandbox.
INFO: Build completed, 1 test FAILED, 306 total actions
//test/rostest:roslaunch_tests PASSED in 0.1s
//test/rostest:simple_tests PASSED in 0.1s
//third_party/ros/roslaunch:roscore_pylint PASSED in 5.2s
//third_party/ros/roslaunch:roslaunch_pylint PASSED in 12.6s
//third_party/ros/rostest:advertisetest_impl_pylint PASSED in 4.5s
//third_party/ros/rostest:hztest_impl_pylint PASSED in 5.9s
//third_party/ros/rostest:paramtest_impl_pylint PASSED in 4.9s
//third_party/ros/rostest:publishtest_impl_pylint PASSED in 5.6s
//third_party/ros/rostest:rostest_pylint PASSED in 7.7s
//test/rostest:simple_tests_ros FAILED in 7.2s
/home/runner/.bazel/execroot/_main/bazel-out/k8-fastbuild/testlogs/test/rostest/simple_tests_ros/test.log
Executed 10 out of 10 tests: 9 tests pass and 1 fails locally.
Error: Process completed with exit code 3.
For this reason I decided to reuse the main test job from this repo, see #96.
To be investigated what's wrong with the network setup, I guess.
We already use https://github.com/mvukov/rules_ros/blob/v0.2.0/.bazelrc#L23 that should provide network isolation in tests.
Metadata
Metadata
Assignees
Labels
No labels