-
[OPIK-6209] [CI] perf: reduce SDK E2E matrix to min+max on BE-only PRs (#6476)
发布于
2026-04-26 05:23:37 +00:00 - [OPIK-6209] [CI] perf: reduce SDK E2E matrix to min+max on BE-only PRs
Escalation of OPIK-6019. Adds a composite action
.github/actions/select-e2e-matrixthat inspects the PR or merge
commit's changed files and emits either the full version array or
[min, max]. Each of the 5 SDK E2E workflows now calls it from a
select-matrixpre-job and consumes the output in its strategy matrix.Result: BE-only PRs (and BE-only post-merge) run SDK E2E on 2 versions
instead of 5 (Python) / 3 (Node). SDK-touching changes keep the full
matrix.workflow_dispatchalways runs full.- test(ci): temporarily drop workflow self-reference to verify reduced-matrix path
This commit intentionally removes the '|^.github/workflows/.yml$'
alternative from each workflow's SDK-touching regex so that PR #6476,
which edits only workflow files, exercises the reduced-matrix code path
([min, max] versions) as a self-demo.Will be reverted in a follow-up commit to restore the safety net: any
workflow-YAML edit should run the full matrix to catch regressions in
the workflow logic itself.- revert(ci): restore workflow self-reference after CI demo
Reverts 6a1c1b984a. With that commit merged, PR #6476 demonstrated
the reduced-matrix path ([min, max]) on CI. Restoring the
'|^.github/workflows/.yml$' alternative in each regex returns
the intended safety net: any workflow-YAML edit runs the full matrix.- fix(select-e2e-matrix): aggregate files across full push range
Addresses Baz review on PR #6476. Previously, push events inspected only
the tip commit via /commits/:sha, which misses SDK-touching files landed
in earlier commits of a multi-commit push (rebase-merge, direct pushes).
Use the compare API for $BEFORE...$SHA instead. Falls back to tip-commit
inspection when $BEFORE is zero/missing (branch creation, force push).- perf(select-matrix): sparse-checkout only the composite action
The select-matrix pre-job only needs .github/actions/select-e2e-matrix/action.yml
to resolve the composite action reference; gh api calls are filesystem-independent.
Limiting checkout to that single path shaves roughly 6-8s from each pre-job.下载附件