Surface companion plugins on downloads page when target Grails major has not yet shipped#501
Merged
jamesfredley merged 1 commit intomasterfrom May 3, 2026
Conversation
…has not yet shipped Apache-released companion plugins (e.g. grails-publish 1.0.0-M1 under companionArtifacts['8']) used to be invisible on download.html until at least one matching core release landed in coreReleases, because the page iterates majors via activeMinorLines / latestPreReleasePerMajor, both of which read only coreReleases. Add a new 'Plugins for upcoming Apache Grails releases' section between the 'Pre-release (Apache-released)' grid and 'Older Versions'. The section renders one card per major present in companionArtifacts but absent from coreReleases (stable or pre-release). The card lists each companion's Source / SHA512 / ASC verification links plus a release-notes link, and omits the core source / binary / wrapper block that doesn't yet exist. The section is driven by a new SiteMap.orphanCompanionMajors helper that returns those orphan majors in descending order, skipping empty companion lists. Once any release for an orphan major (including a milestone or RC) is appended to coreReleases, the major drops out of the helper and the existing per-major card automatically picks up its companions through companionArtifactsFor - no YAML edits needed. Verified by 6 new SiteMapSpec cases covering empty, all-covered, pre-release-covered, single orphan, multiple orphans (descending order), and empty-companion-list scenarios. Verified by full build that download.html renders the new section with the existing companionArtifacts['8'] entry. Assisted-by: claude-code:claude-4-opus
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/download.htmlthat lists Apache-released companion plugins whose target Grails major has no entry yet incoreReleases:(e.g. the existingcompanionArtifacts['8']->grails-publish 1.0.0-M1block).SiteMap.orphanCompanionMajors(File)to compute those orphan majors (descending, empty companion lists skipped).DownloadPage.renderCompanionsOnlyCard(major, companions)- a card with the sameguide-group/release-gridvisual vocabulary as the existing sections, minus the core Source / Binary / Wrapper / Grails Release Notes block (since that core release does not exist yet).Why
download.htmliterates Grails majors viaactiveMinorLines()andlatestPreReleasePerMajor(), both of which read onlycoreReleases:. That meant a companion plugin published ahead of its target core (e.g.grails-publish 1.0.0-M1for the upcoming Grails 8) was silently invisible on the downloads page until Grails 8 shipped its first milestone. This PR closes that gap.Auto-convergence (no future YAML edits)
The moment any release for an orphan major (stable, milestone, or RC) lands in
coreReleases::orphanCompanionMajors()drops the major.companionArtifactsFor().No manual YAML migration needed at release time.
Section ordering
```
Current Releases
Pre-release (Apache-released)
Plugins for upcoming Apache Grails releases <- NEW
Older Versions
Get Started
```
Test coverage
6 new `SiteMapSpec` cases mirror the existing `companionArtifactsFor` tests (`@TempDir` + `releasesFile()` helper):
All 6 pass. Pre-existing `ValidateGuidesTaskSpec > shape mode rejects a non-40-char SHA` failure exists on `master` independently of this change.
Verification
Scope notes