ros-infrastructure / ros_buildfarm

ROS buildfarm based on Docker
Apache License 2.0
81 stars 96 forks source link

BuildFarm doc is broken for humble and iron #1001

Open cdhabecker opened 1 year ago

cdhabecker commented 1 year ago

Error: Unknown release: 'indigo'. Valid release names are: 'melodic', 'noetic'

Error: based on the current index.yaml, this build infra does not support Iron. So where's the ROS 2 buildfarm infra?

The path that I followed:

  1. Build Farms
  2. At FAQ-2: "...you can run the release jobs locally."
  3. "you need to setup your environment with the necessary Python packages."
  4. "Example: generate_release_script.py https://raw.githubusercontent.com/ros-infrastructure/ros_buildfarm_config/production/index.yaml indigo default roscpp ubuntu trusty amd64 > /tmp/release_job/release_job_indigo_roscpp.sh"

Problems:

  1. generate_release_script.py fails because the environment setup instructions install PyYAML 6.0, which no longer allows a long-deprecated usage: TypeError: load() missing 1 required positional argument: 'Loader'
  2. I worked around problem 1 by setting up the environment again from scratch, specifying a constraints file:
    (venv)$ echo "PyYAML<6.0" > ros_buildfarm_venv/constraints.txt
    (venv)$ pip3 install -c ros_buildfarm_venv/constraints.txt empy
    (venv)$ pip3 install -c ros_buildfarm_venv/constraints.txt jenkinsapi
    (venv)$ pip3 install -c ros_buildfarm_venv/constraints.txt rosdistro
  3. Fails because indigo is unknown.
    (venv)$ generate_release_script.py https://raw.githubusercontent.com/ros-infrastructure/ros_buildfarm_config/production/index.yaml indigo default roscpp ubuntu trusty amd64 > release_job/release_job_indigo_roscpp.sh
    /home/habecker/ros_buildfarm_venv/lib/python3.10/site-packages/ros_buildfarm/config/__init__.py:35: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
    data = yaml.load(yaml_str)
    Traceback (most recent call last):
    File "/home/habecker/ros_buildfarm_venv/bin/generate_release_script.py", line 144, in <module>
    sys.exit(main())
    File "/home/habecker/ros_buildfarm_venv/bin/generate_release_script.py", line 83, in main
    configure_release_job(
    File "/home/habecker/ros_buildfarm_venv/lib/python3.10/site-packages/ros_buildfarm/release_job.py", line 369, in configure_release_job
    build_files = get_release_build_files(config, rosdistro_name)
    File "/home/habecker/ros_buildfarm_venv/lib/python3.10/site-packages/ros_buildfarm/config/__init__.py", line 59, in get_release_build_files
    data = _get_build_file_data(index, dist_name, 'release_builds')
    File "/home/habecker/ros_buildfarm_venv/lib/python3.10/site-packages/ros_buildfarm/config/__init__.py", line 92, in _get_build_file_data
    raise RuntimeError(
    RuntimeError: Unknown release: 'indigo'. Valid release names are: 'melodic', 'noetic'
cdhabecker commented 1 year ago

The core problem is that the BuildFarm doc became out of date in ROS 1 and has never provided ROS 2 information. Someone set up the ROS 2 build farm, but they didn't figure it out by reading the humble or iron doc.

Because I am compelled to complete the things that I start, I made some educated guesses:

  1. There is no https://github.com/ros2-infrastructure.
  2. Under https://github.com/ros2, there is no "infra" repo, but there are 3 "build" repos, and https://github.com/ros2/ros_buildfarm_config appears to be a peer of https://github.com/ros-infrastructure/ros_buildfarm_config.

The default branch of https://github.com/ros2/ros_buildfarm_config is "ros2", and it appears to be the only branch that is up to date (README says to fork master, but master is old).

I tried the generate script with the ROS 2 yaml. It recognized "iron" this time. And then it didn't recognize roscpp. Come to think of it, neither do I -- I know only ROS 2. It should be rclcpp. And it didn't recognize ubuntu trusty, which is fine -- I'm running jammy anyway. And then it finally generated a script!

(venv)$ generate_release_script.py https://raw.githubusercontent.com/ros2/ros_buildfarm_config/ros2/index.yaml iron default rclcpp ubuntu jammy amd64 > release_job/release_job_iron_rclcpp.sh
/home/habecker/ros_buildfarm_venv/lib/python3.10/site-packages/ros_buildfarm/config/__init__.py:35: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
  data = yaml.load(yaml_str)
/home/habecker/ros_buildfarm_venv/lib/python3.10/site-packages/ros_buildfarm/config/__init__.py:107: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
  return yaml.load(yaml_str)
(venv)$ 

TODO: run the generated script.

Timple commented 7 months ago

Thank you! Took me some searching to arrive at this issue.

I'd say even without the todo, the written part is already worthy of a fix PR I'd say.