From a100d091a07cccbfbc2440fdc4a9de4b261e04f4 Mon Sep 17 00:00:00 2001 From: Aliaksandr Date: Wed, 17 Jun 2026 00:43:05 +0300 Subject: [PATCH] ci/eval: name the base branch in the performance comparison summary The performance comparison summary previously stated it compared against "its pull request base branch (e.g., 'master')" regardless of the actual base branch. Plumb the base branch classification computed in prepare.js through the eval workflow to the `compare` derivation so the summary names the real base branch (e.g. "staging-25.11"). The local `eval.full` helper defaults to "master", matching its touched-files convention. Assisted-by: claude-code with claude-opus-4-8[1m]-high --- .github/workflows/eval.yml | 5 +++++ .github/workflows/merge-group.yml | 1 + .github/workflows/pull-request-target.yml | 1 + ci/eval/compare/default.nix | 3 ++- ci/eval/default.nix | 5 ++++- 5 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/eval.yml b/.github/workflows/eval.yml index dd2ea029dcd6..0b576a464220 100644 --- a/.github/workflows/eval.yml +++ b/.github/workflows/eval.yml @@ -15,6 +15,9 @@ on: targetSha: required: true type: string + baseBranch: + required: true + type: string systems: required: true type: string @@ -291,6 +294,7 @@ jobs: - name: Compare against the target branch env: TARGET_SHA: ${{ inputs.mergedSha }} + BASE_BRANCH: ${{ fromJSON(inputs.baseBranch).branch }} run: | git -C nixpkgs/trusted diff --name-only "$TARGET_SHA" \ | jq --raw-input --slurp 'split("\n")[:-1]' > touched-files.json @@ -299,6 +303,7 @@ jobs: nix-build nixpkgs/trusted/ci --arg nixpkgs ./nixpkgs/trusted-pinned -A eval.compare \ --arg combinedDir ./combined \ --arg touchedFilesJson ./touched-files.json \ + --argstr baseBranch "$BASE_BRANCH" \ --out-link comparison cat comparison/step-summary.md >> "$GITHUB_STEP_SUMMARY" diff --git a/.github/workflows/merge-group.yml b/.github/workflows/merge-group.yml index 6ff67aefae60..196bf3040068 100644 --- a/.github/workflows/merge-group.yml +++ b/.github/workflows/merge-group.yml @@ -97,6 +97,7 @@ jobs: artifact-prefix: ${{ inputs.artifact-prefix }} mergedSha: ${{ needs.prepare.outputs.mergedSha }} targetSha: ${{ needs.prepare.outputs.targetSha }} + baseBranch: ${{ needs.prepare.outputs.baseBranch }} systems: ${{ needs.prepare.outputs.systems }} build: diff --git a/.github/workflows/pull-request-target.yml b/.github/workflows/pull-request-target.yml index 8edde367c13b..d4fda08d2e01 100644 --- a/.github/workflows/pull-request-target.yml +++ b/.github/workflows/pull-request-target.yml @@ -110,6 +110,7 @@ jobs: mergedSha: ${{ needs.prepare.outputs.mergedSha }} headSha: ${{ github.event.pull_request.head.sha }} targetSha: ${{ needs.prepare.outputs.targetSha }} + baseBranch: ${{ needs.prepare.outputs.baseBranch }} systems: ${{ needs.prepare.outputs.systems }} testVersions: ${{ contains(fromJSON(needs.prepare.outputs.touched), 'pinned') && !contains(fromJSON(needs.prepare.outputs.headBranch).type, 'development') }} diff --git a/ci/eval/compare/default.nix b/ci/eval/compare/default.nix index 856969ee8695..183e3bab8d41 100644 --- a/ci/eval/compare/default.nix +++ b/ci/eval/compare/default.nix @@ -49,6 +49,7 @@ in { combinedDir, touchedFilesJson, + baseBranch, ownersFile ? ../../OWNERS, }: let @@ -242,7 +243,7 @@ runCommand "compare" echo echo "# Performance comparison" echo - echo "This compares the performance of this branch against its pull request base branch (e.g., 'master')" + echo "This compares the performance of this branch against the \`${baseBranch}\` branch." echo } >> $out/step-summary.md diff --git a/ci/eval/default.nix b/ci/eval/default.nix index 7c0a2e9f3139..2e8bec41ca5d 100644 --- a/ci/eval/default.nix +++ b/ci/eval/default.nix @@ -288,6 +288,9 @@ let # | jq --raw-input --slurp 'split("\n")[:-1]' > touched-files.json # ``` touchedFilesJson ? builtins.toFile "touched-files.json" "[ ]", + # The branch the local comparison is made against; matches the `master` + # used in the touched-files expression above. + baseBranch ? "master", }: let diffs = symlinkJoin { @@ -305,7 +308,7 @@ let }; comparisonReport = compare { combinedDir = combine { diffDir = diffs; }; - inherit touchedFilesJson; + inherit touchedFilesJson baseBranch; }; in comparisonReport;