Skip to content

ci(release): tag releases plainly (vX.Y.Z), dropping the component prefix#240

Merged
sunib merged 1 commit into
mainfrom
fix/plain-semver-tags
Jul 15, 2026
Merged

ci(release): tag releases plainly (vX.Y.Z), dropping the component prefix#240
sunib merged 1 commit into
mainfrom
fix/plain-semver-tags

Conversation

@sunib

@sunib sunib commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

The problem (finding #13)

pkg/manifestanalyzer's doc says "Pin a version." No consumer could: the module is at the repository root (module github.com/ConfigButler/gitops-reverser), but release-please tagged releases gitops-reverser-vX.Y.Z. Go resolves a root module by plain vX.Y.Z tags only, so both consumers of this repo failed to resolve by version:

$ go get github.com/ConfigButler/gitops-reverser@v0.36.0                       # library
$ go install github.com/ConfigButler/gitops-reverser/cmd/manifest-analyzer@v0.36.0  # CLI
go: invalid version: unknown revision v0.36.0

Why drop the prefix instead of adding a second tag

An earlier version of this PR mirrored each release to a plain tag. On review, the prefix turned out to buy nothing:

  • Nothing depends on it. No code, docs, scripts, or workflow references gitops-reverser-v*. Every release-workflow reference uses release-please's tag_name output; image tags come from the version output. So emitting v0.36.0 instead just works everywhere.
  • It's one Go module. The operator image, the manifest-analyzer CLI, and the pkg/manifestanalyzer library are three artifacts, but one go.mod — one version. The gitops-reverser- prefix is release-please's component format (hyphen), not Go's submodule convention (subdir/vX.Y.Z, slash), so it maps to no module boundary and can never make the artifacts independently versionable.
  • The "components" argument favours plain tags. The library (go get) and CLI (go install) are exactly the consumers that need plain vX.Y.Z on the root module to resolve. A single tag versions all three artifacts together — which is the point (the internal/cluster guard exists to keep the image and the linked library at the same release).

The prefix would only earn its keep if a package were split into its own go.mod — a real refactor (a separate module can't import internal/), and even then its tag would be pkg/manifestanalyzer/vX.Y.Z (slash), not today's format.

The change

  • release-please-config.json: "include-component-in-tag": false → releases tag vX.Y.Z directly.
  • last-release-sha bumped to the 0.36.0 release commit so the next changelog anchors correctly without matching the old prefixed tags.
  • pkg/manifestanalyzer/doc.go: the "Pin a version" note now says @vX.Y.Z (and go install …@vX.Y.Z) resolve.
  • No mirror job — simpler than the earlier version of this PR.

Notes

  • Existing gitops-reverser-vX.Y.Z tags stay as history; the next release cuts the first vX.Y.Z. To make @v0.36.0 resolve immediately, a maintainer can backfill once: git tag v0.36.0 gitops-reverser-v0.36.0 && git push origin v0.36.0.
  • Only real risk is release-please's own switch; the config anchors it via the manifest (0.36.0) + last-release-sha, and it's validated on the next release to main.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation

    • Clarified how tagged releases and module versioning affect version selection when using go get and go install.
  • Chores

    • Updated release configuration to use consistent version tags and release tracking.

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Updated manifest analyzer documentation with tagged-release pinning guidance and adjusted release automation to use module-wide tags with a new release baseline.

Changes

Release versioning alignment

Layer / File(s) Summary
Module release guidance and configuration
pkg/manifestanalyzer/doc.go, release-please-config.json
Documentation now explains pinning tagged module versions, while release configuration disables component-specific tag names and updates the last-release commit SHA.

Estimated code review effort: 1 (Trivial) | ~3 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the change well, but it omits the template's Type of Change, Testing, Checklist, Related Issues, and Additional Notes sections. Add the missing template sections, especially Type of Change, Testing, Checklist, Related Issues, and Additional Notes, even if some are marked not applicable.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly reflects the main change: switching release tags to plain semver and removing the component prefix.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/plain-semver-tags

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 force-pushed the fix/plain-semver-tags branch from d495fa9 to ce403f5 Compare July 15, 2026 16:00
Base automatically changed from feat/render-root-scoping to main July 15, 2026 16:18
…efix

The module is at the repository root, but release-please tagged releases
`gitops-reverser-vX.Y.Z` (its package-name prefix). Go resolves a root module only
by plain `vX.Y.Z` tags, so `go get .../@vX.Y.Z` and
`go install .../cmd/manifest-analyzer@vX.Y.Z` failed and consumers of
pkg/manifestanalyzer could pin nothing but a pseudo-version.

Nothing depends on the prefix (every release-workflow reference uses release-please's
tag_name output; image tags come from the version output), and the whole repo is a
single Go module — so the prefix bought nothing. Set include-component-in-tag: false
so release-please tags `vX.Y.Z` directly (one tag, Go-resolvable, no mirror job), and
bump last-release-sha to the 0.36.0 release commit so the next changelog anchors
correctly without matching the old prefixed tags.

Existing `gitops-reverser-vX.Y.Z` tags stay as history; the next release cuts the
first `vX.Y.Z`. Update pkg/manifestanalyzer's doc accordingly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@sunib
sunib force-pushed the fix/plain-semver-tags branch from ce403f5 to b31aa66 Compare July 15, 2026 16:31
@sunib sunib changed the title ci(release): publish plain vX.Y.Z tags so Go can resolve releases (finding #13) ci(release): tag releases plainly (vX.Y.Z), dropping the component prefix Jul 15, 2026

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pkg/manifestanalyzer/doc.go`:
- Around line 19-23: Update the release-installation guidance in the package
documentation to apply the vX.Y.Z command only to releases after the migration,
and document the legacy gitops-reverser-vX.Y.Z form required by historical
releases. Preserve the existing explanation that the repository is versioned as
one Go module.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 6ed73f61-f5b2-433d-9c68-8db48f0c906b

📥 Commits

Reviewing files that changed from the base of the PR and between e9d6be1 and b31aa66.

📒 Files selected for processing (2)
  • pkg/manifestanalyzer/doc.go
  • release-please-config.json

Comment thread pkg/manifestanalyzer/doc.go
@sunib
sunib merged commit fc3d35b into main Jul 15, 2026
17 checks passed
@sunib
sunib deleted the fix/plain-semver-tags branch July 15, 2026 17:40
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