Fetch pixi.toml directly from a git repository clone.#806
Open
nuclearsandwich wants to merge 13 commits intomasterfrom
Open
Fetch pixi.toml directly from a git repository clone.#806nuclearsandwich wants to merge 13 commits intomasterfrom
nuclearsandwich wants to merge 13 commits intomasterfrom
Conversation
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
commented
Mar 22, 2025
| 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 |
Member
Author
There was a problem hiding this comment.
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.
Member
Author
|
This will probably need to be de-conflicted with #807 depending on which merges first. |
Member
Author
Yadunund
approved these changes
Apr 3, 2025
Member
|
@nuclearsandwich is this one good to go? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.