From patchwork Wed Aug 2 06:54:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 129813 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1CF3442FB5; Wed, 2 Aug 2023 08:54:14 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D57CA410DC; Wed, 2 Aug 2023 08:54:13 +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 CA0824021D for ; Wed, 2 Aug 2023 08:54:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1690959252; 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=SI2rKLV08TgwSui31WeawA83fkBc5EjPte3fY+76dGArsThlUA9zEJ6r59e1j+Dy1jQvHv v8Uk6snMGJR5Yb4aLMkpIh7XSlWgg5L+c17uKh+NeHzoDkGnsVprExjHQqdWBVe+gZ2+MZ 8pN514bJrEQfWvUfBQSwYJ5NpqDx8bw= 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 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-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 Acked-by: Aaron Conole --- .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: |