Skip to content

Linux jobs failing to run vcs from venv if a system version is installed. #233

@nuclearsandwich

Description

@nuclearsandwich

The batch script expands the vcs binary to its path in the venv and hard codes that path in the command.

vcs_cmd = [
'"%s"' % job.python,
'"%s"' % os.path.join(venv_path, 'bin', 'vcs')]

Recent Linux CI jobs have started omitting vcs from the venv since it is installed on the system already and provided by /usr/bin/vcs

From ci_linux #5955

==> "/home/rosbuild/ci_scripts/venv/bin/python" -m pip install -U EmPy coverage catkin_pkg flake8 flake8-blind-except flake8-builtins flake8-class-newline flake8-comprehensions flake8-deprecated flake8-docstrings flake8-import-order flake8-quotes git+https://github.com/lark-parser/lark.git@8415fa26a3d3d2b81e64e4fe440faab15b53db49 mock nose pep8 pydocstyle pyflakes pyparsing pytest pytest-cov pytest-repeat pytest-rerunfailures pytest-runner pyyaml vcstool colcon-core colcon-defaults colcon-library-path colcon-metadata colcon-output colcon-package-information colcon-package-selection colcon-parallel-executor colcon-powershell colcon-python-setup-py colcon-recursive-crawl colcon-test-result colcon-cmake colcon-ros colcon-bash colcon-zsh
... output elided ...
03:30:01 Collecting vcstool
03:30:01   Downloading https://files.pythonhosted.org/packages/9f/23/0839fbd992b5cc5f7dcb3751e9d8f82eabe5923212e76ddead457dd4a6b0/vcstool-0.1.37-py3-none-any.whl

From ci_linux #5956

==> "/home/rosbuild/ci_scripts/venv/bin/python" -m pip install -U EmPy coverage catkin_pkg flake8 flake8-blind-except flake8-builtins flake8-class-newline flake8-comprehensions flake8-deprecated flake8-docstrings flake8-import-order flake8-quotes git+https://github.com/lark-parser/lark.git@8415fa26a3d3d2b81e64e4fe440faab15b53db49 mock nose pep8 pydocstyle pyflakes pyparsing pytest pytest-cov pytest-repeat pytest-rerunfailures pytest-runner pyyaml vcstool colcon-core colcon-defaults colcon-library-path colcon-metadata colcon-output colcon-package-information colcon-package-selection colcon-parallel-executor colcon-powershell colcon-python-setup-py colcon-recursive-crawl colcon-test-result colcon-cmake colcon-ros colcon-bash colcon-zsh
... output elided ...
Requirement already up-to-date: vcstool in /usr/lib/python3/dist-packages (0.1.38)

But since the script always looks for /home/rosbuild/ci_scripts/venv/bin/vcs this is causing the job to fail.

==> "/home/rosbuild/ci_scripts/venv/bin/python" "/home/rosbuild/ci_scripts/venv/bin/vcs" import "src" --force --retry 5 --input 00-ros2.repos
/home/rosbuild/ci_scripts/venv/bin/python: can't open file '/home/rosbuild/ci_scripts/venv/bin/vcs': [Errno 2] No such file or directory
<== '. ../venv/bin/activate && "/home/rosbuild/ci_scripts/venv/bin/python" "/home/rosbuild/ci_scripts/venv/bin/vcs" import "src" --force --retry 5 --input 00-ros2.repos' exited with return code '2'

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions