Skip to content

ci: drop gateway-prysm-canary from the gitops image bump - #59

Closed
Taranpreet26311 wants to merge 1 commit into
mainfrom
ci/drop-canary-from-gitops-bump
Closed

ci: drop gateway-prysm-canary from the gitops image bump#59
Taranpreet26311 wants to merge 1 commit into
mainfrom
ci/drop-canary-from-gitops-bump

Conversation

@Taranpreet26311

Copy link
Copy Markdown
Contributor

Companion to getoptimum/gitops#535 (canary Kustomize → Helm). Merge this one first.

Why

The canary workload moves to the optimum-gateway Helm chart, so gitops no longer contains gateway-prysm-canary/deployment.yaml.

Leaving it in the bump list breaks the whole step, not just the canary:

for FILE in ... "$MANIFEST_DIR"/gateway-prysm-canary/deployment.yaml; do
  sed -i.bak "s|...|${NEW_IMG}|" "$FILE" && rm -f "${FILE}.bak"
done

run: steps execute under bash -e. sed on a missing path returns non-zero, the && chain propagates it, and the step aborts — before lighthouse, nimbus or prysm are written. The later git add of the missing file would fail as well. Every gateway build goes red, and the three remaining flavours silently stop being bumped.

Change

Removes the canary from the for loop and from the git add list. Nothing else touched.

Consequence — worth being explicit

The canary no longer auto-bumps. Its digest now lives in the chart’s values/internal-prysm-canary.yaml and must be bumped there when promoting an image to the canary.

That is a real regression in automation and the migration’s main rough edge: a digest duplicated in a values file drifts. It has already caught us twice — the values file was stale against origin/main on two separate occasions during this migration, each time pinning a superseded build.

Worth deciding separately whether the chart should live somewhere CI can bump it, or whether the digest should come from gitops rather than being copied into values.

Ordering

  1. This PR → main
  2. getoptimum/gitops#535
  3. helm upgrade --install for the canary

Merging #535 first leaves a window where every gateway build fails.

The canary workload has moved to the optimum-gateway Helm chart, so
gitops no longer contains gateway-prysm-canary/deployment.yaml.

Leaving it in the bump list breaks the whole step, not just the canary:
`run:` executes under `bash -e`, so `sed` on a missing path aborts before
lighthouse, nimbus or prysm are written, and the subsequent `git add` of the
missing file would fail too. Every gateway build would go red.

Consequence: the canary no longer auto-bumps. Its digest now lives in the
chart's values/internal-prysm-canary.yaml and must be bumped there when
promoting an image to the canary.

Pairs with getoptimum/gitops#535 — merge this FIRST.
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 54 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository: getoptimum/coderabbit/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 3d446c31-b5e6-4ab4-b508-f886d53726c7

📥 Commits

Reviewing files that changed from the base of the PR and between 7936160 and 9d27a5e.

📒 Files selected for processing (1)
  • .github/workflows/docker-publish.yml

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

@Taranpreet26311

Copy link
Copy Markdown
Contributor Author

Superseded by #60. Dropping the canary from bumping was the wrong fix — a canary that stops receiving new images isn't a canary. #60 instead teaches the bump step both forms (Kustomize deployment.yaml and Helm values/internal-*.yaml), so migration needs no CI change at all.

Taranpreet26311 added a commit that referenced this pull request Aug 12, 2026
Gateways exist in one of two forms and migrate from the first to the second:

  Kustomize -> clusters/.../optimum/gateway-<flavour>/deployment.yaml
  Helm      -> charts/optimum-gateway/values/internal-<flavour>.yaml

The bump step now writes whichever form exists for each flavour, so a gateway
moving to Helm needs no change here — its deployment.yaml disappears, its
values file appears, and the bump follows it. The canary keeps receiving new
images instead of silently falling behind.

Every path is guarded with -f. `run:` executes under bash -e, so sed on a
missing file aborted the whole step: one migrated gateway would have stopped
lighthouse, nimbus and prysm from being bumped too, not just itself.

The Helm sed is anchored to the `digest:` line so image.repository is never
rewritten. Verified against real files: the Kustomize image and the Helm digest
are both replaced and `repository: getoptimum/gateway` is untouched.

Also:
- Fails the step if nothing matched. A rename or restructure that silently
  matched no files previously looked identical to a successful run.
- Warns per flavour that has neither form present.
- Stages by directory rather than naming files, since a `git add` of a path
  that no longer exists fails the step.
- Uses a literal loop list rather than word-splitting a variable.

teku remains deliberately excluded: parked at replicas 0 on an older digest.

Requires getoptimum/gitops#536 (chart in gitops) for the Helm path to exist;
until then the -f guard simply skips it, so this is safe to merge first.
Replaces #59, which dropped the canary from bumping altogether.
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