git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] ci(github): make Windows test artifacts name unique

From
Philippe Blain via GitGitGadget <gitgitgadget@gmail.com>
Date
Mar 10, 2024, 20:04 UTC
Message-ID
<pull.1688.git.1710101097072.gitgitgadget@gmail.com>
From: Philippe Blain <levraiphilippeblain@gmail.com>

If several jobs in the windows-test or vs-test matrices fail, the upload-artifact action in each job tries to upload the test directories of the failed tests as "failed-tests-windows.zip", which fails for all jobs except the one which finishes first with the following error:

    Error: Failed to CreateArtifact: Received non-retryable error:
    Failed request: (409) Conflict: an artifact with this name
    already exists on the workflow run

Make the artifacts name unique by using the 'matrix.nr' token, and disambiguate the vs-test artifacts from the windows-test ones.

Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com>
---
    ci(github): make Windows test artifacts name unique
    
    I noticed this while working on another series and thought it deserved a
    quick fix.
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1688%2Fphil-blain%2Fci-unique-windows-artifacts-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1688/phil-blain/ci-unique-windows-artifacts-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1688
 .github/workflows/main.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 683a2d633ed..3428773b096 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -159,7 +159,7 @@ jobs:
       if: failure() && env.FAILED_TEST_ARTIFACTS != ''
       uses: actions/upload-artifact@v4
       with:
-        name: failed-tests-windows
+        name: failed-tests-windows-${{ matrix.nr }}
         path: ${{env.FAILED_TEST_ARTIFACTS}}
   vs-build:
     name: win+VS build
@@ -250,7 +250,7 @@ jobs:
       if: failure() && env.FAILED_TEST_ARTIFACTS != ''
       uses: actions/upload-artifact@v4
       with:
-        name: failed-tests-windows
+        name: failed-tests-windows-vs-${{ matrix.nr }}
         path: ${{env.FAILED_TEST_ARTIFACTS}}
   regular:
     name: ${{matrix.vector.jobname}} (${{matrix.vector.pool}})

base-commit: e09f1254c54329773904fe25d7c545a1fb4fa920
-- 
gitgitgadget
Message 1 of 1 in “ci(github): make Windows test artifacts name unique”
  1. ci(github): make Windows test artifacts name uniquePhilippe Blain via GitGitGadget, Mar 10, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.