Skip to content

ci(konflux): dedicated ephemeral merge-queue image builds - #161

Merged
squizzi merged 3 commits into
mainfrom
squizzi/wait-for-images-timeout
Aug 19, 2026
Merged

ci(konflux): dedicated ephemeral merge-queue image builds#161
squizzi merged 3 commits into
mainfrom
squizzi/wait-for-images-timeout

Conversation

@squizzi

@squizzi squizzi commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

What

Fixes the Wait for component image builds step (the resolve-images job in the E2E gate) timing out on the GitHub merge queue and blocking merges.

Why it broke

The merge-group wait steps in e2e.yml waited for Konflux checks that never fired. The on-push pipelines require target_branch == "main", but the merge queue pushes to gh-readonly-queue/main/..., so the -on-push checks never appear. wait-on-check-action ran out its discovery window and the job hit its timeout ceiling.

Approach

The first attempt reused the pull-request pipelines for merge-queue pushes, but that reused the on-pr-<sha> tag/check and blurred the line between an already-tested PR image and a freshly rebuilt merge-queue image.

Instead, merge-queue builds now get their own dedicated, ephemeral pipelines so they are never confused with PR images.

Changes

  • New .tekton/hypershell-<component>-main-merge-queue.yaml for all three components (api-server, control-plane, web-console). Each:
    • fires only on a push whose target_branch starts with gh-readonly-queue/main/
    • pushes an ephemeral on-merge-queue-<merge_sha> tag (image-expires-after: 5d)
    • sets release.appstudio.openshift.io/auto-release: "false"
    • produces the distinct check hypershell-<component>-main-on-merge-queue
    • reuses the existing hypershell-<component>-main Konflux Component (no UI/Application changes needed)
  • Revert the merge-queue trigger out of the pull-request pipelines: back to pull_request-only, cancel-in-progress: "true", no auto-release label, retaining the on-pr-<head_sha> tag.
  • e2e.yml:
    • merge-group wait steps block on the -on-merge-queue checks, keyed on github.sha (the merge commit)
    • detect-merge-queue diffs merge_group.base_sha...github.sha to decide which components the batch rebuilt
    • the merge_group plan case maps rebuilt components to on-merge-queue-<merge_sha> and unchanged components to the baseline image
    • e2e always runs as the merge gate; the browser trace verification stays skipped on merge_group (covered at PR time, re-verified on push to main)
  • specs/platform/e2e-testing.spec.md: document the merge-queue gate and the distinct/ephemeral image contract.

Test plan

  • make check passes.
  • All .tekton/*.yaml and e2e.yml validated as YAML.
  • Verified each merge-queue pipeline's CEL trigger, on-merge-queue-<revision> output image, auto-release: false, image-expires-after: 5d, and distinct check name.
  • Real validation happens when this rides the merge queue.

🤖 Generated with Claude Code

The merge-group image resolution in the E2E gate waited for
hypershell-<component>-main-on-push checks and inspected the bare
<merge_sha> image tag. #155 configured the GitHub merge queue to build
through the Konflux *pull-request* pipelines instead: a push to
gh-readonly-queue/main/... runs hypershell-<component>-main-on-pull-request
and pushes on-pr-<merge_sha>. The on-push pipelines require
target_branch == "main" and never fire on a merge-queue branch, so the
-on-push check never appears; "Wait for component image builds" ran out
its 900s discovery window / 25m job ceiling and blocked the gate.

- Wait for the -on-pull-request checks in the merge-group steps.
- Add a dedicated merge_group plan case that maps each rebuilt component
  to on-pr-<merge_sha> and keeps unchanged components on baseline. The
  old *) case tagged all three images with one ref, so an unchanged
  component (control-plane in #158) would resolve to a non-existent
  on-pr image even after the wait was fixed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Kyle Squizzato <kysquizz@redhat.com>
@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@squizzi, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 49 minutes

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

Wait for the limit to reset, then comment @coderabbitai review or push new commits to the PR.

An organization admin can change what happens after included review limits in Billing.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository: openshift-online/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: dc5a819a-adf5-4100-a7e7-e17ff57374ba

📥 Commits

Reviewing files that changed from the base of the PR and between f96ecc5 and cb4ff93.

📒 Files selected for processing (8)
  • .github/workflows/e2e.yml
  • .tekton/hypershell-api-server-main-merge-queue.yaml
  • .tekton/hypershell-api-server-main-pull-request.yaml
  • .tekton/hypershell-control-plane-main-merge-queue.yaml
  • .tekton/hypershell-control-plane-main-pull-request.yaml
  • .tekton/hypershell-web-console-main-merge-queue.yaml
  • .tekton/hypershell-web-console-main-pull-request.yaml
  • specs/platform/e2e-testing.spec.md

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.

The e2e "Wait for component image builds" gate timed out in the GitHub
merge queue because it waited on Konflux checks that never fired: the
on-push pipelines require target_branch == "main" and merge_group builds
push to gh-readonly-queue/main/... instead.

#155 addressed this by extending the pull-request pipelines to also fire
on merge-queue pushes, but that reused the on-pr-<sha> tag/check and
blurred the line between an already-tested PR image and a freshly rebuilt
merge-queue image.

Instead, give merge-queue builds their own dedicated, ephemeral pipelines
so they are never confused with PR images:

- Add .tekton/hypershell-<component>-main-merge-queue.yaml for all three
  components. Each fires only on a push whose target_branch starts with
  gh-readonly-queue/main/, pushes an ephemeral on-merge-queue-<merge_sha>
  tag (image-expires-after: 5d), sets auto-release=false, and produces the
  distinct check hypershell-<component>-main-on-merge-queue.
- Revert #155's merge-queue trigger out of the pull-request pipelines:
  back to pull_request-only, cancel-in-progress=true, no auto-release
  label, retaining the on-pr-<head_sha> tag.
- e2e.yml: the merge_group wait steps now block on the
  -on-merge-queue checks (keyed on github.sha, the merge commit), and the
  plan maps changed components to on-merge-queue-<merge_sha> images while
  unchanged components fall back to baseline. e2e always runs as the merge
  gate; browser trace verification stays skipped on merge_group.
- Document the merge-queue gate and the distinct/ephemeral image contract
  in specs/platform/e2e-testing.spec.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Kyle Squizzato <kysquizz@redhat.com>
@squizzi squizzi changed the title ci(e2e): wait on merge-queue pull-request builds, not on-push ci(konflux): dedicated ephemeral merge-queue image builds Aug 19, 2026
The e2e plan step and the merge-queue detect step decided which
components have a Konflux image to wait for by grepping only the
component source trees (components/<comp>/ and packages/gateway-management-ui/).
That is an incomplete mirror of each component's Konflux CEL trigger,
which also fires on the pipeline definition file itself
(.tekton/hypershell-<comp>-main-{pull-request,merge-queue}.yaml) and,
for control-plane, the root Dockerfile.

A PR that changes only a component's pull-request pipeline file (like
this one) therefore triggered the on-pr build in Konflux, but the plan
step saw "no source components changed", fell back to main's on-push
images, and never waited for -- or used -- the on-pr images the PR
actually produced.

Make the detection greps in both the pull_request plan case and the
merge_group detect step exact mirrors of the corresponding CEL triggers,
including the pipeline file self-reference and the control-plane
Dockerfile clause. Document the rule in the e2e-testing spec (new
"Component Pipeline Definition Changed" scenario) and tighten the
"Infrastructure-Only Changes" scenario to exclude pipeline/Dockerfile
changes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Kyle Squizzato <kysquizz@redhat.com>
@squizzi
squizzi added this pull request to the merge queue Aug 19, 2026
Merged via the queue into main with commit 2203f3f Aug 19, 2026
21 checks passed
@squizzi
squizzi deleted the squizzi/wait-for-images-timeout branch August 19, 2026 23:16
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