From c8b29d6f6f9a7953e41fc71a6a7c6762cf489c39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ber=C3=A1nek?= Date: Thu, 9 Jan 2025 21:40:29 +0100 Subject: [PATCH] CI: fix name of jobs There is a difference between the `image` (the Dockerfile), the `name` of the job (which determines also its properties) and the `full_name`, which includes the `auto/try/pr` prefix. --- .github/workflows/ci.yml | 6 +++--- src/ci/github-actions/ci.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d8d7560ffcf41..c650df6a0ec2a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,7 +59,7 @@ jobs: run: python3 src/ci/github-actions/ci.py calculate-job-matrix >> $GITHUB_OUTPUT id: jobs job: - name: ${{ matrix.name }} + name: ${{ matrix.full_name }} needs: [ calculate_matrix ] runs-on: "${{ matrix.os }}" defaults: @@ -67,7 +67,7 @@ jobs: shell: ${{ contains(matrix.os, 'windows') && 'msys2 {0}' || 'bash' }} timeout-minutes: 360 env: - CI_JOB_NAME: ${{ matrix.image }} + CI_JOB_NAME: ${{ matrix.name }} CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse # commit of PR sha or commit sha. `GITHUB_SHA` is not accurate for PRs. HEAD_SHA: ${{ github.event.pull_request.head.sha || github.sha }} @@ -233,7 +233,7 @@ jobs: env: DATADOG_SITE: datadoghq.com DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }} - DD_GITHUB_JOB_NAME: ${{ matrix.name }} + DD_GITHUB_JOB_NAME: ${{ matrix.full_name }} run: | cd src/ci npm ci diff --git a/src/ci/github-actions/ci.py b/src/ci/github-actions/ci.py index 97539cf1cdb24..b7dac412dbecf 100755 --- a/src/ci/github-actions/ci.py +++ b/src/ci/github-actions/ci.py @@ -37,7 +37,7 @@ def add_job_properties(jobs: List[Dict], prefix: str) -> List[Job]: # Create a copy of the `job` dictionary to avoid modifying `jobs` new_job = dict(job) new_job["image"] = get_job_image(new_job) - new_job["name"] = f"{prefix} - {new_job['name']}" + new_job["full_name"] = f"{prefix} - {new_job['name']}" modified_jobs.append(new_job) return modified_jobs