Skip to content

fix(changelog-site): collapse releases tagged under two prefixes - #554

Open
balajinvda wants to merge 1 commit into
mainfrom
fix/changelog-site-dedupe
Open

fix(changelog-site): collapse releases tagged under two prefixes#554
balajinvda wants to merge 1 commit into
mainfrom
fix/changelog-site-dedupe

Conversation

@balajinvda

@balajinvda balajinvda commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Why

The release changelog site renders an empty diff for several services. The URL
that surfaced it had from and to set to the same version, which is what the
page produces on its own by default.

A service can carry two live tag prefixes for one release line: the legacy flat
prefix (nvcf-<svc>-v) and the current path-scoped one (<path>/v). The same
release is tagged twice under different names, and both were emitted as separate
entries with an identical version string.

index.html defaults to to the last entry and from to the one before it.
When those are the same release, versions.indexOf(from) and indexOf(to)
resolve to the same index and the commit range fi+1..ti is empty. The page
looks broken; the data behind it is merely duplicated.

23 of 37 services carry duplicate versions. 10 have identical last-two entries
and so collapse this way: admin-token-issuer-proxy, api-keys-colocated,
cassandra, container-cache, gateway-routes, grpc-proxy-helm, llm-request-router,
nats, openbao, stargate.

What changed

Releases parsing to the same semantic version collapse into one entry.

tagPrefixesForRelease returns the canonical prefix before the legacy one and
the sort is stable, so the first occurrence of a version is the path-scoped tag.
Keeping that one also keeps commit ranges anchored to the tag scheme currently
in use.

Origins are folded rather than discarded. A release tagged on GitLab under one
name and on GitHub under another is carried by both, which neither tag alone
reports, so dropping the duplicate outright would have mislabelled it.

Customer Release Notes

Not customer visible.

Plan Summary

Not applicable.

Usage

Not applicable.

Testing

go test ./... passes in tools/changelog-site, gofmt clean.

Three tests added. The main one drives buildReleases against a real git
fixture carrying both prefixes rather than calling the dedupe helper directly:
the property that makes the canonical tag win is prefix order plus a stable sort
inside buildReleases, and a unit test on the helper alone would not notice
that ordering breaking. It asserts the kept tag, the merged origin, and
specifically that the last two versions differ, which is the condition the UI
depends on.

The other two guard the opposite direction (distinct versions must not collapse)
and pin the origin-merge rule.

Notes

Fixes the empty-diff symptom only. The site being stale is separate: its
publishing job lives in the frozen umbrella and cannot run, which is addressed
by moving the job to nvcf-internal. Both are needed for the page to be useful.

References

None

Related Merge Requests/Pull Requests

Paired with the nvcf-internal MR that rehosts the pages job.

Dependencies

None.

Summary by CodeRabbit

  • Bug Fixes

    • Prevented duplicate release entries when the same semantic version appears under different tag formats.
    • Preserved the canonical release tag while combining its associated release origins.
    • Improved origin labeling for releases available across multiple hosting sources.
  • Tests

    • Added coverage for duplicate-version handling, distinct-version preservation, and combined origin labels.

A service can carry two live tag prefixes for one release line: the legacy flat
prefix and the current path-scoped one. The same release is then tagged twice
under different names, and both were emitted as separate entries with an
identical version string.

The UI keys its from/to pickers by version and defaults them to the last two
entries. When those were the same release, both pickers resolved to the same
index and the rendered commit range was empty, so the page looked broken while
the data behind it was merely duplicated. Ten services were affected.

Releases parsing to the same version now collapse into one. tagPrefixesForRelease
returns the canonical prefix before the legacy one and the sort is stable, so
the surviving tag is the path-scoped one and commit ranges stay anchored to the
scheme currently in use. Origins are folded rather than dropped: a release
tagged on GitLab under one name and on GitHub under another is reported as
carried by both, which neither tag alone would say.

The main test drives buildReleases against a real git fixture rather than
calling the helper directly, because the ordering that makes the canonical tag
win is a property of buildReleases (prefix order plus a stable sort) and a unit
test on the helper alone would not notice that ordering breaking.

Co-authored-by: Balaji Ganesan <bganesan@nvidia.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@balajinvda
balajinvda requested a review from a team as a code owner July 29, 2026 23:15
@balajinvda
balajinvda requested a review from apartha-nv July 29, 2026 23:15
@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 58a222c9-ee1b-4b9b-b402-93b264b9d30d

📥 Commits

Reviewing files that changed from the base of the PR and between daa1c83 and 9a6b5b5.

📒 Files selected for processing (3)
  • tools/changelog-site/changelog-site
  • tools/changelog-site/main.go
  • tools/changelog-site/main_test.go
👮 Files not reviewed due to content moderation or server errors (1)
  • tools/changelog-site/changelog-site

📝 Walkthrough

Walkthrough

Release generation now collapses duplicate semantic-version tags, retains the canonical tag, and merges origins from alias tags. Tests cover duplicate and distinct versions, canonical selection, UI version separation, and origin combinations.

Changes

Release Version Deduplication

Layer / File(s) Summary
Deduplicate release tags and merge origins
tools/changelog-site/main.go
buildReleases deduplicates semantic versions, retains canonical tags, and combines origins from dropped aliases using the new helpers.
Validate release deduplication behavior
tools/changelog-site/main_test.go
Tests verify duplicate collapse, distinct-version retention, canonical tag selection, UI version separation, and merged host origins.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: apartha-nv

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title follows Conventional Commits and accurately describes the bug fix in changelog-site release deduping.
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.
✨ 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/changelog-site-dedupe

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.12.2)

level=error msg="[linters_context] typechecking error: pattern ./...: directory prefix . does not contain main module or its selected dependencies"


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

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