Skip to content

Fetch pixi.toml directly from a git repository clone. #806

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

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

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
@@ -37,7 +37,7 @@ RUN powershell -noexit "Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((
# Install dependencies via pixi
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!

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.

3 participants