Show real version numbers when an image's version label is junk (homarr "main → main")#16
Merged
Merged
Conversation
Images like homarr label every build 'main' and ship ':latest', so the card showed a misleading 'Running main / Available main' even though the digests differ and an update is available. Resolve a real version instead: - New version.js#isMeaningfulVersion rejects channel/branch words (main, latest, stable, ...), bare shas, and digests. - checker.js resolves the AVAILABLE version best-effort: prefer the OCI version label, else fall back to the source repo's latest GitHub release tag (changelog.js#getLatestReleaseTag, cached). Only runs for images that have a pending update, and backfills already-flagged events whose stored version is junk so a normal check upgrades 'main' to the real tag. - UpdateCard skips junk versions: Running shows label/tag/short-digest, and Available shows the resolved tag or 'newer image'. - Optional GITHUB_TOKEN raises the GitHub API rate limit for these lookups. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Lj6nYJQDtLaZFvvEQJGM4
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.
Fixes the
homarrcard showing Runningmain/ Availablemaininstead of version numbers (it labels every buildmainand ships:latest, so both sides read the junk label even though an update is available).Changes
version.js#isMeaningfulVersion— rejects channel/branch words (main,latest,stable, …), bare shas, and digests.checker.js— resolves the AVAILABLE version best-effort: prefer the OCIorg.opencontainers.image.versionlabel; if it's junk but the image has a GitHub source, fall back to the repo's latest release tag (changelog.js#getLatestReleaseTag, cached). Runs only for images with a pending update, and backfills already-flagged events whose stored version is junk so a normal check upgradesmain→ the real tag without waiting for a new image.UpdateCard.jsx— never renders junk: Running shows label → tag → short digest; Available shows the resolved tag ornewer image.GITHUB_TOKENraises GitHub's 60/hr API limit to 5000/hr for these lookups.Verification
version.test.js+pickLatestReleaseTagcases).🤖 Generated with Claude Code
Generated by Claude Code