From f1c5e8732c02639cc1d5a60eda21499751d23041 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 10f19f61887ee1..78a4c16407181a 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 739a96a7d075fa..8779c8383c7932 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 a6b92dee63b1e7..f6f80ff6e865a6 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