Skip to content

ci: let the adapter build in a release PR, and rehearse that state on every change - #47

Merged
sunib merged 1 commit into
mainfrom
fix/release-pr-builds
Oct 2, 2026
Merged

sunib merged 1 commit into
mainfrom
fix/release-pr-builds

Conversation

@sunib

@sunib sunib commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

The 0.6.0 release PR (#43) fails "kube adapter (go)". With this merged, release-please regenerates #43 and it builds.

Cause

#42 made release-please rewrite the adapter's core requirement in every release PR, and that part worked: #43 moved gateway/kube/go.mod to gateway v0.6.0 by itself. But a release PR names a version whose tag doesn't exist until it merges. In workspace mode Go still reads the required version's go.mod, so every vet, test and lint of the adapter failed with unknown revision gateway/v0.6.0. main never requires an untagged version, so no check before the merge could see this. That gap was mine.

Fix

  • go.work replaces the core at exactly the version the adapter requires. Go refuses a version-less replace of a module that's in the workspace, so the version is written out. The line is marked x-release-please-version, and release-please-config.json lists /go.work (repo root) as a second extra-file of gateway/kube. Consumers never see go.work.
  • The release rehearsal (.github/scripts/release-rehearsal.mjs):
    • applies release-please's own version regex to every marked line, using a version that will never be tagged (0.999.0);
    • vets and builds the adapter, then restores the files;
    • fails if go.work and the adapter's requirement disagree.
      It runs as the last step of CI's kube job and in task verify.

Verification

  • In a worktree of chore: release main #43's branch, I reproduced the failure exactly (vet, test and lint), and confirmed that the versioned replace pinned to v0.6.0 fixes all three.
  • The rehearsal passes on this branch. Without the go.work replace, it reproduces chore: release main #43's failure (unknown revision gateway/v0.999.0). With mismatched versions, it reports the drift.
  • task verify passes.

After merging, check the regenerated #43: it should change both gateway/kube/go.mod and go.work to v0.6.0, and its kube job should pass.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Release Process
    • Added a release rehearsal that checks version consistency and verifies the adapter builds and passes vet checks before its core dependency is tagged.
    • Release workflows now run the rehearsal, and release automation updates the workspace version alongside the adapter version.
  • Documentation
    • Clarified how adapter and workspace versions are updated for releases and how to run the rehearsal.

… every change

The 0.6.0 release PR (#43) failed "kube adapter (go)": gateway/kube/go.mod
requires gateway v0.6.0, whose tag does not exist until the PR merges, and
workspace mode still reads the required version's go.mod ("unknown revision
gateway/v0.6.0"). main never requires an untagged version, so nothing caught it.

- go.work replaces the core at exactly the version the adapter requires (Go
  refuses an unversioned replace of a workspace module). The line carries
  x-release-please-version, and Release Please updates /go.work with
  gateway/kube/go.mod.
- .github/scripts/release-rehearsal.mjs applies Release Please's own version
  regex to every marked line with a version that is never tagged (0.999.0),
  vets and builds the adapter, and restores the files. It fails if go.work and
  the adapter's requirement disagree. It runs in CI's kube job and in
  task verify.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 2, 2026

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 43b4eb5c-d46c-4ff1-92f1-000c5fe298b1

📥 Commits

Reviewing files that changed from the base of the PR and between fb52085 and 569b0ad.

⛔ Files ignored due to path filters (1)
  • go.work is excluded by !**/*.work
📒 Files selected for processing (5)
  • .github/scripts/release-rehearsal.mjs
  • .github/workflows/ci.yml
  • Taskfile.yml
  • docs/releasing.md
  • release-please-config.json
 _______________________________________________________________
< Ghost in the Shell (Script): Stand Alone Complex Code Review. >
 ---------------------------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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.

@sunib
sunib merged commit 8b30395 into main Oct 2, 2026
12 of 13 checks passed
@sunib
sunib deleted the fix/release-pr-builds branch October 2, 2026 20:23
@sunib sunib mentioned this pull request Oct 2, 2026
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