Skip to content

fix(ci): skip version registration for latest release and sort by semver#1315

Merged
lalitadithya merged 1 commit into
NVIDIA:mainfrom
pdmack:pdmack/fern-publish-version-fixes
May 19, 2026
Merged

fix(ci): skip version registration for latest release and sort by semver#1315
lalitadithya merged 1 commit into
NVIDIA:mainfrom
pdmack:pdmack/fern-publish-version-fixes

Conversation

@pdmack

@pdmack pdmack commented May 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

Two fixes to the publish workflow version registration:

  • Skip registration when tag = latest release — the "Latest · vX.Y.Z" stamp already covers it, so a separate version entry would create a duplicate in the dropdown
  • Sort by semver descending — uses sort -rV after insertion so backport patches (e.g. v1.5.1 after v1.6.0) don't end up above newer releases

Type of Change

  • 🐛 Bug fix
  • 🔨 Build/CI

Component(s) Affected

  • Documentation/CI

Testing

  • Manual testing completed
  • No breaking changes (or documented)

Checklist

  • Self-review completed
  • Ready for review

Summary by CodeRabbit

  • Chores
    • Enhanced documentation publishing workflow to better manage version registration and improve version ordering when handling release tags.

Review Change Stack

Skip creating a version entry when the tag matches the current latest
release — Latest already covers it, avoiding a duplicate dropdown entry.

Sort versioned entries by semver descending (sort -rV) after insertion
so backport patches don't end up above newer releases.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@coderabbitai

coderabbitai Bot commented May 19, 2026

Copy link
Copy Markdown
Contributor

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: e4219a7c-d4a5-48c4-8b15-71db89806bec

📥 Commits

Reviewing files that changed from the base of the PR and between a059aae and 7b73fea.

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

📝 Walkthrough

Walkthrough

The publish-fern-docs workflow now distinguishes the current latest stable release from other releases by computing a should_register flag that disables version registry insertion and PR creation when the pushed tag matches the repository's latest GitHub release. Version entries in fern/docs.yml are sorted by semantic versioning in descending order (non-Latest only), and downstream steps conditionally execute based on this flag.

Changes

Version Registration Gating and Semver Sorting

Layer / File(s) Summary
Tag eligibility computation
.github/workflows/publish-fern-docs.yml
Tag-resolution script computes should_register by comparing the target tag to the repository's latest GitHub release, emitting it alongside tag and is_release for downstream conditions.
Version registration with semantic sort
.github/workflows/publish-fern-docs.yml
Version-registration step inserts the new version into fern/docs.yml, re-sorts non-Latest versions by semver descending (keeping Latest at index 0), and updates the prune condition to use should_register.
Downstream conditional gating
.github/workflows/publish-fern-docs.yml
Restoring unstamped docs and opening the registry PR now gate on should_register (replacing is_release), preventing unnecessary updates when the tag is already the latest release.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • NVIDIA/NVSentinel#1292: Both PRs modify the version-registration logic in publish-fern-docs.yml, changing eligibility gating and how fern/docs.yml entries are updated/ordered.
  • NVIDIA/NVSentinel#1290: Both PRs modify the Fern version-registration flow in publish-fern-docs.yml, altering tag handling and version registry update behavior.
  • NVIDIA/NVSentinel#1293: Both PRs modify release-tag and version-registration logic in publish-fern-docs.yml, gating version registry updates and handling Latest entries.

Suggested reviewers

  • lalitadithya

Poem

🐰 Versions sorted, latest gated,
Semver ordered, cleanly stated,
Should we register? The tag will tell,
Fern docs flow as release bells! 🔔📚

🚥 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 directly describes the two main changes: skipping version registration for the latest release and sorting by semver, which align with the core objectives.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@github-actions

Copy link
Copy Markdown
Contributor

@lalitadithya lalitadithya enabled auto-merge (squash) May 19, 2026 18:58
@lalitadithya lalitadithya disabled auto-merge May 19, 2026 19:35
@lalitadithya lalitadithya merged commit 23b9e4c into NVIDIA:main May 19, 2026
51 of 52 checks passed
@pdmack pdmack deleted the pdmack/fern-publish-version-fixes branch May 20, 2026 15:38
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.

2 participants