Repository navigation
fix(v1.6): backport the bare-integer tag ranking fix from dev/v1.7 - #902
Conversation
A bare integer tag (e.g. "168") coerces via semver.coerce() into a fake "168.0.0", which could outrank a real dotted release like "1.43.3". For linuxserver/plex that meant the suggested-tag badge and, with a permissive dd.tag.include filter, the actionable update candidate itself could point at a destructive downgrade. Cherry-picked from ae77c06 (#871) on dev/v1.7, which shipped in v1.7.0-rc.4. Backported because v1.6 is where users sit until v1.7.0 GA, which is not imminent. The sibling post-backport-branch fix 757bfe1 (#888, store prune for out-of-scope containers) is deliberately NOT backported: it is hygiene with no data loss or wrong action, and does not justify another RC on the v1.6.1 train. Fixes: #859
|
@coderabbitai review |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (6)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. 📝 WalkthroughWalkthroughAdded shared utilities to classify and rank version tags. Bare integer tags no longer outrank dotted versions when both exist. Tag suggestions and Docker fallback candidates use the shared selection rules. Ranking handles prereleases, coercion-lossy tags, build metadata, lexical ties, filtering, transformed tags, and integer-only pools. Added tests for tag suggestions, Docker candidate selection, and image comparison behavior. Merge Risk: ⚪ Minimal · up to This change prevents bare integer tags from outranking dotted releases and producing downgrade recommendations while preserving existing filtering and fallback behavior. No actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
@coderabbitai full review |
✅ Action performedFull review finished. |
biggest-littlest
left a comment
There was a problem hiding this comment.
Verified the backport is content-identical to ae77c06 on dev/v1.7 and that the CHANGELOG entry was moved out of the shipped 1.6.1-rc.2 section into Unreleased. Tag ranking tests pass. Approving.
ALARGECOMPANY
left a comment
There was a problem hiding this comment.
Verified the backport is content-identical to ae77c06 on dev/v1.7 and that the CHANGELOG entry was moved out of the shipped 1.6.1-rc.2 section into Unreleased. Tag ranking tests pass. Approving.
Promotes the Unreleased tag-ranking backport (#902) into a dated 1.6.1-rc.4 section, adds its compare link, and moves Unreleased to compare against rc.4. Bumps the candidate identity across the demo fixtures, website config, quickstart, and the three API docs. Adds the rc.4 highlights block to the README and the docs updates page, demoting rc.3 to a collapsed section. Rolls RC_VERSION in release-identity, RC_VERSION/PREV_RC_VERSION in release-docs-identity, and the changelog compare-link expectations. RC_DATE is unchanged: rc.3 and rc.4 both cut on 2026-08-27.
Backports
ae77c069(#871) fromdev/v1.7, where it shipped in v1.7.0-rc.4.Why this one
A bare integer tag like
168coerces throughsemver.coerce()into a fake168.0.0, which outranks a real dotted release like1.43.3. Onlinuxserver/plexthat meant the suggested-tag badge, and with a permissivedd.tag.includefilter the actionable update candidate itself, could point at a destructive downgrade.That is a user-harming bug, and v1.6 is where users sit until v1.7.0 GA, which is not imminent. Leaving it in a maintenance line we are about to GA is the wrong trade.
Why not #888 as well
757bfe18(#888, prune store records for containers that leave watch scope) is the other fix that landed ondev/v1.7after the backport branch was cut. It is deliberately not included: it is hygiene with no data loss and no wrong action taken, and it does not justify another RC on the v1.6.1 train. It ships in v1.7.0.Contents
Cherry-pick applied clean to all six code files. The only conflict was
CHANGELOG.md, where the entry had landed inside the already-shipped[1.6.1-rc.2]section. Resolved by restoring rc.2 to its released content and placing the new entry under[Unreleased], so no shipped section was rewritten.Local: 303 tests pass across
app/tag/and the two watcher suites. Full pre-push gate green in 275s, coverage included.Changelog
pickPreferredVersionTag.168incorrectly outranking releases such as1.43.3.1.6.1-rc.2changelog content and added the backport entry under[Unreleased].Concerns
pickPreferredVersionTagbehavior for integer-only, prerelease-only, and transformed tag populations.