Skip to content

Conversation

@nuclearsandwich
Copy link
Member

Using an in-container command to fetch this file prevents docker from invalidating cached copies of the fetch when the remote content changes.

Cloning the git repository may result in overly aggressive cache busting, but using ADD with the githubusercontent url directly will also have problems during iteration as that url is also cached for a period of time and does not update immediately when repository contents change.

Using an in-container command to fetch this file prevents docker from
invalidating cached copies of the fetch when the remote content changes.

Cloning the git repository may result in overly aggressive cache
busting, but using ADD with the githubusercontent url directly will also
have problems during iteration as that url is also cached for a period
of time and does not update immediately when repository contents change.
@nuclearsandwich nuclearsandwich self-assigned this Mar 21, 2025
@nuclearsandwich nuclearsandwich marked this pull request as ready for review March 22, 2025 01:24
ARG ROS_DISTRO=rolling
WORKDIR C:\pixi_ws
RUN powershell -noexit irm https://raw.githubusercontent.com/ros2/ros2/refs/heads/%ROS_DISTRO%/pixi.toml -OutFile pixi.toml
ADD https://raw.githubusercontent.com/ros2/ros2/${ROS_DISTRO}/pixi.toml pixi.toml
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
ADD https://raw.githubusercontent.com/ros2/ros2/${ROS_DISTRO}/pixi.toml pixi.toml
ADD https://raw.githubusercontent.com/ros2/ros2/${ROS_DISTRO}/pixi.toml pixi.toml

Since this command is expanded by docker not CMD or powershell the sh-style variable expansion is what works.

@nuclearsandwich
Copy link
Member Author

This will probably need to be de-conflicted with #807 depending on which merges first.

@nuclearsandwich
Copy link
Member Author

Since this only affects windows builds I only trigger Windows CI:

Build Status

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.

Fine by me!

@mjcarroll
Copy link
Member

@nuclearsandwich is this one good to go?

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