Skip to content

Commit

Permalink
Use only-if-needed upgrade strategy for PRs (#11363)
Browse files Browse the repository at this point in the history
Currently, upgrading dependencies in setup.py still runs with previous versions of the package for the PR which fails.

This will change to upgrade only the package that is required for the PRs

(cherry picked from commit 7f674c6)
  • Loading branch information
kaxil committed Nov 13, 2020
1 parent 321bf6b commit 4d499b4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Dockerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -258,15 +258,14 @@ ENV UPGRADE_TO_LATEST_CONSTRAINTS=${UPGRADE_TO_LATEST_CONSTRAINTS}
# The goal of this line is to install the dependencies from the most current setup.py from sources
# This will be usually incremental small set of packages in CI optimized build, so it will be very fast
# In non-CI optimized build this will install all dependencies before installing sources.
# Usually we will install versions constrained to the current constraints file
# Usually we will install versions based on the dependencies in setup.py and upgraded only if needed.
# But in cron job we will install latest versions matching setup.py to see if there is no breaking change
# and push the constraints if everything is successful
RUN \
if [[ "${UPGRADE_TO_LATEST_CONSTRAINTS}" == "true" ]]; then \
pip install -e ".[${AIRFLOW_EXTRAS}]" --upgrade --upgrade-strategy eager; \
else \
pip install -e ".[${AIRFLOW_EXTRAS}]" \
--constraint "${AIRFLOW_CONSTRAINTS_URL}" ; \
pip install -e ".[${AIRFLOW_EXTRAS}]" --upgrade --upgrade-strategy only-if-needed; \
fi

# Copy all the www/ files we need to compile assets. Done as two separate COPY
Expand Down

0 comments on commit 4d499b4

Please sign in to comment.