This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch eager-strategy-when-pre-release
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit f2084db41f8f161f189fe7c72672f90f6eddf328
Author: Jarek Potiuk <ja...@potiuk.com>
AuthorDate: Mon May 5 16:18:19 2025 +0200

    Eager upgrade strategy when building pre-release images
    
    Seems that the default strategy when --pre is specified is to use
    pre-releases only when necessary. However in our case we are supposed
    to use latest pre-releases when building pre-release image, because
    only the providers we want to install as pre-releases are not limited
    by constraints, so we can safely upgrade them.
    
    This PR adds the `eager` upgrade strategy to force that.
---
 Dockerfile               | 4 ++--
 Dockerfile.ci            | 4 ++--
 scripts/docker/common.sh | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index 44470a55d53..f3e59412d40 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -462,7 +462,7 @@ function common::get_packaging_tool() {
         UV_CONCURRENT_DOWNLOADS=$(nproc --all)
         export UV_CONCURRENT_DOWNLOADS
         if [[ ${INCLUDE_PRE_RELEASE=} == "true" ]]; then
-            EXTRA_INSTALL_FLAGS="${EXTRA_INSTALL_FLAGS} --prerelease 
if-necessary"
+            EXTRA_INSTALL_FLAGS="${EXTRA_INSTALL_FLAGS} --prerelease allow"
         fi
     else
         echo
@@ -475,7 +475,7 @@ function common::get_packaging_tool() {
         export UPGRADE_TO_HIGHEST_RESOLUTION="--upgrade --upgrade-strategy 
eager"
         export UPGRADE_IF_NEEDED="--upgrade --upgrade-strategy only-if-needed"
         if [[ ${INCLUDE_PRE_RELEASE=} == "true" ]]; then
-            EXTRA_INSTALL_FLAGS="${EXTRA_INSTALL_FLAGS} --pre"
+            EXTRA_INSTALL_FLAGS="${EXTRA_INSTALL_FLAGS} --pre 
--upgrade-strategy eager"
         fi
     fi
 }
diff --git a/Dockerfile.ci b/Dockerfile.ci
index 343a65d355d..18814c0885f 100644
--- a/Dockerfile.ci
+++ b/Dockerfile.ci
@@ -401,7 +401,7 @@ function common::get_packaging_tool() {
         UV_CONCURRENT_DOWNLOADS=$(nproc --all)
         export UV_CONCURRENT_DOWNLOADS
         if [[ ${INCLUDE_PRE_RELEASE=} == "true" ]]; then
-            EXTRA_INSTALL_FLAGS="${EXTRA_INSTALL_FLAGS} --prerelease 
if-necessary"
+            EXTRA_INSTALL_FLAGS="${EXTRA_INSTALL_FLAGS} --prerelease allow"
         fi
     else
         echo
@@ -414,7 +414,7 @@ function common::get_packaging_tool() {
         export UPGRADE_TO_HIGHEST_RESOLUTION="--upgrade --upgrade-strategy 
eager"
         export UPGRADE_IF_NEEDED="--upgrade --upgrade-strategy only-if-needed"
         if [[ ${INCLUDE_PRE_RELEASE=} == "true" ]]; then
-            EXTRA_INSTALL_FLAGS="${EXTRA_INSTALL_FLAGS} --pre"
+            EXTRA_INSTALL_FLAGS="${EXTRA_INSTALL_FLAGS} --pre 
--upgrade-strategy eager"
         fi
     fi
 }
diff --git a/scripts/docker/common.sh b/scripts/docker/common.sh
index a90c1cdcd27..c4040583dc4 100644
--- a/scripts/docker/common.sh
+++ b/scripts/docker/common.sh
@@ -49,7 +49,7 @@ function common::get_packaging_tool() {
         UV_CONCURRENT_DOWNLOADS=$(nproc --all)
         export UV_CONCURRENT_DOWNLOADS
         if [[ ${INCLUDE_PRE_RELEASE=} == "true" ]]; then
-            EXTRA_INSTALL_FLAGS="${EXTRA_INSTALL_FLAGS} --prerelease 
if-necessary"
+            EXTRA_INSTALL_FLAGS="${EXTRA_INSTALL_FLAGS} --prerelease allow"
         fi
     else
         echo
@@ -62,7 +62,7 @@ function common::get_packaging_tool() {
         export UPGRADE_TO_HIGHEST_RESOLUTION="--upgrade --upgrade-strategy 
eager"
         export UPGRADE_IF_NEEDED="--upgrade --upgrade-strategy only-if-needed"
         if [[ ${INCLUDE_PRE_RELEASE=} == "true" ]]; then
-            EXTRA_INSTALL_FLAGS="${EXTRA_INSTALL_FLAGS} --pre"
+            EXTRA_INSTALL_FLAGS="${EXTRA_INSTALL_FLAGS} --pre 
--upgrade-strategy eager"
         fi
     fi
 }

Reply via email to