Skip to content

ci: revert test workflows to listen on CI-trigger completion#5595

Merged
renecannao merged 1 commit intov3.0from
fix/ci-workflow-run-chain-pr-sha
Apr 10, 2026
Merged

ci: revert test workflows to listen on CI-trigger completion#5595
renecannao merged 1 commit intov3.0from
fix/ci-workflow-run-chain-pr-sha

Conversation

@renecannao
Copy link
Copy Markdown
Contributor

@renecannao renecannao commented Apr 10, 2026

Summary

  • Reverts 32 test workflows to trigger on CI-trigger completion instead of CI-builds completion (as they were before commit 9671a41).
  • Fixes PR CI runs that were checking out and testing v3.0 HEAD instead of the PR commit.
  • One-line change per file; no other logic touched.

Root cause

Commit 9671a41 ("ci: comprehensive CI workflow and infrastructure fixes") changed 32 test workflows from:

workflow_run:
  workflows: [ CI-trigger ]

to:

workflow_run:
  workflows: [ CI-builds ]

A workflow_run-triggered workflow receives github.event.workflow_run.head_sha equal to the SHA of the workflow run that triggered it. Since CI-builds is itself workflow_run-triggered, it always runs on the default branch (v3.0) with its own head_sha pointing at v3.0 HEAD — not at the PR commit. Chaining the test workflows off CI-builds therefore caused every test run to check out v3.0 code instead of the PR code.

Why listening on CI-trigger is safe

CI-trigger is pull_request-triggered, so its head_sha is the PR commit. It also contains a babysitter step (gh run watch on CI-builds) that blocks until CI-builds finishes, so test workflows gated on CI-trigger completion still wait for build artifacts to be ready.

Evidence

Before this fix, on PR commits:

  • CI-trigger ran on the PR branch (correct head_sha).
  • CI-builds ran on default branch with head_sha = v3.0 HEAD.
  • All 32 chained test workflows inherited the v3.0 head_sha and tested v3.0 code.
  • Visible symptom: PR commits only ran 3 workflows (CI-trigger, Claude Code Review, CI-lint-groups-json), while merge commits on v3.0 ran the full ~35 workflows.

Note on testability

This PR itself will not exercise the fix — workflow_run-triggered workflows always read their YAML from the default branch, so the chained test workflows will continue to use the buggy v3.0 version until this PR is merged. The fix will take effect automatically on all open PRs (including new pushes to existing PRs) once merged into v3.0.

Test plan

  • Review diff: confirm exactly 32 files changed, each with a single line workflows: [ CI-builds ]workflows: [ CI-trigger ].
  • Merge into v3.0.
  • Push a commit to any open PR and verify that the full suite of chained test workflows now runs with the PR's head_sha.

Summary by CodeRabbit

  • Chores
    • Reconfigured CI workflow triggers across all test suites to depend on a new upstream workflow for consistent test execution orchestration.

Commit 9671a41 changed 32 test workflows to trigger on CI-builds
completion instead of CI-trigger completion. This broke PR CI runs:
workflow_run-triggered workflows receive the head_sha of the workflow
that triggered them, and CI-builds (itself workflow_run-triggered) runs
on the default branch with head_sha pointing at v3.0 HEAD rather than
the PR commit. As a result, all chained test workflows were checking
out and testing v3.0 code instead of PR code.

Revert to the original design where test workflows listen on CI-trigger
(which is pull_request-triggered and carries the PR head_sha). CI-trigger
already contains a babysitter step (gh run watch on CI-builds) that
blocks until the build artifacts are ready, so gating on CI-trigger
completion still waits for builds.

Affects 32 workflow files — only the workflow_run.workflows entry is
changed, no other logic touched.
@gemini-code-assist
Copy link
Copy Markdown

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 10, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d7ae122d-6e45-465d-b364-9ab2a40f8f57

📥 Commits

Reviewing files that changed from the base of the PR and between 29a95af and 78b8f5a.

📒 Files selected for processing (32)
  • .github/workflows/CI-3p-aiomysql.yml
  • .github/workflows/CI-3p-django-framework.yml
  • .github/workflows/CI-3p-laravel-framework.yml
  • .github/workflows/CI-3p-mariadb-connector-c.yml
  • .github/workflows/CI-3p-mysql-connector-j.yml
  • .github/workflows/CI-3p-pgjdbc.yml
  • .github/workflows/CI-3p-php-pdo-mysql.yml
  • .github/workflows/CI-3p-php-pdo-pgsql.yml
  • .github/workflows/CI-3p-postgresql.yml
  • .github/workflows/CI-3p-sqlalchemy.yml
  • .github/workflows/CI-basictests.yml
  • .github/workflows/CI-legacy-clickhouse-g1.yml
  • .github/workflows/CI-legacy-g1.yml
  • .github/workflows/CI-legacy-g2-genai.yml
  • .github/workflows/CI-legacy-g2.yml
  • .github/workflows/CI-legacy-g3.yml
  • .github/workflows/CI-legacy-g4.yml
  • .github/workflows/CI-legacy-g5.yml
  • .github/workflows/CI-maketest.yml
  • .github/workflows/CI-mysql84-g1.yml
  • .github/workflows/CI-mysql84-g2.yml
  • .github/workflows/CI-mysql84-g3.yml
  • .github/workflows/CI-mysql84-g4.yml
  • .github/workflows/CI-mysql84-g5.yml
  • .github/workflows/CI-repltests.yml
  • .github/workflows/CI-selftests.yml
  • .github/workflows/CI-shuntest.yml
  • .github/workflows/CI-taptests-asan.yml
  • .github/workflows/CI-taptests-groups.yml
  • .github/workflows/CI-taptests-pgsql-cluster.yml
  • .github/workflows/CI-taptests-ssl.yml
  • .github/workflows/CI-taptests.yml
📜 Recent review details
🔇 Additional comments (32)
.github/workflows/CI-mysql84-g1.yml (1)

7-7: Trigger revert is correct for PR SHA propagation.

Switching the upstream filter back to CI-trigger aligns with the intended workflow chain and should restore downstream execution on the PR commit SHA.

.github/workflows/CI-legacy-g3.yml (1)

7-7: Looks good — upstream dependency is now aligned.

This keeps the downstream logic intact while restoring the intended workflow_run source for correct PR-context execution.

.github/workflows/CI-mysql84-g3.yml (1)

7-7: Correct trigger source update.

The workflow now listens to CI-trigger, which is the right upstream for preserving PR head_sha in chained runs.

.github/workflows/CI-3p-php-pdo-pgsql.yml (1)

12-12: Targeted and correct workflow_run source change.

This is a clean revert to CI-trigger with no unintended changes to inputs or job parameters.

.github/workflows/CI-mysql84-g4.yml (1)

7-7: Revert is correct and scoped.

Using CI-trigger here is consistent with the chain fix and keeps the rest of execution semantics unchanged.

.github/workflows/CI-3p-postgresql.yml (1)

12-12: Good change — preserves existing guard logic while fixing event source.

Moving workflow_run.workflows to CI-trigger should restore correct PR commit targeting without altering the v2.* exclusion behavior.

.github/workflows/CI-taptests-groups.yml (1)

7-7: Approved — trigger dependency is corrected.

This update keeps the workflow behavior stable while fixing the upstream event lineage for downstream test execution.

.github/workflows/CI-3p-mysql-connector-j.yml (1)

12-12: Change is correct for both downstream job paths.

Switching to CI-trigger is the right fix here and should apply equally to both run-mysql and run-mariadb branches of this workflow.

.github/workflows/CI-3p-pgjdbc.yml (1)

12-12: Trigger source correction looks right.

Switching to CI-trigger here aligns downstream execution with the PR-origin workflow_run.head_sha, which matches the fix intent.

.github/workflows/CI-selftests.yml (1)

7-7: Good revert on upstream workflow filter.

Using CI-trigger instead of CI-builds is consistent with preserving the PR commit context for this downstream workflow.

.github/workflows/CI-taptests.yml (1)

7-7: Approved: trigger now follows PR-aware workflow.

This update correctly points the workflow_run dependency at CI-trigger, matching the intended chain behavior.

.github/workflows/CI-taptests-asan.yml (1)

7-7: Looks good.

The trigger source change to CI-trigger is consistent with the SHA-fix strategy for chained workflows.

.github/workflows/CI-basictests.yml (1)

7-7: Revert is correct here as well.

Pointing this listener back to CI-trigger matches the intended PR-head execution path.

.github/workflows/CI-mysql84-g2.yml (1)

7-7: Nice, this aligns with the PR fix.

Using CI-trigger as the completed upstream workflow is the expected correction for chained run context.

.github/workflows/CI-mysql84-g5.yml (1)

7-7: Approved trigger update.

This change is consistent with restoring PR head_sha behavior for downstream tests.

.github/workflows/CI-legacy-g2.yml (1)

7-7: Change is correct and consistent.

Listening on CI-trigger here fits the same PR-commit propagation fix applied across the suite.

.github/workflows/CI-3p-mariadb-connector-c.yml (1)

12-12: Trigger source revert is correct for PR SHA propagation.

Switching workflow_run.workflows to CI-trigger aligns with the intended fix and preserves downstream runs on the PR head context.

.github/workflows/CI-legacy-g2-genai.yml (1)

7-7: Looks good: upstream trigger now points to CI-trigger.

This change is consistent with the workflow chain fix and keeps downstream execution behavior intact.

.github/workflows/CI-taptests-pgsql-cluster.yml (1)

7-7: Correct upstream workflow selected.

Using CI-trigger here fits the existing SHA wiring in this workflow and supports running tests against PR commits.

.github/workflows/CI-legacy-g4.yml (1)

7-7: Approved trigger revert.

The CI-buildsCI-trigger swap is consistent with the PR’s CI chain fix.

.github/workflows/CI-maketest.yml (1)

7-7: Good change; trigger target now matches intended chain entrypoint.

No concerns with this segment.

.github/workflows/CI-3p-php-pdo-mysql.yml (1)

12-12: Trigger update is correct.

This aligns the workflow with the restored CI-trigger-based run chain.

.github/workflows/CI-legacy-g1.yml (1)

7-7: LGTM on the trigger switch.

This change is consistent with the CI workflow_run chain correction.

.github/workflows/CI-legacy-clickhouse-g1.yml (1)

7-7: Approved.

workflow_run now listens to the correct upstream workflow for this fix.

.github/workflows/CI-3p-laravel-framework.yml (1)

12-12: Trigger source update is correct for PR SHA propagation.

Line 12 now listens to CI-trigger, which matches the intended upstream for preserving PR head_sha in chained workflows.

.github/workflows/CI-taptests-ssl.yml (1)

7-7: Good trigger rewire to CI-trigger.

Line 7 correctly switches the workflow_run dependency to CI-trigger with no unintended side effects in this file.

.github/workflows/CI-shuntest.yml (1)

7-7: Correct upstream workflow selection.

Line 7 is correctly pointed to CI-trigger, consistent with the intended chain origin for PR-based runs.

.github/workflows/CI-3p-aiomysql.yml (1)

12-12: This trigger change is aligned and correct.

Line 12 now references CI-trigger, which is the right upstream to avoid default-branch SHA leakage into downstream tests.

.github/workflows/CI-repltests.yml (1)

7-7: Nice one-line fix to the workflow chain root.

Line 7 correctly points to CI-trigger, preserving expected PR-context execution for this workflow.

.github/workflows/CI-3p-sqlalchemy.yml (1)

12-12: Upstream trigger is correctly restored.

Line 12 now listens to CI-trigger, which is consistent with the intended PR-head based chaining behavior.

.github/workflows/CI-legacy-g5.yml (1)

7-7: Looks good: trigger source reverted as intended.

Line 7 correctly switches this legacy group workflow to run after CI-trigger completion.

.github/workflows/CI-3p-django-framework.yml (1)

12-12: Correct trigger source for downstream 3p test jobs.

Line 12 is properly set to CI-trigger, aligning this workflow with the intended PR commit execution path.


📝 Walkthrough

Walkthrough

This PR updates 27 GitHub Actions workflow files to change their upstream workflow_run trigger dependency from CI-builds to CI-trigger, causing all downstream jobs to now execute only after the CI-trigger workflow completes instead of CI-builds.

Changes

Cohort / File(s) Summary
Third-party integration tests
CI-3p-aiomysql.yml, CI-3p-django-framework.yml, CI-3p-laravel-framework.yml, CI-3p-mariadb-connector-c.yml, CI-3p-mysql-connector-j.yml, CI-3p-pgjdbc.yml, CI-3p-php-pdo-mysql.yml, CI-3p-php-pdo-pgsql.yml, CI-3p-postgresql.yml, CI-3p-sqlalchemy.yml
Updated workflow_run trigger from CI-builds to CI-trigger for all third-party library integration test workflows.
Legacy test workflows
CI-legacy-clickhouse-g1.yml, CI-legacy-g1.yml, CI-legacy-g2-genai.yml, CI-legacy-g2.yml, CI-legacy-g3.yml, CI-legacy-g4.yml, CI-legacy-g5.yml
Updated workflow_run trigger from CI-builds to CI-trigger for all legacy test group workflows.
MySQL 8.4 test workflows
CI-mysql84-g1.yml, CI-mysql84-g2.yml, CI-mysql84-g3.yml, CI-mysql84-g4.yml, CI-mysql84-g5.yml
Updated workflow_run trigger from CI-builds to CI-trigger for all MySQL 8.4 test group workflows.
TAP test workflows
CI-taptests-asan.yml, CI-taptests-groups.yml, CI-taptests-pgsql-cluster.yml, CI-taptests-ssl.yml, CI-taptests.yml
Updated workflow_run trigger from CI-builds to CI-trigger for all TAP test workflows.
Core test workflows
CI-basictests.yml, CI-maketest.yml, CI-repltests.yml, CI-selftests.yml, CI-shuntest.yml
Updated workflow_run trigger from CI-builds to CI-trigger for core test execution workflows.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~4 minutes

Possibly related PRs

Poem

🐰 Hop, skip, and a trigger away,
From builds old to trigger's new day,
Twenty-seven workflows dance in the CI queue,
Each listening for signals both faithful and true!
The rabbit rewires the orchestral play. 🎭✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: reverting workflow trigger configurations from CI-builds back to CI-trigger across 32 workflow files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ci-workflow-run-chain-pr-sha

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@renecannao renecannao merged commit 904807c into v3.0 Apr 10, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant