ros-infrastructure / ros_buildfarm

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

Dockerfile generation fails with new EmPy 4.0.0 #1014

Open mikaelarguedas opened 10 months ago

mikaelarguedas commented 10 months ago

EmPy 4.0.0 was released on November 30

Jobs relying on ros_buildfarm started failing with the following error:

  File "/usr/local/lib/python3.12/site-packages/ros_buildfarm/templates/__init__.py", line 165, in create_dockerfile
    content = expand_template(template_name, data)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/ros_buildfarm/templates/__init__.py", line 102, in expand_template
    interpreter.string(content, template_path, locals=data)
TypeError: Interpreter.string() got multiple values for argument 'locals'

I didnt find a test or simple reproducing example on this repository.

An example of such failing job: https://github.com/osrf/docker_images/actions/runs/7056402886/job/19208326490

It can be reproduced with:

cd /tmp
git clone git@github.com:osrf/docker_images.git -b empy_400_error
cd docker_images/docker
make build
./run.sh bash
cd ros
./create_dockerfolders.py dir -d . -a

When reverting empy to v 3.3.4 we can see that the error doesnt occur

tfoote commented 6 months ago

This is something we need to resolve

On rocker I did this: https://github.com/osrf/rocker/pull/261 There's a more complicated system with migration on colcon that @cottsay is working on https://github.com/colcon/colcon-core/pull/627/files

tfoote commented 6 months ago

This is pinned down for CI in #1015 which should be reverted when this is resolved.