Skip to content

Commit

Permalink
Remove constraint caching from image build (apache#38020)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
potiuk authored and utkarsharma2 committed Apr 22, 2024
1 parent e01ec52 commit f1c5e87
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 12 deletions.
4 changes: 0 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions Dockerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions scripts/docker/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f1c5e87

Please sign in to comment.