You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/11/14 08:39:51 UTC

[GitHub] [airflow] mik-laj commented on a change in pull request #6499: [AIRFLOW-5842] Switch to Debian buster image. Depends on [AIRFLOW-5704]

mik-laj commented on a change in pull request #6499: [AIRFLOW-5842] Switch to Debian buster image. Depends on [AIRFLOW-5704]
URL: https://github.com/apache/airflow/pull/6499#discussion_r346182152
 
 

 ##########
 File path: Dockerfile
 ##########
 @@ -263,84 +255,70 @@ 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}
-
 # Airflow Extras installed
-ARG AIRFLOW_EXTRAS="all"
-ENV AIRFLOW_EXTRAS=${AIRFLOW_EXTRAS}
-
-RUN echo "Installing with extras: ${AIRFLOW_EXTRAS}."
-
-ARG AIRFLOW_CONTAINER_CI_OPTIMISED_BUILD="false"
-ENV AIRFLOW_CONTAINER_CI_OPTIMISED_BUILD=${AIRFLOW_CONTAINER_CI_OPTIMISED_BUILD}
-
-# By changing the CI build epoch we can force reinstalling Arflow from the current master
-# It can also be overwritten manually by setting the AIRFLOW_CI_BUILD_EPOCH environment variable.
-ARG AIRFLOW_CI_BUILD_EPOCH="1"
-ENV AIRFLOW_CI_BUILD_EPOCH=${AIRFLOW_CI_BUILD_EPOCH}
-
-# In case of CI-optimised builds we want to pre-install master version of airflow dependencies so that
-# We do not have to always reinstall it from the scratch.
-# This can be reinstalled from latest master by increasing PIP_DEPENDENCIES_EPOCH_NUMBER.
-# And is automatically reinstalled from the scratch every month
-RUN \
-    if [[ "${AIRFLOW_CONTAINER_CI_OPTIMISED_BUILD}" == "true" ]]; then \
-        pip install \
-        "https://github.com/apache/airflow/archive/${AIRFLOW_BRANCH}.tar.gz#egg=apache-airflow[${AIRFLOW_EXTRAS}]" \
-        && pip uninstall --yes apache-airflow; \
-    fi
+ARG AIRFLOW_CI_EXTRAS="devel_ci"
+ENV AIRFLOW_CI_EXTRAS=${AIRFLOW_CI_EXTRAS}
 
-# Install NPM dependencies here. The NPM dependencies don't change that often and we already have pip
-# installed dependencies in case of CI optimised build, so it is ok to install NPM deps here
-# Rather than after setup.py is added.
-COPY airflow/www/package-lock.json ${AIRFLOW_SOURCES}/airflow/www/package-lock.json
-COPY airflow/www/package.json ${AIRFLOW_SOURCES}/airflow/www/package.json
-
-WORKDIR ${AIRFLOW_SOURCES}/airflow/www
+RUN echo "Installing with extras: ${AIRFLOW_CI_EXTRAS}."
 
-RUN npm ci
+ENV PATH="/root/.local/bin:/root:${PATH}"
 
-WORKDIR ${AIRFLOW_SOURCES}
+# Increase the value here to force reinstalling Apache Airflow pip dependencies
+ARG PIP_DEPENDENCIES_EPOCH_NUMBER="1"
+ENV PIP_DEPENDENCIES_EPOCH_NUMBER=${PIP_DEPENDENCIES_EPOCH_NUMBER}
 
-# Note! We are copying everything with airflow:airflow user:group even if we use root to run the scripts
-# This is fine as root user will be able to use those dirs anyway.
+# In case of CI builds we want to pre-install master version of airflow dependencies so that
+# We do not have to always reinstall it from the scratch and loose time for that.
+# CI build is optimised for build speed
+RUN pip install --user \
 
 Review comment:
   Should we add `--no-cache-dir` here?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services