Repository navigation
✨ feat(watcher): pinned tags show newer versions as information by default (#498) - #501
Conversation
…498) - ✨ compute updateInsight (best newer same-family tag, kind major/minor/ patch) for containers hitting the specific pin gate — pure information from the already-fetched tag list, additive only, never touches updateAvailable/updateKind or trigger dispatch. On by default; opt out per watcher via the new nested joi key tag.pin.info (DD_WATCHER_{name}_TAG_PIN_INFO=false). - 🐛 fix isSemverFamilyMatch(): the suffix/variant guard was being skipped entirely under tag.family=loose, letting a pinned nginx:1.2.3-ls132 container get offered a wrong-variant 1.2.4 as an update candidate. Loose policy only relaxes prefix equality and CalVer leading-zero rules — the suffix guard now applies unconditionally. - 🐛 fix sortSemverDescending(): candidates tied on numeric segments now prefer the one whose suffix template exactly matches the reference tag over one that is merely family-compatible, since semver treats the suffix as a prerelease field and was letting the wrong variant outrank the exact match on prerelease-string ordering alone. - ✅ flip 2 tests in Docker.containers.test.ts and Docker.containers.labels-version-finding.test.ts that asserted the old buggy cross-variant sort result; they now assert the correct same-variant tag.
#498) - add UpdateInsightBadge.vue, a neutral informational badge distinct from the actionable update-kind/blue-link treatment — reuses the existing advisory-badge visual grammar (same pattern as SuggestedTagBadge), no card-chrome or accent-stripe changes. - wire it into the containers table/card/stack views and the container detail side panel and full-page tab content, alongside the existing SuggestedTagBadge. - add updateInsightColor() to utils/display.ts (neutral --dd-neutral tokens) and deriveUpdateInsight()/ApiContainerUpdateInsight to utils/container-mapper.ts to validate and map the API's result.updateInsight onto Container. - add the updateInsight i18n namespace (badge text + per-kind tooltip copy) to locales/en/containerComponents.json.
…gset keys (#498) - add the 1.5.2-rc.3 CHANGELOG heading covering the new updateInsight channel and the two family-matching/sort bug fixes. - document DD_WATCHER_{name}_TAG_PIN_INFO and rewrite the pinned-tag notes bullet in configuration/watchers to describe the new informational badge behavior. - add 4 imgset keys that were already live in the joi schema but undocumented: REGISTRY_LOOKUP_URL and the INCLUDE/EXCLUDE/TRANSFORM shorthand aliases for TAG_INCLUDE/TAG_EXCLUDE/TAG_TRANSFORM. - update the FAQ's tag-family-mismatch entry to describe the informational default and the IMGSET env route for tag.family=loose.
…#498) Adversarial review of the #498 pinned-tag insight channel found two correctness gaps in tag-candidates.ts: - isSuffixCompatible() rejected a prerelease-pinned reference's own GA release (e.g. "1.5.2-rc.1" could never see "1.5.2") because a bare candidate suffix was unconditionally rejected against any non-empty reference suffix. Added isPrereleaseSuffix() (RE2-compiled, matches only conventional rc/alpha/beta/pre/preview/dev/next/canary/snapshot identifiers) and widened the bare-candidate case to accept it only when the reference suffix is itself a prerelease identifier — variant suffixes ("-openvino", "-alpine") still never accept a bare candidate. - Same-core suffix-precision growth (e.g. pinned "1.2.3-alpine" seeing registry tag "1.2.3-alpine3.21") was fabricating a "newer patch" insight purely from semver's lexical prerelease-string comparison, despite an identical numeric core. Added filterMeaningfulInsightCandidates()/isMeaningfulSameCoreCandidate() to require a genuine version step (digit-only suffix bump or prerelease->GA) before treating a same-core candidate as insight-worthy. Also tightened getPinGateDigestDisabledNoUpdateReason() so the digest-disabled noUpdateReason never contradicts a rendered insight badge: when an insight will still be shown, the copy now says only ACTIONABLE update detection is off, instead of claiming no detection of any kind is running.
…tcher (#498) The pin-gate updateInsight feature only had unit coverage at the tag-candidates.ts level. Added two Docker.findNewVersion() tests that register the real watcher with configuration.tag.pin.info, drive an actual pinned specific-precision container against a mocked registry with a newer same-family tag, and assert result.updateInsight is undefined when opted out (info: false) versus populated at the info: true default — closing the gap between the unit-level guarantee and the watcher's actual wiring.
…ners (#498) The existing threshold test.each fixtures never actually populated result.updateInsight, so nothing proved handleContainerReport() correctly ignores an insight-only pinned container (updateAvailable false, no updateKind) rather than triggering on it. Added a real container.validate() fixture with only updateInsight set, fed through trigger.handleContainerReport() at threshold "all", asserting trigger.trigger() is never called. Also reworded the comment above the test.each block, which overclaimed exercising this exact scenario.
#498) updateInsightColor() returned the same --dd-neutral tokens as updateKindColor('digest'), so the informational insight badge was visually indistinguishable from the actionable digest badge when both could render on one row. Switched it to the unused --dd-info tokens and rewrote the doc comment to spell out the distinctness requirement. Also fixed the insight tooltip copy in containerComponents.json, which claimed the newer tag was "outside this pinned tag's family" — false, since insight candidates are same-family by construction (they pass the same isSemverFamilyMatch() as actionable candidates). It's the pin itself, not a family mismatch, that keeps this informational; reworded tooltipMajor/Minor/Patch accordingly. Flips one existing assertion: - ui/tests/utils/display.spec.ts "updateInsightColor > returns neutral colors" asserted the exact --dd-neutral collision this commit fixes; replaced with a real distinctness check against all four updateKindColor() kinds. UpdateInsightBadge.spec.ts's parallel assertion is updated the same way.
…#498) The pinned-tag insight badge only had table-mode coverage in ContainersGroupedViews.spec.ts, even though the component wires UpdateInsightBadge into card and list mode too. Added a test that flips containerViewMode between cards and list and asserts the badge renders in both. Also added a combined-state test for the #498 digest-disabled wording fix: when a pinned container has digest watching off (so noUpdateReason is set) and an insight is still computable, both NoUpdateReasonBadge and UpdateInsightBadge must render on the same row without contradictory copy — the reason text must say only actionable detection is off, never that no detection of any kind is running.
… overview tab (#498) ContainerFullPageOverviewTab.vue is unreferenced anywhere in ui/src or ui/tests — the #498 base commits wired UpdateInsightBadge into it without any route/parent actually rendering the component. Reverted the import and template edit to origin/main; the insight badge is already live in ContainersGroupedViews.vue's table/card/list views, which is where the app actually renders it.
… exception (#498) CHANGELOG.md's rc.3 entry and configuration/watchers/index.mdx both claimed the pin-gate insight "allows crossing a MAJOR version" as an exception to the strict-style family matching used for actionable updates. That's not true: strict matching (prefix + suffix/variant + numeric-segment count + CalVer leading-zero rules) never restricted major-version crossing in the first place, pinned or not — there was never an exception to carve out. Reworded both to say the insight reuses that matching as-is; what's new is exposing the comparison at all for a pinned tag. Also swapped stale "neutral" badge-color wording for "informational" in the watchers doc and the FAQ, matching the #498 badge-color fix.
|
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 (4)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 WalkthroughWalkthroughAdds same-family update insights for pinned Docker tags without changing actionable update state or trigger behavior. Tightens suffix and semver candidate matching, adds Possibly related PRs
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
ui/src/components/containers/ContainersGroupedViews.vue (1)
168-220: 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick winAdd
updateInsightto the table memo.
#cell-kindrenders<UpdateInsightBadge :insight="c.updateInsight" />, butgetContainerViewMemo()doesn't include anyupdateInsightfields. Withitem-memobound to this helper, the badge can stay stale until some unrelated row field changes.Fix
container.suggestedTag ?? '', container.noUpdateReason ?? '', + container.updateInsight?.tag ?? '', + container.updateInsight?.kind ?? '', container.bouncer,🤖 Prompt for 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. In `@ui/src/components/containers/ContainersGroupedViews.vue` around lines 168 - 220, Update getContainerViewMemo to include the container.updateInsight data used by UpdateInsightBadge, including all fields that can change its rendered output, so item-memo invalidates when the badge insight changes.app/watchers/providers/docker/tag-candidates.ts (1)
128-184: 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy liftScope prerelease-to-GA matching to the insight path.
isSemverFamilyMatch()reusesisSuffixCompatible()on the actionable path, so1.5.2-rc.1can treat1.5.2as a real update candidate whenever semver climbing is enabled (dd.tag.family=loose/dd.tag.include). Split the bare-candidate check out ofisSuffixCompatible()or addallowPrereleaseToGA, and pass it only fromcomputePinGateInsight().app/watchers/providers/docker/tag-candidates.ts:165-175, 231-257, 612-649, 756-762🤖 Prompt for 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. In `@app/watchers/providers/docker/tag-candidates.ts` around lines 128 - 184, Restrict prerelease-to-GA matching to the insight path: update isSuffixCompatible() so bare candidates are not accepted by default, then enable that exception only when called from computePinGateInsight(). Keep isSemverFamilyMatch() on the strict compatibility behavior so semver climbing cannot treat 1.5.2-rc.1 as an actionable 1.5.2 update.
🤖 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.
Outside diff comments:
In `@app/watchers/providers/docker/tag-candidates.ts`:
- Around line 128-184: Restrict prerelease-to-GA matching to the insight path:
update isSuffixCompatible() so bare candidates are not accepted by default, then
enable that exception only when called from computePinGateInsight(). Keep
isSemverFamilyMatch() on the strict compatibility behavior so semver climbing
cannot treat 1.5.2-rc.1 as an actionable 1.5.2 update.
In `@ui/src/components/containers/ContainersGroupedViews.vue`:
- Around line 168-220: Update getContainerViewMemo to include the
container.updateInsight data used by UpdateInsightBadge, including all fields
that can change its rendered output, so item-memo invalidates when the badge
insight changes.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: b426bb58-6b66-4494-947f-e6efe4b4fed3
⛔ Files ignored due to path filters (1)
CHANGELOG.mdis excluded by!CHANGELOG.md
📒 Files selected for processing (27)
app/configuration/index.test.tsapp/model/container.test.tsapp/model/container.tsapp/triggers/providers/Trigger.test.tsapp/triggers/providers/trigger-threshold.test.tsapp/watchers/providers/docker/Docker.containers.labels-version-finding.test.tsapp/watchers/providers/docker/Docker.containers.test.tsapp/watchers/providers/docker/Docker.test.tsapp/watchers/providers/docker/Docker.tsapp/watchers/providers/docker/image-comparison.test.tsapp/watchers/providers/docker/image-comparison.tsapp/watchers/providers/docker/tag-candidates.test.tsapp/watchers/providers/docker/tag-candidates.tscontent/docs/current/configuration/watchers/index.mdxcontent/docs/current/faq/index.mdxui/src/components/containers/ContainerFullPageTabContent.vueui/src/components/containers/ContainerSideTabContent.vueui/src/components/containers/ContainersGroupedViews.vueui/src/components/containers/UpdateInsightBadge.vueui/src/locales/en/containerComponents.jsonui/src/types/container.d.tsui/src/utils/container-mapper.tsui/src/utils/display.tsui/tests/components/containers/ContainersGroupedViews.spec.tsui/tests/components/containers/UpdateInsightBadge.spec.tsui/tests/utils/container-mapper.spec.tsui/tests/utils/display.spec.ts
CodeRabbit flagged that the #498 prerelease-pinned-tag GA widening in isSuffixCompatible() was reachable from the actionable candidate path (via isSemverFamilyMatch -> shouldIncludeSemverCandidate), not just the informational pin-gate insight. A container pinned to a prerelease tag (e.g. 1.5.2-rc.1) with dd.tag.family=loose or a permissive dd.tag.include filter could treat a bare GA release (1.5.2) as an actionable update candidate. - Add an allowPrereleaseToGA flag (default false) threaded through isSuffixCompatible -> isStrictFamilyMatch/isSemverFamilyMatch -> filterSemverCandidatesOnePass; only computePinGateInsight() opts in. - New test proves red-then-green: a loose-family, prerelease-pinned container now excludes the bare GA release from actionable candidates while still surfacing a newer same-template prerelease. - Tighten the CHANGELOG's rc.3 "Added" bullet so it doesn't imply the actionable path also climbs to GA — only the informational insight does.
getContainerViewMemo() (used as :item-memo for the card grid and list accordion views) omitted container.updateInsight, so v-memo would skip re-rendering a card/list row when only the insight badge changed — the row would stay stale even after computePinGateInsight() surfaced a new "Newer available" tag. - Add updateInsight?.tag and updateInsight?.kind to the memo array next to the existing suggestedTag/noUpdateReason entries. - Extend ContainersGroupedViews.spec.ts with a test that pulls the real :item-memo function off the DataCardGrid stub and asserts the memo output differs once updateInsight is set (red before the fix: the arrays were identical).
|
@coderabbitai Both addressed in b04ea13 + 9c8ad8e: the prerelease→GA exception is now scoped to the insight path via an allowPrereleaseToGA flag that only computePinGateInsight sets (added a red-first test proving loose no longer surfaces bare 1.5.2 as an actionable candidate for a 1.5.2-rc.1 pin), and getContainerViewMemo now includes updateInsight tag+kind with a memo-diff test. |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
cd /tmp && rm -rf repo && git clone --depth 50 https://github.com/CodesWhat/drydock.git repo 2>&1 | tail -5
cd repo
git log --oneline -15
echo "---"
git show b04ea133 --stat 2>&1 | head -30
echo "---"
git show 9c8ad8e8 --stat 2>&1 | head -30Length of output: 2116 🏁 Script executed: #!/bin/bash
cd /tmp/repo
gh pr view 501 --repo CodesWhat/drydock --json headRefName,headRepositoryOwner,headRepository -q '.'
git fetch origin pull/501/head:pr-501 2>&1 | tail -10
git checkout pr-501 2>&1 | tail -5
git log --oneline -20
echo "---find commits---"
git log --oneline --all | grep -i -E "b04ea13|9c8ad8e"Length of output: 2643 🏁 Script executed: #!/bin/bash
cd /tmp/repo
echo "=== b04ea13 (prerelease→GA scoping) ==="
git show b04ea13 --stat
echo
git show b04ea13 -- app/watchers/providers/docker/tag-candidates.tsLength of output: 9025 🏁 Script executed: #!/bin/bash
cd /tmp/repo
echo "=== 9c8ad8e (memo diff fix) ==="
git show 9c8ad8e --stat
echo
git show 9c8ad8e -- $(git show 9c8ad8e --stat --name-only | grep -v CHANGELOG | grep -E '\.ts$' | grep -v test)Length of output: 6416 Both fixes verified — properly scoped, with red-first tests confirming the prior bugs.
No further concerns on these two points. [resolve] |
biggest-littlest
left a comment
There was a problem hiding this comment.
Reviewed the informational-channel design and the trigger-safety regression test. LGTM.
ALARGECOMPANY
left a comment
There was a problem hiding this comment.
Verified the pin-gate scoping and the loose-mode suffix fixes. LGTM.
…fault (#498) (#501) Fixes #498 (reopened). Pinned specific tags (`n8n:2.15.1`, `immich:v2.7.5`) get their version visibility back, by default, with zero config: a new **informational** `updateInsight` field shows the best newer same-family tag (cross-major included) on every pinned container. It is structurally incapable of firing triggers — insight only exists in the pin-gate branch where candidates are hard-empty, so `updateAvailable` stays false and actions never see it. The #321 guarantee (no surprise auto-applied version jumps on pinned tags) is untouched. Opt-out: `DD_WATCHER_{name}_TAG_PIN_INFO=false`. v1.5.0-rc.36 (#321) deliberately stopped pinned tags from producing actionable version candidates, but that also suppressed the *information* that a newer version exists — the core value of a monitor-first dashboard for users running pinned fleets. rc.2 restored digest detection; this restores version visibility, without re-arming the action path. - `dd.tag.family=loose` no longer drops the variant-suffix guard along with the pin gate: a `v2.7.5-openvino` pin can be offered `v3.0.2-openvino`, never bare `v3.0.2` (behavior change for loose users, called out in the CHANGELOG). - Version sort now prefers same-suffix-template candidates, so a bare tag can't outrank the matching variant. - Prerelease pins see their own GA: `1.5.2-rc.1` now surfaces `1.5.2` as insight (conservative prerelease-identifier rule; build variants like `-openvino`/`-alpine` keep strict boundaries). - Same-core suffix-precision growth (`1.2.3-alpine` vs `1.2.3-alpine3.21`) no longer fabricates a phantom patch update. CHANGELOG `[1.5.2-rc.3]`, watchers page (TAG_PIN_INFO, corrected pinned-tag note, 4 previously-undocumented live imgset keys), FAQ (imgset env route for `tag.family`). TDD throughout (new tests proven red first). Both suites at 100% coverage (app 11223 tests, ui 3812). Full pre-push gate green. The diff also went through a 6-dimension adversarial alignment review (trigger-safety path construction, matching edge cases, docs-vs-code, config env round-trip, UI conformance, release-story coherence) — 12 confirmed findings, all fixed in the review-fix commits. Key regression test: a validated container with `updateInsight` populated, driven through the real trigger dispatch at threshold `all`, fires nothing. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> - ✨ Added non-actionable informational `updateInsight` (major/minor/patch) for pinned Docker tag pins, including API schema + UI mapping + localization. - ✨ Added `DD_WATCHER_{name}_TAG_PIN_INFO` (default `true`) to enable/disable pinned tag informational insight computation (non-actionable; never triggers updates). - ✨ Added `UpdateInsightBadge` and rendered it across container views (table/cards/list/side/full-page), including memoization updates so badge refreshes when insight changes. - 🔧 Improved tag-family/variant matching and candidate selection: prerelease suffix detection, stricter loose-family suffix/variant guards, and precision-aware semver sorting with exact-suffix tie-breaking. - 🔧 Restricted prerelease→GA widening to the informational insight path only (via `allowPrereleaseToGA`), keeping actionable update candidates unchanged. - 🔧 Updated Docker version-finding plumbing to optionally compute insight (`pinInfoEnabled`) and pass it through `findNewVersion`/`getTagCandidates`. - 🐛 Fixed issue `#498` by restoring correct “current vs newest” visibility for pinned prerelease tags without setting `updateAvailable`. - 🐛 Added/expanded regression tests across model validation, trigger dispatch gating, tag-candidate logic, version finding, and UI badge rendering. - Confirm API/UI backwards compatibility for the new optional `result.updateInsight` field. - Ensure prerelease→GA insight widening remains strictly informational (never leaks into actionable candidate paths). - Validate sorting/matching correctness for additional registry tag formats and edge-case suffix precision/shape parsing not covered by current tests. - Verify memoization/regression coverage fully spans all view modes and the `v-memo` equality behavior around insight changes. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Fixes #498 (reopened).
What
Pinned specific tags (
n8n:2.15.1,immich:v2.7.5) get their version visibility back, by default, with zero config: a new informationalupdateInsightfield shows the best newer same-family tag (cross-major included) on every pinned container. It is structurally incapable of firing triggers — insight only exists in the pin-gate branch where candidates are hard-empty, soupdateAvailablestays false and actions never see it. The #321 guarantee (no surprise auto-applied version jumps on pinned tags) is untouched.Opt-out:
DD_WATCHER_{name}_TAG_PIN_INFO=false.Why
v1.5.0-rc.36 (#321) deliberately stopped pinned tags from producing actionable version candidates, but that also suppressed the information that a newer version exists — the core value of a monitor-first dashboard for users running pinned fleets. rc.2 restored digest detection; this restores version visibility, without re-arming the action path.
Bug fixes riding along
dd.tag.family=looseno longer drops the variant-suffix guard along with the pin gate: av2.7.5-openvinopin can be offeredv3.0.2-openvino, never barev3.0.2(behavior change for loose users, called out in the CHANGELOG).1.5.2-rc.1now surfaces1.5.2as insight (conservative prerelease-identifier rule; build variants like-openvino/-alpinekeep strict boundaries).1.2.3-alpinevs1.2.3-alpine3.21) no longer fabricates a phantom patch update.Docs
CHANGELOG
[1.5.2-rc.3], watchers page (TAG_PIN_INFO, corrected pinned-tag note, 4 previously-undocumented live imgset keys), FAQ (imgset env route fortag.family).Verification
TDD throughout (new tests proven red first). Both suites at 100% coverage (app 11223 tests, ui 3812). Full pre-push gate green. The diff also went through a 6-dimension adversarial alignment review (trigger-safety path construction, matching edge cases, docs-vs-code, config env round-trip, UI conformance, release-story coherence) — 12 confirmed findings, all fixed in the review-fix commits. Key regression test: a validated container with
updateInsightpopulated, driven through the real trigger dispatch at thresholdall, fires nothing.Changelog
updateInsight(major/minor/patch) for pinned Docker tag pins, including API schema + UI mapping + localization.DD_WATCHER_{name}_TAG_PIN_INFO(defaulttrue) to enable/disable pinned tag informational insight computation (non-actionable; never triggers updates).UpdateInsightBadgeand rendered it across container views (table/cards/list/side/full-page), including memoization updates so badge refreshes when insight changes.allowPrereleaseToGA), keeping actionable update candidates unchanged.pinInfoEnabled) and pass it throughfindNewVersion/getTagCandidates.#498by restoring correct “current vs newest” visibility for pinned prerelease tags without settingupdateAvailable.Concerns
result.updateInsightfield.v-memoequality behavior around insight changes.