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_r299570438
 
 

 ##########
 File path: Dockerfile
 ##########
 @@ -278,42 +278,75 @@ RUN echo "Pip version: ${PIP_VERSION}"
 
 RUN pip install --upgrade pip==${PIP_VERSION}
 
-# We are copying everything with airflow:airflow user:group even if we use 
root to run the scripts
+ARG AIRFLOW_REPO=apache/airflow
+ENV AIRFLOW_REPO=${AIRFLOW_REPO}
+
+ARG AIRFLOW_BRANCH=master
+ENV AIRFLOW_BRANCH=${AIRFLOW_BRANCH}
+
+ENV 
AIRFLOW_GITHUB_DOWNLOAD=https://raw.githubusercontent.com/${AIRFLOW_REPO}/${AIRFLOW_BRANCH}
+
+# We perform fresh dependency install at the beginning of each month from the 
scratch
+# This way every month we re-test if fresh installation from the scratch 
actually works
+# As opposed to incremental installations which does not upgrade already 
installed packages unless it
+# is required by setup.py constraints.
+ARG BUILD_MONTH
+
+# We get Airflow dependencies (no Airflow sources) from the master version of 
Airflow in order to avoid full
+# pip install layer cache invalidation when setup.py changes. This can be 
reinstalled from the
+# latest master by increasing PIP_DEPENDENCIES_EPOCH_NUMBER.
 
 Review comment:
   Not really - we still can add it to force reinstalling PIP dependencies if 
we are really desperate and want to make a quick fix and reinstall everything 
from the scratch. 
   
   Right now the dependencies will get reinstalled at the beginning of month 
from the scratch and they are updated every time setup.py changes (if the 
OPTIMISE_BUILD_FOR_CI will be set to True) - if you are OK with my proposal 
above. But then if we really want to make sure we want latest master docker to 
have all PIP dependencies reinstalled from scratch - it will be just enough to 
increase the EPOCH number and push it to master. 
   
   So those EPOCH args are there to quickly react to whatever unforeseen 
circumstances - such as "hey this new dependency is really breaking current 
PRs, we have to force reinstalling PIP from scratch today". 
   
   I think it's worth to leave it.

----------------------------------------------------------------
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