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

potiuk pushed a commit to branch v1-10-test
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/v1-10-test by this push:
     new 9c8022e  Removes the cidfile before generation
9c8022e is described below

commit 9c8022eebd7802b2e62799fe6fa99b75c35081f5
Author: Jarek Potiuk <[email protected]>
AuthorDate: Sun Nov 15 00:24:12 2020 +0100

    Removes the cidfile before generation
    
    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 52b8a84..a8d9521 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

Reply via email to