You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2020/11/15 00:30:38 UTC

[airflow] branch master updated: Removes the cidfile before generation (#12372)

This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/master by this push:
     new cd88af8  Removes the cidfile before generation (#12372)
cd88af8 is described below

commit cd88af86923630b99d32f5f00a2fdc7b4efd9484
Author: Jarek Potiuk <ja...@polidea.com>
AuthorDate: Sun Nov 15 01:29:57 2020 +0100

    Removes the cidfile before generation (#12372)
    
    If we do not remove the cidfile, the subsequent write to it does
    not change the content. The errors have been masked by the
    stderr redirection, so the error was invisible.
---
 scripts/ci/libraries/_build_images.sh | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/scripts/ci/libraries/_build_images.sh b/scripts/ci/libraries/_build_images.sh
index f89b1e3..792f1e8 100644
--- a/scripts/ci/libraries/_build_images.sh
+++ b/scripts/ci/libraries/_build_images.sh
@@ -266,14 +266,14 @@ function build_images::get_remote_image_build_cache_hash() {
         return
     fi
     set -e
+    rm -f "${REMOTE_IMAGE_CONTAINER_ID_FILE}"
     # Create container dump out of the manifest image without actually running it
-    docker create --cidfile "${REMOTE_IMAGE_CONTAINER_ID_FILE}" "${AIRFLOW_CI_REMOTE_MANIFEST_IMAGE}" \
-        2>/dev/null >/dev/null || true
+    docker create --cidfile "${REMOTE_IMAGE_CONTAINER_ID_FILE}" "${AIRFLOW_CI_REMOTE_MANIFEST_IMAGE}"
     # Extract manifest and store it in local file
     docker cp "$(cat "${REMOTE_IMAGE_CONTAINER_ID_FILE}"):/build-cache-hash" \
-        "${REMOTE_IMAGE_BUILD_CACHE_HASH_FILE}" 2> /dev/null \
-        || touch "${REMOTE_IMAGE_BUILD_CACHE_HASH_FILE}"
-    docker rm --force "$(cat "${REMOTE_IMAGE_CONTAINER_ID_FILE}")" 2>/dev/null || true
+        "${REMOTE_IMAGE_BUILD_CACHE_HASH_FILE}"
+    docker rm --force "$(cat "${REMOTE_IMAGE_CONTAINER_ID_FILE}")"
+    rm -f "${REMOTE_IMAGE_CONTAINER_ID_FILE}"
     echo
     echo "Remote build cache hash: '$(cat "${REMOTE_IMAGE_BUILD_CACHE_HASH_FILE}")'"
     echo