potiuk commented on a change in pull request #4938: [AIRFLOW-4117] 
Multi-staging Image - Travis CI tests [Step 3/3]
URL: https://github.com/apache/airflow/pull/4938#discussion_r298480472
 
 

 ##########
 File path: Dockerfile
 ##########
 @@ -292,28 +320,32 @@ COPY --chown=airflow:airflow airflow/version.py 
${AIRFLOW_SOURCES}/airflow/versi
 COPY --chown=airflow:airflow airflow/__init__.py 
${AIRFLOW_SOURCES}/airflow/__init__.py
 COPY --chown=airflow:airflow airflow/bin/airflow 
${AIRFLOW_SOURCES}/airflow/bin/airflow
 
-# Airflow Extras installed
-ARG AIRFLOW_EXTRAS="all"
-ENV AIRFLOW_EXTRAS=${AIRFLOW_EXTRAS}
-RUN echo "Installing with extras: ${AIRFLOW_EXTRAS}."
-
-# First install only dependencies but no Apache Airflow itself
-# This way regular changes in sources of Airflow will not trigger 
reinstallation of all dependencies
-# And this Docker layer will be reused between builds.
-RUN pip install --no-use-pep517 -e ".[${AIRFLOW_EXTRAS}]"
+# First upgrade everything to latest version and then run pip install -e 
.[extras] to downgrade the
+# dependencies which should not be the latest ones according to setup.py
+RUN pip list --outdated --format=freeze  | grep -v '^\-e' | cut -d = -f 1  | 
xargs pip install -U && \
 
 Review comment:
   In the latest version I added clearer comments (what are we going to achieve 
and how) - I have also added BUILD_MONTH argument - I use current month to 
invalidate pip cache every month so that every month we have the latest 
"master" dependencies from airflow as base for our dependencies. This way every 
month our base will catch-up with the latest versions. Builds at the beginning 
of month until first merge to master will be running slightly longer 
(installing full dependencies).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to