Skip to content

Show real version numbers when an image's version label is junk (homarr "main → main")#16

Merged
StrandedTurtle merged 1 commit into
mainfrom
claude/youthful-pasteur-2f6s72
Jun 30, 2026
Merged

Show real version numbers when an image's version label is junk (homarr "main → main")#16
StrandedTurtle merged 1 commit into
mainfrom
claude/youthful-pasteur-2f6s72

Conversation

@StrandedTurtle

Copy link
Copy Markdown
Owner

Fixes the homarr card showing Running main / Available main instead of version numbers (it labels every build main and 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 OCI org.opencontainers.image.version label; 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 upgrades main → 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 or newer image.
  • Optional GITHUB_TOKEN raises GitHub's 60/hr API limit to 5000/hr for these lookups.

Verification

  • Server tests 100/100 (added version.test.js + pickLatestReleaseTag cases).
  • Client build clean.
  • Import smoke-test confirms no circular dependency (checker ↔ changelog).

🤖 Generated with Claude Code


Generated by Claude Code

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
@StrandedTurtle StrandedTurtle merged commit a00c11b into main Jun 30, 2026
4 checks passed
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.

1 participant