Skip to content

feat(ci): run workflows in the merge queue#397

Open
Kiran01bm wants to merge 4 commits into
mainfrom
kiran01bm/ci-merge-queue-trigger
Open

feat(ci): run workflows in the merge queue#397
Kiran01bm wants to merge 4 commits into
mainfrom
kiran01bm/ci-merge-queue-trigger

Conversation

@Kiran01bm

@Kiran01bm Kiran01bm commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

What

Add a merge_group trigger to the test, lint, and docker workflows so
their checks report on the merge-queue ref. Also re-gate the docker publish
steps (QEMU, registry login, push:, multi-arch platforms:) to run only on
push events, so the queue validates the image build without logging in or
publishing.

Why

A merge queue requires every required status check to run on the merge_group
event, or the queue stalls forever. The changes job already resolves
code=true for non-PR events, so the full suite runs in the queue with no extra
logic. The publish re-gating fixes a footgun: the old != 'pull_request'
condition is true for merge_group, which would have made the queue push
images.

Inert until a repo admin enables the merge queue in branch protection and
selects the queue-required checks (keep the PR-only chart-lint out of that set).
No behavior change to today's PR/main flows.

Time savings

This PR is only the enabler — the savings land in the next one (the e2e split).
Jobs run in parallel, so the win is in CI-minutes (compute/cost), not
wall-clock. Figures below are from a representative recent Tests run.

Where the minutes go per run:

Bucket Jobs ~CI-min
Light (stays on PR) build, unit, integration ~9
Heavy (moves to queue-only) 3× E2E-K8s, E2E-MySQL, 3× E2E-Vitess, 3× LocalScale ~39
Full run total ~48

Cost per PR, by number of pushes before merge (heavy suite runs once at merge
instead of on every push):

Pushes Today (N×48) After (N×12 + 48) Change
1 48 60 🔺 +25%
3 144 84 💰 −42%
5 240 108 💰 −55%
10 480 168 💰💰 −65%

PR feedback wall-clock drops ~5.5 → ~4.5 min (bounded by integration, not k8s).
Single-push PRs are roughly a wash; savings come from iterative PRs, the common
case.

Add a merge_group trigger to the test, lint, and docker workflows so
required checks report on the queue ref. Re-gate the docker publish steps
to run only on push events so the queue validates the image build without
logging in or publishing. Inert until the merge queue is enabled in
branch protection.
Copilot AI review requested due to automatic review settings June 17, 2026 03:21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Enables GitHub Merge Queue compatibility by ensuring required CI workflows also run on the merge_group event, and tightens Docker publish-related steps so merge-queue validation builds images without authenticating to registries or pushing artifacts.

Changes:

  • Add merge_group triggers to the Tests, golangci-lint, and Docker & Helm workflows so required checks report in the merge queue.
  • Re-gate Docker publishing-related steps (QEMU setup, registry login, multi-arch platforms, and push:) to run only on push events.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/test.yaml Adds merge_group trigger so the full test suite can run as a merge-queue required check.
.github/workflows/lint.yaml Adds merge_group trigger so lint runs and reports in the merge queue.
.github/workflows/docker.yml Adds merge_group trigger and restricts image publishing behavior to push events while still validating builds in the queue.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/docker.yml
Kiran01bm and others added 3 commits June 17, 2026 13:28
merge_group events carry neither head_commit.timestamp (push-only) nor
pull_request.updated_at (PR-only), so BUILD_DATE resolved to an empty
string. Add github.run_started_at as an always-present final fallback.
@Kiran01bm Kiran01bm marked this pull request as ready for review June 17, 2026 04:41
@Kiran01bm Kiran01bm requested review from aparajon and morgo as code owners June 17, 2026 04:41
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

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.

3 participants