From 5cafdcee8db7379b0b56c280178a5e28037c4cfd Mon Sep 17 00:00:00 2001 From: Jarek Potiuk Date: Sun, 10 Mar 2024 21:40:59 +0100 Subject: [PATCH] Remove constraint caching from image build (#38020) Constraint caching added recently to the image caused some unexpected side effects when conflicting constraints were added - as old constraints cached in the image were not replaced even if main has been updated. This PR removes caching from the image - so that building the image will always use constraints from main. --- Dockerfile | 4 ---- Dockerfile.ci | 4 ---- scripts/docker/common.sh | 4 ---- 3 files changed, 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index 10f19f61887ee..78a4c16407181 100644 --- a/Dockerfile +++ b/Dockerfile @@ -552,10 +552,6 @@ function common::get_airflow_version_specification() { } function common::get_constraints_location() { - if [[ -f "${HOME}/constraints.txt" ]]; then - # constraints are already downloaded, do not calculate/override again - return - fi # auto-detect Airflow-constraint reference and location if [[ -z "${AIRFLOW_CONSTRAINTS_REFERENCE=}" ]]; then if [[ ${AIRFLOW_VERSION} =~ v?2.* && ! ${AIRFLOW_VERSION} =~ .*dev.* ]]; then diff --git a/Dockerfile.ci b/Dockerfile.ci index 739a96a7d075f..8779c8383c793 100644 --- a/Dockerfile.ci +++ b/Dockerfile.ci @@ -499,10 +499,6 @@ function common::get_airflow_version_specification() { } function common::get_constraints_location() { - if [[ -f "${HOME}/constraints.txt" ]]; then - # constraints are already downloaded, do not calculate/override again - return - fi # auto-detect Airflow-constraint reference and location if [[ -z "${AIRFLOW_CONSTRAINTS_REFERENCE=}" ]]; then if [[ ${AIRFLOW_VERSION} =~ v?2.* && ! ${AIRFLOW_VERSION} =~ .*dev.* ]]; then diff --git a/scripts/docker/common.sh b/scripts/docker/common.sh index a6b92dee63b1e..f6f80ff6e865a 100644 --- a/scripts/docker/common.sh +++ b/scripts/docker/common.sh @@ -77,10 +77,6 @@ function common::get_airflow_version_specification() { } function common::get_constraints_location() { - if [[ -f "${HOME}/constraints.txt" ]]; then - # constraints are already downloaded, do not calculate/override again - return - fi # auto-detect Airflow-constraint reference and location if [[ -z "${AIRFLOW_CONSTRAINTS_REFERENCE=}" ]]; then if [[ ${AIRFLOW_VERSION} =~ v?2.* && ! ${AIRFLOW_VERSION} =~ .*dev.* ]]; then