From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: stephen@networkplumber.org, stable@dpdk.org,
Aaron Conole <aconole@redhat.com>,
Michael Santana <maicolgabriel@hotmail.com>
Subject: [PATCH] ci: fix race on container image name
Date: Wed, 2 Aug 2023 08:54:04 +0200 [thread overview]
Message-ID: <20230802065404.3807143-1-david.marchand@redhat.com> (raw)
We had a race on the container image name when the prepare job was
running a day before the build job was triggered.
Example:
- a prepare job generated image name on 2023/08/01:
2023-08-01T23:59:32.9711845Z ++ date -u +%Y-%m-%d
2023-08-01T23:59:32.9713485Z + echo image=image-fedora:37-2023-08-01
- a few seconds later, the build jobs later tried to use a different
image name on 2023/08/02:
2023-08-02T00:01:29.9103180Z ++ date -u +%Y-%m-%d
2023-08-02T00:01:29.9113486Z + echo image=image-fedora:37-2023-08-02
Fix this by directly reusing the prepare job output.
Fixes: b35c4b0aa2bc ("ci: add Fedora 35 container in GHA")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
.github/workflows/build.yml | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 2c1eda9b18..7a2ac0ceee 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -148,6 +148,8 @@ jobs:
prepare-container-images:
name: ${{ join(matrix.config.*, '-') }}
runs-on: ubuntu-latest
+ outputs:
+ image: ${{ steps.get_keys.outputs.image }}
strategy:
fail-fast: false
@@ -214,14 +216,13 @@ jobs:
id: get_keys
run: |
echo 'ccache=ccache-${{ matrix.config.image }}-${{ matrix.config.compiler }}-'$(date -u +%Y-w%W) >> $GITHUB_OUTPUT
- echo 'image=image-${{ matrix.config.image }}-'$(date -u +%Y-%m-%d) >> $GITHUB_OUTPUT
echo 'logs=meson-logs-${{ join(matrix.config.*, '-') }}' | tr -d ':' >> $GITHUB_OUTPUT
- name: Retrieve image cache
id: image_cache
uses: actions/cache@v3
with:
path: ~/.image
- key: ${{ steps.get_keys.outputs.image }}
+ key: ${{ needs.prepare-container-images.outputs.image }}
- name: Fail if no image (not supposed to happen)
if: steps.image_cache.outputs.cache-hit != 'true'
run: |
--
2.41.0
next reply other threads:[~2023-08-02 6:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-02 6:54 David Marchand [this message]
2023-08-02 12:44 ` Aaron Conole
2023-08-04 13:02 ` David Marchand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230802065404.3807143-1-david.marchand@redhat.com \
--to=david.marchand@redhat.com \
--cc=aconole@redhat.com \
--cc=dev@dpdk.org \
--cc=maicolgabriel@hotmail.com \
--cc=stable@dpdk.org \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).