From e1f6aca9de6a893c12b6cc5ae7d06cd87df480b6 Mon Sep 17 00:00:00 2001 From: stevenhorsman Date: Thu, 12 Dec 2024 16:50:56 +0000 Subject: [PATCH] workflows: Remove potential timing issues with artifacts With the code I originally did I think there is potentially a case where we can get a failure due to timing of steps. Before this change the `build-asset-shim-v2` job could start the `get-artifacts` step and concurrently `remove-rootfs-binary-artifacts` could run and delete the artifact during the download and result in the error. In this commit, I try to resolve this by making sure that the shim build waits for the artifact deletes to complete before starting. Signed-off-by: stevenhorsman --- .github/workflows/build-kata-static-tarball-amd64.yaml | 4 ++-- .github/workflows/build-kata-static-tarball-arm64.yaml | 4 ++-- .github/workflows/build-kata-static-tarball-ppc64le.yaml | 4 ++-- .github/workflows/build-kata-static-tarball-s390x.yaml | 5 ++--- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-kata-static-tarball-amd64.yaml b/.github/workflows/build-kata-static-tarball-amd64.yaml index d2dac9d4bc..22767316e9 100644 --- a/.github/workflows/build-kata-static-tarball-amd64.yaml +++ b/.github/workflows/build-kata-static-tarball-amd64.yaml @@ -217,7 +217,7 @@ jobs: build-asset-shim-v2: runs-on: ubuntu-22.04 - needs: [build-asset, build-asset-rootfs] + needs: [build-asset, build-asset-rootfs, remove-rootfs-binary-artifacts] steps: - name: Login to Kata Containers quay.io if: ${{ inputs.push-to-registry == 'yes' }} @@ -274,7 +274,7 @@ jobs: create-kata-tarball: runs-on: ubuntu-22.04 - needs: [build-asset, build-asset-rootfs, build-asset-shim-v2, remove-rootfs-binary-artifacts] + needs: [build-asset, build-asset-rootfs, build-asset-shim-v2] steps: - uses: actions/checkout@v4 with: diff --git a/.github/workflows/build-kata-static-tarball-arm64.yaml b/.github/workflows/build-kata-static-tarball-arm64.yaml index b8adde4c2e..d3399424ef 100644 --- a/.github/workflows/build-kata-static-tarball-arm64.yaml +++ b/.github/workflows/build-kata-static-tarball-arm64.yaml @@ -155,7 +155,7 @@ jobs: build-asset-shim-v2: runs-on: arm64-builder - needs: [build-asset, build-asset-rootfs] + needs: [build-asset, build-asset-rootfs, remove-rootfs-binary-artifacts] steps: - name: Login to Kata Containers quay.io if: ${{ inputs.push-to-registry == 'yes' }} @@ -210,7 +210,7 @@ jobs: create-kata-tarball: runs-on: arm64-builder - needs: [build-asset, build-asset-rootfs, build-asset-shim-v2, remove-rootfs-binary-artifacts] + needs: [build-asset, build-asset-rootfs, build-asset-shim-v2] steps: - name: Adjust a permission for repo run: | diff --git a/.github/workflows/build-kata-static-tarball-ppc64le.yaml b/.github/workflows/build-kata-static-tarball-ppc64le.yaml index 5f552b0db4..132b403b78 100644 --- a/.github/workflows/build-kata-static-tarball-ppc64le.yaml +++ b/.github/workflows/build-kata-static-tarball-ppc64le.yaml @@ -163,7 +163,7 @@ jobs: build-asset-shim-v2: runs-on: ppc64le - needs: [build-asset, build-asset-rootfs] + needs: [build-asset, build-asset-rootfs, remove-rootfs-binary-artifacts] steps: - name: Prepare the self-hosted runner run: | @@ -223,7 +223,7 @@ jobs: create-kata-tarball: runs-on: ppc64le - needs: [build-asset, build-asset-rootfs, build-asset-shim-v2, remove-rootfs-binary-artifacts] + needs: [build-asset, build-asset-rootfs, build-asset-shim-v2] steps: - name: Adjust a permission for repo run: | diff --git a/.github/workflows/build-kata-static-tarball-s390x.yaml b/.github/workflows/build-kata-static-tarball-s390x.yaml index 699e9598f2..d3f554d5d5 100644 --- a/.github/workflows/build-kata-static-tarball-s390x.yaml +++ b/.github/workflows/build-kata-static-tarball-s390x.yaml @@ -219,7 +219,7 @@ jobs: # We don't need the binaries installed in the rootfs as part of the tarball, so can delete them now we've built the rootfs remove-rootfs-binary-artifacts: runs-on: ubuntu-22.04 - needs: build-asset-rootfs + needs: [build-asset-rootfs, build-asset-boot-image-se] strategy: matrix: asset: @@ -233,7 +233,7 @@ jobs: build-asset-shim-v2: runs-on: s390x - needs: [build-asset, build-asset-rootfs] + needs: [build-asset, build-asset-rootfs, remove-rootfs-binary-artifacts] steps: - name: Login to Kata Containers quay.io if: ${{ inputs.push-to-registry == 'yes' }} @@ -295,7 +295,6 @@ jobs: - build-asset-rootfs - build-asset-boot-image-se - build-asset-shim-v2 - - remove-rootfs-binary-artifacts steps: - uses: actions/checkout@v4 with: