Skip to content

Commit

Permalink
Exclude yarn.lock from the whl file
Browse files Browse the repository at this point in the history
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.

The yarn.lock however is needed in sdist package that's why it should
not be excluded via MANIFEST.in

Alse asset compilation only happens when Airflow is installed
from sources. When Airflow is installed from packages, the
assets are already compiled-in during package building.
  • Loading branch information
potiuk committed Jun 22, 2021
1 parent e5e59b4 commit b1c9bda
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,9 @@ install_requires =
unicodecsv>=0.14.1
werkzeug~=1.0, >=1.0.1

[options.exclude_package_data]
airflow.www = yarn.lock

[options.packages.find]
include =
airflow*
Expand Down

0 comments on commit b1c9bda

Please sign in to comment.