This is an automated email from the ASF dual-hosted git repository.
ash pushed a commit to branch v2-1-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v2-1-test by this push:
new 2682df6 Exclude ``yarn.lock`` from built Python wheel file (#16577)
2682df6 is described below
commit 2682df6c6888c40fd790439c3be60c282f1d7f16
Author: Kaxil Naik <[email protected]>
AuthorDate: Tue Jun 22 12:33:08 2021 +0100
Exclude ``yarn.lock`` from built Python wheel file (#16577)
Same as https://github.com/apache/airflow/pull/16494 - However that PR had
to be reverted in https://github.com/apache/airflow/pull/16518 as it failed
building of PROD image, this PR/commit will fix it.
PROBLEM: Currently the airflow wheel is built with the yarn.lock which is
not actually used by the airflow itself. Having this file in the docker image
causes the clair and trivy scanners to fail
FIX: The fix is to exclude the yarn.lock by specifying it in the manifest.in
(cherry picked from commit aa79bfe7e71f5e90dbfb3f2deb3ad5b44e3259ab)
---
Dockerfile | 5 ++++-
MANIFEST.in | 1 +
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/Dockerfile b/Dockerfile
index ca15184..25678af 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -253,13 +253,16 @@ RUN if [[ ${INSTALL_FROM_DOCKER_CONTEXT_FILES} == "true"
]]; then \
bash /scripts/docker/install_from_docker_context_files.sh; \
elif [[ ${INSTALL_FROM_PYPI} == "true" ]]; then \
bash /scripts/docker/install_airflow.sh; \
+ else \
+ # only compile assets if the prod image is build from sources
+ # otherwise they are already compiled-in
+ bash /scripts/docker/compile_www_assets.sh; \
fi; \
if [[ -n "${ADDITIONAL_PYTHON_DEPS}" ]]; then \
bash /scripts/docker/install_additional_dependencies.sh; \
fi; \
find /root/.local/ -name '*.pyc' -print0 | xargs -0 rm -r || true ; \
find /root/.local/ -type d -name '__pycache__' -print0 | xargs -0 rm -r ||
true ; \
- bash /scripts/docker/compile_www_assets.sh; \
# make sure that all directories and files in .local are also group
accessible
find /root/.local -executable -print0 | xargs --null chmod g+x; \
find /root/.local -print0 | xargs --null chmod g+rw
diff --git a/MANIFEST.in b/MANIFEST.in
index 2864364..eee29f8 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -29,6 +29,7 @@ graft scripts/upstart
graft airflow/config_templates
recursive-exclude airflow/www/node_modules *
global-exclude __pycache__ *.pyc
+exclude airflow/www/yarn.lock
include airflow/alembic.ini
include airflow/api_connexion/openapi/v1.yaml
include airflow/git_version