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

Fix pytest-rerunfailures installation by using apt instead of pip #1020

Conversation

Crola1702
Copy link
Contributor

See ros2/ci#744

I used the same template as install_python3.Dockerfile.em for pytest-rerunfailures package

Signed-off-by: Cristóbal Arroyo <j.arroyo@uniandes.edu.co>
@@ -0,0 +1,4 @@
@[if os_name == 'debian' or os_name == 'ubuntu' and os_code_name in ['jammy', 'noble']]@

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you need to match the debian os_code_names as well otherwise this if won't be triggered on debian.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I honestly wouldn't even bother with the os_code_name check. All of the Debian or Ubuntu distributions we support have this package in them.

os_name=os_name,
os_code_name=os_code_name,
))@
RUN pip3 install -U setuptools==59.6.0
Copy link

@claraberendsen claraberendsen Jan 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@clalancette should we pin it for any other os distro that does not have it upstream? Not sure if we still have focal on build.ros2.org.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, all of focal is gone, so we don't need to worry about it anymore.

Signed-off-by: Cristóbal Arroyo <j.arroyo@uniandes.edu.co>
Copy link
Contributor

@clalancette clalancette left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change looks reasonable to me. Is there any way to test it without deploying it?

@Crola1702
Copy link
Contributor Author

Crola1702 commented Jan 30, 2024

Is there any way to test it without deploying it?

Maybe @cottsay or @nuclearsandwich know better

@nuclearsandwich
Copy link
Contributor

Is there any way to test it without deploying it?

You can run a devel job locally when set up:

mkdir /tmp/devel-test
generate_devel_script.py https://raw.githubusercontent.com/ros2/ros_buildfarm_config/ros2/index.yaml rolling default rcl ubuntu jammy amd64 > /tmp/devel-test/run.sh

Since the ros_buildfarm scripts assume that your local branch name when generating is available in the origin remote, you either need to change origin or push the branch to the root repository rather than a fork. I did the latter in this case.

Copy link
Contributor

@nuclearsandwich nuclearsandwich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a small part of me which feels snippeting this is overkill, but not enough to block it as is. The local test I outlined gets the official Works On My Machine stamp of approval as well.

@nuclearsandwich nuclearsandwich merged commit bf2bd68 into ros-infrastructure:master Jan 31, 2024
3 of 44 checks passed
@cottsay
Copy link
Member

cottsay commented Mar 13, 2024

This did regress CI after all. The job "ROS 1 Devel (3.6, colcon)" fails with:

  #22 0.326 Hit:1 http://repositories.ros.org/ubuntu/testing focal InRelease
  #22 0.916 Hit:2 http://security.ubuntu.com/ubuntu focal-security InRelease
  #22 0.956 Hit:3 http://archive.ubuntu.com/ubuntu focal InRelease
  #22 1.053 Hit:4 http://archive.ubuntu.com/ubuntu focal-updates InRelease
  #22 1.148 Hit:5 http://archive.ubuntu.com/ubuntu focal-backports InRelease
  #22 1.243 Hit:6 http://archive.ubuntu.com/ubuntu focal-security InRelease
  #22 1.300 Reading package lists...
  #22 2.146 Reading package lists...
  #22 2.960 Building dependency tree...
  #22 3.134 Reading state information...
  #22 3.149 Package python3-pytest-rerunfailures is not available, but is referred to by another package.
  #22 3.149 This may mean that the package is missing, has been obsoleted, or
  #22 3.149 is only available from another source
  #22 3.149 
  #22 3.152 E: Package 'python3-pytest-rerunfailures' has no installation candidate

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 this pull request may close these issues.

5 participants