From dd4b3656086b1144cf25b2458922257152d886e8 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Tue, 5 Mar 2024 03:47:04 -0600 Subject: [PATCH] container: don't map develop to latest (#42952) Co-authored-by: Massimiliano Culpo --- lib/spack/spack/container/images.json | 42 ++---------------------- lib/spack/spack/container/images.py | 5 +-- lib/spack/spack/test/container/docker.py | 2 +- lib/spack/spack/test/container/images.py | 2 +- 4 files changed, 6 insertions(+), 45 deletions(-) diff --git a/lib/spack/spack/container/images.json b/lib/spack/spack/container/images.json index 4fca497f8b..b78b180333 100644 --- a/lib/spack/spack/container/images.json +++ b/lib/spack/spack/container/images.json @@ -19,9 +19,6 @@ }, "os_package_manager": "dnf", "build": "spack/fedora38", - "build_tags": { - "develop": "latest" - }, "final": { "image": "docker.io/fedora:38" } @@ -33,9 +30,6 @@ }, "os_package_manager": "dnf", "build": "spack/fedora37", - "build_tags": { - "develop": "latest" - }, "final": { "image": "docker.io/fedora:37" } @@ -47,9 +41,6 @@ }, "os_package_manager": "dnf_epel", "build": "spack/rockylinux9", - "build_tags": { - "develop": "latest" - }, "final": { "image": "docker.io/rockylinux:9" } @@ -61,9 +52,6 @@ }, "os_package_manager": "dnf_epel", "build": "spack/rockylinux8", - "build_tags": { - "develop": "latest" - }, "final": { "image": "docker.io/rockylinux:8" } @@ -75,9 +63,6 @@ }, "os_package_manager": "dnf_epel", "build": "spack/almalinux9", - "build_tags": { - "develop": "latest" - }, "final": { "image": "quay.io/almalinuxorg/almalinux:9" } @@ -89,9 +74,6 @@ }, "os_package_manager": "dnf_epel", "build": "spack/almalinux8", - "build_tags": { - "develop": "latest" - }, "final": { "image": "quay.io/almalinuxorg/almalinux:8" } @@ -105,9 +87,6 @@ "build": "spack/centos-stream", "final": { "image": "quay.io/centos/centos:stream" - }, - "build_tags": { - "develop": "latest" } }, "centos:7": { @@ -115,10 +94,7 @@ "template": "container/centos_7.dockerfile" }, "os_package_manager": "yum", - "build": "spack/centos7", - "build_tags": { - "develop": "latest" - } + "build": "spack/centos7" }, "opensuse/leap:15": { "bootstrap": { @@ -126,9 +102,6 @@ }, "os_package_manager": "zypper", "build": "spack/leap15", - "build_tags": { - "develop": "latest" - }, "final": { "image": "opensuse/leap:latest" } @@ -148,19 +121,13 @@ "template": "container/ubuntu_2204.dockerfile" }, "os_package_manager": "apt", - "build": "spack/ubuntu-jammy", - "build_tags": { - "develop": "latest" - } + "build": "spack/ubuntu-jammy" }, "ubuntu:20.04": { "bootstrap": { "template": "container/ubuntu_2004.dockerfile" }, "build": "spack/ubuntu-focal", - "build_tags": { - "develop": "latest" - }, "os_package_manager": "apt" }, "ubuntu:18.04": { @@ -168,10 +135,7 @@ "template": "container/ubuntu_1804.dockerfile" }, "os_package_manager": "apt", - "build": "spack/ubuntu-bionic", - "build_tags": { - "develop": "latest" - } + "build": "spack/ubuntu-bionic" } }, "os_package_managers": { diff --git a/lib/spack/spack/container/images.py b/lib/spack/spack/container/images.py index 6ff4f456af..8f012bce2f 100644 --- a/lib/spack/spack/container/images.py +++ b/lib/spack/spack/container/images.py @@ -50,10 +50,7 @@ def build_info(image, spack_version): if not build_image: return None, None - # Translate version from git to docker if necessary - build_tag = image_data["build_tags"].get(spack_version, spack_version) - - return build_image, build_tag + return build_image, spack_version def os_package_manager_for(image): diff --git a/lib/spack/spack/test/container/docker.py b/lib/spack/spack/test/container/docker.py index 3189e641ae..220605b568 100644 --- a/lib/spack/spack/test/container/docker.py +++ b/lib/spack/spack/test/container/docker.py @@ -25,7 +25,7 @@ def test_build_and_run_images(minimal_configuration): # Test the output of the build property build = writer.build - assert build.image == "spack/ubuntu-bionic:latest" + assert build.image == "spack/ubuntu-bionic:develop" def test_packages(minimal_configuration): diff --git a/lib/spack/spack/test/container/images.py b/lib/spack/spack/test/container/images.py index eac0f1e1fa..7f5d8feb89 100644 --- a/lib/spack/spack/test/container/images.py +++ b/lib/spack/spack/test/container/images.py @@ -12,7 +12,7 @@ @pytest.mark.parametrize( "image,spack_version,expected", [ - ("ubuntu:18.04", "develop", ("spack/ubuntu-bionic", "latest")), + ("ubuntu:18.04", "develop", ("spack/ubuntu-bionic", "develop")), ("ubuntu:18.04", "0.14.0", ("spack/ubuntu-bionic", "0.14.0")), ], )