From c3f902d356be163683317b17effccccd1f40f98a Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Wed, 2 Dec 2026 14:51:57 +0000 Subject: [PATCH 1/2] fix(ci): name the tasks-check job without its matrix expression (#1532) When validate selects no task, the tasks-check job of repo-eval.yml is skipped by its `if:` before its matrix expands, and GitHub listed its name unevaluated, as `repo tasks check ${{ matrix.task }}`. The job is now named `repo tasks check`, so a skipped one is listed under that name, and a running one gets the matrix value GitHub appends, as `repo tasks check ()`. A test pins that no matrix job of the workflow has a `matrix.` expression in its name. A caller whose branch protection requires a task's check by the old name must require the new one. Signed-off-by: Anton Volkov --- .github/workflows/repo-eval.yml | 2 +- .../changelog.d/20261202_120000_tasks-check-job-name.md | 8 ++++++++ dokimi/tests/test_repo_eval_action_checkout.py | 9 +++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 dokimi/changelog.d/20261202_120000_tasks-check-job-name.md diff --git a/.github/workflows/repo-eval.yml b/.github/workflows/repo-eval.yml index d747a2543..da539e85c 100644 --- a/.github/workflows/repo-eval.yml +++ b/.github/workflows/repo-eval.yml @@ -363,7 +363,7 @@ jobs: if-no-files-found: ignore tasks-check: - name: repo tasks check ${{ matrix.task }} + name: repo tasks check needs: validate if: needs.validate.outputs.tasks != '[]' runs-on: ${{ inputs.runs-on }} diff --git a/dokimi/changelog.d/20261202_120000_tasks-check-job-name.md b/dokimi/changelog.d/20261202_120000_tasks-check-job-name.md new file mode 100644 index 000000000..24d8243b9 --- /dev/null +++ b/dokimi/changelog.d/20261202_120000_tasks-check-job-name.md @@ -0,0 +1,8 @@ + + +### Fixed + +- **A skipped `tasks-check` job of `repo-eval.yml` is no longer listed as `repo tasks check ${{ matrix.task }}`** (#1532) — when `validate` selects no task, the job is skipped before its matrix expands and GitHub showed the unevaluated expression in its name. The job is now named `repo tasks check`: a skipped one is listed under that name, and a running one with the matrix value GitHub appends, as `repo tasks check ()`. A caller whose branch protection requires a task's check by its old name (`repo tasks check `) must require the new one. diff --git a/dokimi/tests/test_repo_eval_action_checkout.py b/dokimi/tests/test_repo_eval_action_checkout.py index 707fe0a31..19614ea30 100644 --- a/dokimi/tests/test_repo_eval_action_checkout.py +++ b/dokimi/tests/test_repo_eval_action_checkout.py @@ -198,6 +198,15 @@ def test_scan_and_tasks_check_install_the_package_commit_validate_gated() -> Non assert workflow["jobs"]["validate"]["outputs"]["dokimi-sha"] == "${{ steps.dokimi.outputs.sha }}" +def test_a_matrix_job_name_holds_no_matrix_expression() -> None: + # A job skipped by its `if:` never expands its matrix, and GitHub then lists the raw expression in its name. + jobs = _load(REPO_EVAL)["jobs"] + matrix_jobs = {job_id: job for job_id, job in jobs.items() if "matrix" in job.get("strategy", {})} + assert "tasks-check" in matrix_jobs + for job_id, job in matrix_jobs.items(): + assert "matrix." not in str(job.get("name", "")), job_id + + def test_every_checkout_in_repo_eval_keeps_no_credentials() -> None: # The checkouts sit in jobs that run the checked-out task code: the token must not stay in .git/config. checkouts = [(job_id, step) for job_id, job in _load(REPO_EVAL)["jobs"].items() From cdea4623de5198d3e96654011c8eb1beccc8c8de Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Wed, 2 Dec 2026 16:17:36 +0000 Subject: [PATCH 2/2] fix(ci): name the test-seeds job without its matrix expression (#1532) The test-seeds job of ci.yml is skipped by its `if:` on every pull request and push, before its matrix expands, so GitHub listed its name unevaluated, as `Tests (seed ${{ matrix.leg }})`, the same way as the tasks-check job of repo-eval.yml. The job is now named `Tests (seed)`; a running leg gets the matrix value GitHub appends. The test that pins a matrix job's name now covers both workflows, and CONTRIBUTING.md names the job as `Tests (seed)`. A ruleset that requires `Tests (seed )` by name must require the new form. Signed-off-by: Anton Volkov --- .github/workflows/ci.yml | 2 +- dokimi/CONTRIBUTING.md | 2 +- .../20261202_120000_tasks-check-job-name.md | 2 +- dokimi/tests/test_repo_eval_action_checkout.py | 17 ++++++++++++----- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e6b81bf93..2d0977afd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -518,7 +518,7 @@ jobs: # Whole suite on the lock under four fresh random seeds a week, to find order dependence before it fails a PR. # Schedule and dispatch only: https://github.com/intel/dokimi/issues/1059 test-seeds: - name: Tests (seed ${{ matrix.leg }}) + name: Tests (seed) timeout-minutes: 30 if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' runs-on: ${{ github.repository_owner == 'intel' && github.event_name == 'pull_request' && vars.LINUX_RUNNER_OFF != 'true' && 'dokimi-ec2' || 'ubuntu-latest' }} diff --git a/dokimi/CONTRIBUTING.md b/dokimi/CONTRIBUTING.md index c5dd52682..ad04dadae 100644 --- a/dokimi/CONTRIBUTING.md +++ b/dokimi/CONTRIBUTING.md @@ -106,7 +106,7 @@ CI additionally holds a PR to: under `-n auto` with `--randomly-seed` 1 to 20 (`scripts/repeat_changed_tests.py`), at most 10 files; the log names the rest. It stops at the first failing seed and prints it for replay. Run it locally with `python scripts/repeat_changed_tests.py --base /main`. -- **Not a PR check. Seeds run weekly.** The weekly and manual run of `ci.yml` also runs the `Tests (seed N)` +- **Not a PR check. Seeds run weekly.** The weekly and manual run of `ci.yml` also runs the `Tests (seed)` job: the whole suite on `main` (a manual run too, whichever branch it is started on) under `-n auto` in four legs, each with its own `--randomly-seed` (`GITHUB_RUN_NUMBER * 10 + leg`). The `Pick the seed` step prints the seed and the job summary shows it; replay a failing leg with `pytest -n auto --randomly-seed=`. diff --git a/dokimi/changelog.d/20261202_120000_tasks-check-job-name.md b/dokimi/changelog.d/20261202_120000_tasks-check-job-name.md index 24d8243b9..39bb3bcfb 100644 --- a/dokimi/changelog.d/20261202_120000_tasks-check-job-name.md +++ b/dokimi/changelog.d/20261202_120000_tasks-check-job-name.md @@ -5,4 +5,4 @@ SPDX-License-Identifier: Apache-2.0 ### Fixed -- **A skipped `tasks-check` job of `repo-eval.yml` is no longer listed as `repo tasks check ${{ matrix.task }}`** (#1532) — when `validate` selects no task, the job is skipped before its matrix expands and GitHub showed the unevaluated expression in its name. The job is now named `repo tasks check`: a skipped one is listed under that name, and a running one with the matrix value GitHub appends, as `repo tasks check ()`. A caller whose branch protection requires a task's check by its old name (`repo tasks check `) must require the new one. +- **A skipped `tasks-check` job of `repo-eval.yml` and a skipped `test-seeds` job of `ci.yml` are no longer listed with an unevaluated matrix expression** (#1532) — a job skipped by its `if:` never expands its matrix, and GitHub showed the raw expression in its name (`repo tasks check ${{ matrix.task }}`, `Tests (seed ${{ matrix.leg }})`). The jobs are now named `repo tasks check` and `Tests (seed)`: a skipped one is listed under that name, and a running one with the matrix value GitHub appends, as `repo tasks check ()`. A caller whose branch protection requires a task's check by its old name (`repo tasks check `), or a ruleset that requires `Tests (seed )`, must require the new form. diff --git a/dokimi/tests/test_repo_eval_action_checkout.py b/dokimi/tests/test_repo_eval_action_checkout.py index 19614ea30..3e4276e40 100644 --- a/dokimi/tests/test_repo_eval_action_checkout.py +++ b/dokimi/tests/test_repo_eval_action_checkout.py @@ -15,9 +15,11 @@ from pathlib import Path +import pytest import yaml ROOT = Path(__file__).resolve().parents[2] +CI = ROOT / ".github/workflows/ci.yml" REPO_EVAL = ROOT / ".github/workflows/repo-eval.yml" REPO_EVAL_SELF = ROOT / ".github/workflows/repo-eval-self.yml" CHECKOUT_PATH = ".dokimi-action" @@ -198,12 +200,17 @@ def test_scan_and_tasks_check_install_the_package_commit_validate_gated() -> Non assert workflow["jobs"]["validate"]["outputs"]["dokimi-sha"] == "${{ steps.dokimi.outputs.sha }}" -def test_a_matrix_job_name_holds_no_matrix_expression() -> None: +@pytest.mark.parametrize( + ("workflow", "skippable_job"), + [(REPO_EVAL, "tasks-check"), (CI, "test-seeds")], + ids=["repo-eval", "ci"], +) +def test_a_matrix_job_name_holds_no_matrix_expression(workflow: Path, skippable_job: str) -> None: # A job skipped by its `if:` never expands its matrix, and GitHub then lists the raw expression in its name. - jobs = _load(REPO_EVAL)["jobs"] - matrix_jobs = {job_id: job for job_id, job in jobs.items() if "matrix" in job.get("strategy", {})} - assert "tasks-check" in matrix_jobs - for job_id, job in matrix_jobs.items(): + jobs = _load(workflow)["jobs"] + skippable = {job_id: job for job_id, job in jobs.items() if "matrix" in job.get("strategy", {}) and "if" in job} + assert skippable_job in skippable + for job_id, job in skippable.items(): assert "matrix." not in str(job.get("name", "")), job_id