From 278638a2e10fbfbb00ddc9f5662da027a5bfd151 Mon Sep 17 00:00:00 2001 From: adam <> Date: Thu, 31 Oct 2024 16:09:40 +0200 Subject: [PATCH] improve upper constraint handling This commit: - Provides a default value for the UPPER_CONSTRAINT docker file argument - Changes the prepare-image.sh logic to check the actual size of the upper constraint file and not the presence of it. Background of this change is that it has been noticed that on release branches during image building the "pinned" upper constraint file is not picked up rather pulled from upstream OpenStack because of a lack of default argument value during image building. Signed-off-by: Adam Rozman --- Dockerfile | 2 +- prepare-image.sh | 2 +- upper-constraints.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index e67b44b8d..8927cd165 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,9 +27,9 @@ ARG PATCH_LIST ARG INSTALL_TYPE=source # build arguments for source build customization -ARG UPPER_CONSTRAINTS_FILE ARG IRONIC_SOURCE=bugfix/24.0 ARG IRONIC_INSPECTOR_SOURCE=bugfix/12.0 +ARG UPPER_CONSTRAINTS_FILE=upper-constraints.txt ARG IRONIC_LIB_SOURCE ARG SUSHY_SOURCE diff --git a/prepare-image.sh b/prepare-image.sh index 119ecebf2..0bcc45886 100755 --- a/prepare-image.sh +++ b/prepare-image.sh @@ -49,7 +49,7 @@ if [[ "$INSTALL_TYPE" == "source" ]]; then # NOTE(elfosardo): if the content of the upper-constraints file is empty, # we give as assumed that we're on the master branch - if [[ ! -f "${UPPER_CONSTRAINTS_PATH}" ]]; then + if [[ ! -s "${UPPER_CONSTRAINTS_PATH}" ]]; then UPPER_CONSTRAINTS_PATH="/tmp/upper-constraints.txt" curl -L https://releases.openstack.org/constraints/upper/master -o "${UPPER_CONSTRAINTS_PATH}" fi diff --git a/upper-constraints.txt b/upper-constraints.txt index 8330716a4..43e6b4a69 100644 --- a/upper-constraints.txt +++ b/upper-constraints.txt @@ -377,7 +377,7 @@ idna===3.4 yamlloader===1.2.2 protobuf===4.22.3 pyhcl===0.4.4 -sushy===4.5.2 +sushy===4.7.0 python-neutronclient===11.0.0 pika===1.3.1 oslo.cache===3.5.0