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 2022/01/05 16:00:02 UTC
[GitHub] [airflow] ashb commented on a change in pull request #20679: Cleaner output of docker image building scripts
ashb commented on a change in pull request #20679:
URL: https://github.com/apache/airflow/pull/20679#discussion_r778937477
##########
File path: scripts/docker/compile_www_assets.sh
##########
@@ -35,8 +34,27 @@ function compile_www_assets() {
www_dir="$(python -m site --user-site)/airflow/www"
fi
pushd ${www_dir} || exit 1
- yarn install --frozen-lockfile --no-cache
- yarn run prod
+ set +e
+ yarn install --frozen-lockfile --no-cache 2>/tmp/out-yarn-install.txt
+ local res=$?
+ if [[ ${res} != 0 ]]; then
+ >&2 echo
+ >&2 echo "Error when running yarn install:"
+ >&2 echo
+ >&2 cat /tmp/out-yarn-install.txt
+ exit 1
+ fi
+ yarn run prod 2>/tmp/out-yarn-run.txt
+ res=$?
+ if [[ ${res} != 0 ]]; then
+ >&2 echo
+ >&2 echo "Error when running yarn install:"
+ >&2 echo
+ >&2 cat /tmp/out-yarn-run.txt
+ exit 1
+ fi
+ rm -f /tm/out-yarn-run.txt
Review comment:
```suggestion
rm -f /tmp/out-yarn-run.txt
```
##########
File path: scripts/docker/compile_www_assets.sh
##########
@@ -35,8 +34,27 @@ function compile_www_assets() {
www_dir="$(python -m site --user-site)/airflow/www"
fi
pushd ${www_dir} || exit 1
- yarn install --frozen-lockfile --no-cache
- yarn run prod
+ set +e
+ yarn install --frozen-lockfile --no-cache 2>/tmp/out-yarn-install.txt
+ local res=$?
+ if [[ ${res} != 0 ]]; then
+ >&2 echo
+ >&2 echo "Error when running yarn install:"
+ >&2 echo
+ >&2 cat /tmp/out-yarn-install.txt
Review comment:
File left around on error exit - does it matter?
--
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.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org