potiuk commented on a change in pull request #4938: [AIRFLOW-4117]
Multi-staging Image - Travis CI tests [Step 3/3]
URL: https://github.com/apache/airflow/pull/4938#discussion_r304365408
##########
File path: scripts/ci/_utils.sh
##########
@@ -61,13 +65,15 @@ if [[ ${AIRFLOW_MOUNT_HOST_VOLUMES_FOR_STATIC_CHECKS} ==
"true" ]]; then
"-v" "${AIRFLOW_SOURCES}/logs:/opt/airflow/logs:cached" \
"-v" "${AIRFLOW_SOURCES}/logs:/root/logs:cached" \
"-v" "${AIRFLOW_SOURCES}/tmp:/opt/airflow/tmp:cached" \
- "-t"
+ "-e" "PYTHONDONTWRITEBYTECODE=true" \
)
else
echo
echo "Skip mounting host volumes to Docker"
echo
- AIRFLOW_CONTAINER_EXTRA_DOCKER_FLAGS=("-t")
+ AIRFLOW_CONTAINER_EXTRA_DOCKER_FLAGS=( \
+ "-e" "PYTHONDONTWRITEBYTECODE=true" \
Review comment:
Yes. It was not needed.
In fact if you want the full story - that was a bit of a hack to have
non-empty parameter list. The problem is that in the version of bash that is
popular (and used in Travis/Dockerhub) an empty bash ARRAY is treated as
undefined variable (only in latest versions it is not). I prefer to keep `set
-u` but it causes an empty array to fail when used. Therefore I added a flag
"-t" originally that I knew was irrelevant (allocating terminal in this case
does not change anything - colors work, no user input needed). After adding
"-e" the array was not empty and I could remove "-t"
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services