From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0C29642FB6 for ; Wed, 2 Aug 2023 08:54:15 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 07F8843252; Wed, 2 Aug 2023 08:54:15 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 976B94021D for ; Wed, 2 Aug 2023 08:54:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1690959253; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZMls3BtXsXweYyUYhbdE8bQ8X6QnC+zqkRIv4fddhGw=; b=RxtfKlW8zhEvqXPy0MI2NmRh1yjJ+uMuA0Ty6dEaCnt6xlhj8CC6Wlsq1LDl/dCPWYd6ci N++VkZqobfaulYR8p1Rd9/fpgLhLM8EmJiKezG+TueEt0p4fC2uNc97I6sWzFK5n0GWjey mxWnJjPcfZ/WPEx68H2MDTYbvChxc78= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-546-qneZNEurNl24nf4mydtFFg-1; Wed, 02 Aug 2023 02:54:09 -0400 X-MC-Unique: qneZNEurNl24nf4mydtFFg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9FFF880027F; Wed, 2 Aug 2023 06:54:08 +0000 (UTC) Received: from dmarchan.redhat.com (unknown [10.45.224.120]) by smtp.corp.redhat.com (Postfix) with ESMTP id 95B591121325; Wed, 2 Aug 2023 06:54:07 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: stephen@networkplumber.org, stable@dpdk.org, Aaron Conole , Michael Santana Subject: [PATCH] ci: fix race on container image name Date: Wed, 2 Aug 2023 08:54:04 +0200 Message-ID: <20230802065404.3807143-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org 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 --- .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