Skip to content
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

[ros] Add ROSDISTRO_PKGS_SYNC_DATE env var #17960

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mikaelarguedas
Copy link
Contributor

This allows user to know on what official package sync the image is based on. This allow them to install any other package of the ecosystem at the same sync date (from http://snapshots.ros.org/noetic/).

This also permits to bust the docker cache when new version of packages are available which has been a long lasting issue osrf/docker_images#112

This allows user to know on what official package sync the image is
based on
This also permits to bust the docker cache when new version of packages
are available which has been a long lasting issue osrf/docker_images#112

Signed-off-by: Mikael Arguedas <[email protected]>
@mikaelarguedas mikaelarguedas requested a review from a team as a code owner November 22, 2024 20:35
Copy link

Diff for 271e32a:
diff --git a/_bashbrew-cat b/_bashbrew-cat
index 956128a..5864fb3 100644
--- a/_bashbrew-cat
+++ b/_bashbrew-cat
@@ -13,7 +13,7 @@ Directory: ros/humble/ubuntu/jammy/ros-base
 
 Tags: humble-ros-core, humble-ros-core-jammy
 Architectures: amd64, arm64v8
-GitCommit: 27cc0b68263bbbb10bb58dd814efc0a6b0a01ec7
+GitCommit: cf1c3c02d0657c05b8b19ac98d58895ff79c989c
 Directory: ros/humble/ubuntu/jammy/ros-core
 
 Tags: iron-perception, iron-perception-jammy
@@ -28,7 +28,7 @@ Directory: ros/iron/ubuntu/jammy/ros-base
 
 Tags: iron-ros-core, iron-ros-core-jammy
 Architectures: amd64, arm64v8
-GitCommit: 27cc0b68263bbbb10bb58dd814efc0a6b0a01ec7
+GitCommit: cf1c3c02d0657c05b8b19ac98d58895ff79c989c
 Directory: ros/iron/ubuntu/jammy/ros-core
 
 Tags: jazzy-perception, jazzy-perception-noble
@@ -43,7 +43,7 @@ Directory: ros/jazzy/ubuntu/noble/ros-base
 
 Tags: jazzy-ros-core, jazzy-ros-core-noble
 Architectures: amd64, arm64v8
-GitCommit: 74e321bc1837c29f223a6d54895aa3c8eb184119
+GitCommit: cf1c3c02d0657c05b8b19ac98d58895ff79c989c
 Directory: ros/jazzy/ubuntu/noble/ros-core
 
 Tags: noetic-perception, noetic-perception-focal
@@ -63,7 +63,7 @@ Directory: ros/noetic/ubuntu/focal/ros-base
 
 Tags: noetic-ros-core, noetic-ros-core-focal
 Architectures: amd64, arm32v7, arm64v8
-GitCommit: 27cc0b68263bbbb10bb58dd814efc0a6b0a01ec7
+GitCommit: cf1c3c02d0657c05b8b19ac98d58895ff79c989c
 Directory: ros/noetic/ubuntu/focal/ros-core
 
 Tags: rolling-perception, rolling-perception-noble
@@ -78,5 +78,5 @@ Directory: ros/rolling/ubuntu/noble/ros-base
 
 Tags: rolling-ros-core, rolling-ros-core-noble
 Architectures: amd64, arm64v8
-GitCommit: 7f98ddd88d872299c45b60c8bcd70d4eb6665222
+GitCommit: cf1c3c02d0657c05b8b19ac98d58895ff79c989c
 Directory: ros/rolling/ubuntu/noble/ros-core
diff --git a/ros_humble-ros-core-jammy/Dockerfile b/ros_humble-ros-core-jammy/Dockerfile
index a142dd9..3a0b4fe 100644
--- a/ros_humble-ros-core-jammy/Dockerfile
+++ b/ros_humble-ros-core-jammy/Dockerfile
@@ -29,10 +29,11 @@ RUN set -eux; \
 RUN echo "deb [ signed-by=/usr/share/keyrings/ros2-latest-archive-keyring.gpg ] http://packages.ros.org/ros2/ubuntu jammy main" > /etc/apt/sources.list.d/ros2-latest.list
 
 # setup environment
-ENV LANG C.UTF-8
-ENV LC_ALL C.UTF-8
+ENV LANG=C.UTF-8
+ENV LC_ALL=C.UTF-8
 
-ENV ROS_DISTRO humble
+ENV ROSDISTRO_PKGS_SYNC_DATE=2024-11-04
+ENV ROS_DISTRO=humble
 
 # install ros2 packages
 RUN apt-get update && apt-get install -y --no-install-recommends \
diff --git a/ros_iron-ros-core-jammy/Dockerfile b/ros_iron-ros-core-jammy/Dockerfile
index a0e9dd3..c4f1a31 100644
--- a/ros_iron-ros-core-jammy/Dockerfile
+++ b/ros_iron-ros-core-jammy/Dockerfile
@@ -29,10 +29,11 @@ RUN set -eux; \
 RUN echo "deb [ signed-by=/usr/share/keyrings/ros2-latest-archive-keyring.gpg ] http://packages.ros.org/ros2/ubuntu jammy main" > /etc/apt/sources.list.d/ros2-latest.list
 
 # setup environment
-ENV LANG C.UTF-8
-ENV LC_ALL C.UTF-8
+ENV LANG=C.UTF-8
+ENV LC_ALL=C.UTF-8
 
-ENV ROS_DISTRO iron
+ENV ROSDISTRO_PKGS_SYNC_DATE=2024-11-01
+ENV ROS_DISTRO=iron
 
 # install ros2 packages
 RUN apt-get update && apt-get install -y --no-install-recommends \
diff --git a/ros_jazzy-ros-core-noble/Dockerfile b/ros_jazzy-ros-core-noble/Dockerfile
index 1cce1dc..dee8e86 100644
--- a/ros_jazzy-ros-core-noble/Dockerfile
+++ b/ros_jazzy-ros-core-noble/Dockerfile
@@ -29,10 +29,11 @@ RUN set -eux; \
 RUN echo "deb [ signed-by=/usr/share/keyrings/ros2-latest-archive-keyring.gpg ] http://packages.ros.org/ros2/ubuntu noble main" > /etc/apt/sources.list.d/ros2-latest.list
 
 # setup environment
-ENV LANG C.UTF-8
-ENV LC_ALL C.UTF-8
+ENV LANG=C.UTF-8
+ENV LC_ALL=C.UTF-8
 
-ENV ROS_DISTRO jazzy
+ENV ROSDISTRO_PKGS_SYNC_DATE=2024-11-21
+ENV ROS_DISTRO=jazzy
 
 # install ros2 packages
 RUN apt-get update && apt-get install -y --no-install-recommends \
diff --git a/ros_noetic-ros-core-focal/Dockerfile b/ros_noetic-ros-core-focal/Dockerfile
index 434ca83..e518194 100644
--- a/ros_noetic-ros-core-focal/Dockerfile
+++ b/ros_noetic-ros-core-focal/Dockerfile
@@ -29,10 +29,11 @@ RUN set -eux; \
 RUN echo "deb [ signed-by=/usr/share/keyrings/ros1-latest-archive-keyring.gpg ] http://packages.ros.org/ros/ubuntu focal main" > /etc/apt/sources.list.d/ros1-latest.list
 
 # setup environment
-ENV LANG C.UTF-8
-ENV LC_ALL C.UTF-8
+ENV LANG=C.UTF-8
+ENV LC_ALL=C.UTF-8
 
-ENV ROS_DISTRO noetic
+ENV ROSDISTRO_PKGS_SYNC_DATE=2024-11-15
+ENV ROS_DISTRO=noetic
 
 # install ros packages
 RUN apt-get update && apt-get install -y --no-install-recommends \
diff --git a/ros_rolling-ros-core-noble/Dockerfile b/ros_rolling-ros-core-noble/Dockerfile
index 1393a63..e36c0d5 100644
--- a/ros_rolling-ros-core-noble/Dockerfile
+++ b/ros_rolling-ros-core-noble/Dockerfile
@@ -29,10 +29,11 @@ RUN set -eux; \
 RUN echo "deb [ signed-by=/usr/share/keyrings/ros2-latest-archive-keyring.gpg ] http://packages.ros.org/ros2/ubuntu noble main" > /etc/apt/sources.list.d/ros2-latest.list
 
 # setup environment
-ENV LANG C.UTF-8
-ENV LC_ALL C.UTF-8
+ENV LANG=C.UTF-8
+ENV LC_ALL=C.UTF-8
 
-ENV ROS_DISTRO rolling
+ENV ROSDISTRO_PKGS_SYNC_DATE=2024-09-26
+ENV ROS_DISTRO=rolling
 
 # install ros2 packages
 RUN apt-get update && apt-get install -y --no-install-recommends \

Relevant Maintainers:

@tianon
Copy link
Member

tianon commented Nov 22, 2024

osrf/docker_images#112 (comment) and all the following discussion is definitely still accurate 🙈

@ruffsl
Copy link
Contributor

ruffsl commented Dec 16, 2024

Late to the party, holidays...

instead of just a simple timestamp so that the cache busts are contextually meaningful instead of simply time-based.

I'd have to argue that this isn't just a time stamp, it is the atomic release that distro maintainers choose to cut that includes a sync all core packages - of differing individual semantic versions - that have been tested and validated to work with each other in aggregate as a snapshot. End user have been requesting such an contextual ENV that would denote the sync version for quite a while. It may be more apt to compare it to something like Ubuntu 24.04.1 vs 24.04.2 etc, only that the version is expressed as the date it is released, rather than a semantic decimals to give better context and grounding for the version number.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants