Skip to content

Commit

Permalink
Remove verbosity from cleaning up airflow package in image build (apa…
Browse files Browse the repository at this point in the history
…che#38490)

The image build script when installing airflow from the branch tip
will download airlfow package, install it in editable mode and remove
the downloaded package. The removal was done with `-v` flag which
caused the build output to contain a lot of ouput and runs quite a
bit slower.

This PR removes the verbose flag and moves the rm command to inside
set -x/+x to see that it is happening.
  • Loading branch information
potiuk authored Mar 26, 2024
1 parent ba593f9 commit 51f5537
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ function install_airflow_dependencies_from_branch_tip() {
# pyproject.toml in the next step (when we install regular airflow).
set -x
curl -fsSL "https://github.com/${AIRFLOW_REPO}/archive/${AIRFLOW_BRANCH}.tar.gz" | \
tar xvz -C "${TEMP_AIRFLOW_DIR}" --strip 1
tar xz -C "${TEMP_AIRFLOW_DIR}" --strip 1
# Make sure editable dependencies are calculated when devel-ci dependencies are installed
${PACKAGING_TOOL_CMD} install ${EXTRA_INSTALL_FLAGS} ${ADDITIONAL_PIP_INSTALL_FLAGS} \
--editable "${TEMP_AIRFLOW_DIR}[${AIRFLOW_EXTRAS}]"
Expand All @@ -481,8 +481,8 @@ function install_airflow_dependencies_from_branch_tip() {
echo
set +x
${PACKAGING_TOOL_CMD} uninstall ${EXTRA_UNINSTALL_FLAGS} apache-airflow
rm -rf "${TEMP_AIRFLOW_DIR}"
set -x
rm -rvf "${TEMP_AIRFLOW_DIR}"
# If you want to make sure dependency is removed from cache in your PR when you removed it from
# pyproject.toml - please add your dependency here as a list of strings
# for example:
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ function install_airflow_dependencies_from_branch_tip() {
# pyproject.toml in the next step (when we install regular airflow).
set -x
curl -fsSL "https://github.com/${AIRFLOW_REPO}/archive/${AIRFLOW_BRANCH}.tar.gz" | \
tar xvz -C "${TEMP_AIRFLOW_DIR}" --strip 1
tar xz -C "${TEMP_AIRFLOW_DIR}" --strip 1
# Make sure editable dependencies are calculated when devel-ci dependencies are installed
${PACKAGING_TOOL_CMD} install ${EXTRA_INSTALL_FLAGS} ${ADDITIONAL_PIP_INSTALL_FLAGS} \
--editable "${TEMP_AIRFLOW_DIR}[${AIRFLOW_EXTRAS}]"
Expand All @@ -427,8 +427,8 @@ function install_airflow_dependencies_from_branch_tip() {
echo
set +x
${PACKAGING_TOOL_CMD} uninstall ${EXTRA_UNINSTALL_FLAGS} apache-airflow
rm -rf "${TEMP_AIRFLOW_DIR}"
set -x
rm -rvf "${TEMP_AIRFLOW_DIR}"
# If you want to make sure dependency is removed from cache in your PR when you removed it from
# pyproject.toml - please add your dependency here as a list of strings
# for example:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function install_airflow_dependencies_from_branch_tip() {
# pyproject.toml in the next step (when we install regular airflow).
set -x
curl -fsSL "https://github.com/${AIRFLOW_REPO}/archive/${AIRFLOW_BRANCH}.tar.gz" | \
tar xvz -C "${TEMP_AIRFLOW_DIR}" --strip 1
tar xz -C "${TEMP_AIRFLOW_DIR}" --strip 1
# Make sure editable dependencies are calculated when devel-ci dependencies are installed
${PACKAGING_TOOL_CMD} install ${EXTRA_INSTALL_FLAGS} ${ADDITIONAL_PIP_INSTALL_FLAGS} \
--editable "${TEMP_AIRFLOW_DIR}[${AIRFLOW_EXTRAS}]"
Expand All @@ -70,8 +70,8 @@ function install_airflow_dependencies_from_branch_tip() {
echo
set +x
${PACKAGING_TOOL_CMD} uninstall ${EXTRA_UNINSTALL_FLAGS} apache-airflow
rm -rf "${TEMP_AIRFLOW_DIR}"
set -x
rm -rvf "${TEMP_AIRFLOW_DIR}"
# If you want to make sure dependency is removed from cache in your PR when you removed it from
# pyproject.toml - please add your dependency here as a list of strings
# for example:
Expand Down

0 comments on commit 51f5537

Please sign in to comment.