This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch v3-0-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v3-0-test by this push:
new 00f7aef459b [v3-0-test] Properly calculate location of the constraints
for Airflow 3 (#50130) (#50133)
00f7aef459b is described below
commit 00f7aef459b3fb80f425f5c9d72b8b01f7f90c2a
Author: Jarek Potiuk <[email protected]>
AuthorDate: Fri May 2 20:22:33 2025 +0200
[v3-0-test] Properly calculate location of the constraints for Airflow 3
(#50130) (#50133)
When you determine which constraints should be used during image
building, we did not properly took into account Airflow 3 versioning
scheme and we had still exclusion for .dev versions.
This PR fixes constraints calculation for version of:
* v3* form (branch)
* 3.* rorm (concrete version)
(cherry picked from commit a447474738413c29403413d33990b5af8413543d)
---
Dockerfile | 2 +-
Dockerfile.ci | 2 +-
scripts/docker/common.sh | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Dockerfile b/Dockerfile
index 2811b0cbc11..e3278af0dee 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -491,7 +491,7 @@ function common::get_airflow_version_specification() {
function common::get_constraints_location() {
# auto-detect Airflow-constraint reference and location
if [[ -z "${AIRFLOW_CONSTRAINTS_REFERENCE=}" ]]; then
- if [[ ${AIRFLOW_VERSION} =~ v?2.* && ! ${AIRFLOW_VERSION} =~ .*dev.*
]]; then
+ if [[ ${AIRFLOW_VERSION} =~ v?2.* || ${AIRFLOW_VERSION} =~ v?3.* ]];
then
AIRFLOW_CONSTRAINTS_REFERENCE=constraints-${AIRFLOW_VERSION}
else
AIRFLOW_CONSTRAINTS_REFERENCE=${DEFAULT_CONSTRAINTS_BRANCH}
diff --git a/Dockerfile.ci b/Dockerfile.ci
index 88170d57525..dc0cc5759b1 100644
--- a/Dockerfile.ci
+++ b/Dockerfile.ci
@@ -430,7 +430,7 @@ function common::get_airflow_version_specification() {
function common::get_constraints_location() {
# auto-detect Airflow-constraint reference and location
if [[ -z "${AIRFLOW_CONSTRAINTS_REFERENCE=}" ]]; then
- if [[ ${AIRFLOW_VERSION} =~ v?2.* && ! ${AIRFLOW_VERSION} =~ .*dev.*
]]; then
+ if [[ ${AIRFLOW_VERSION} =~ v?2.* || ${AIRFLOW_VERSION} =~ v?3.* ]];
then
AIRFLOW_CONSTRAINTS_REFERENCE=constraints-${AIRFLOW_VERSION}
else
AIRFLOW_CONSTRAINTS_REFERENCE=${DEFAULT_CONSTRAINTS_BRANCH}
diff --git a/scripts/docker/common.sh b/scripts/docker/common.sh
index c63dae661f1..a90c1cdcd27 100644
--- a/scripts/docker/common.sh
+++ b/scripts/docker/common.sh
@@ -78,7 +78,7 @@ function common::get_airflow_version_specification() {
function common::get_constraints_location() {
# auto-detect Airflow-constraint reference and location
if [[ -z "${AIRFLOW_CONSTRAINTS_REFERENCE=}" ]]; then
- if [[ ${AIRFLOW_VERSION} =~ v?2.* && ! ${AIRFLOW_VERSION} =~ .*dev.*
]]; then
+ if [[ ${AIRFLOW_VERSION} =~ v?2.* || ${AIRFLOW_VERSION} =~ v?3.* ]];
then
AIRFLOW_CONSTRAINTS_REFERENCE=constraints-${AIRFLOW_VERSION}
else
AIRFLOW_CONSTRAINTS_REFERENCE=${DEFAULT_CONSTRAINTS_BRANCH}