Skip to content

fix(watcher): backfill image.source onto existing container rows#119

Merged
nopoz merged 1 commit into
mainfrom
fix/backfill-image-source
Jul 5, 2026
Merged

fix(watcher): backfill image.source onto existing container rows#119
nopoz merged 1 commit into
mainfrom
fix/backfill-image-source

Conversation

@nopoz

@nopoz nopoz commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Problem

The auto-detected release-notes link (1.4.1) only appeared for containers detected after the upgrade. image.source was read from the image inspect, which runs after the watcher's early-return for already-known running containers, so existing store rows never gained the field. On a running fleet, none of the pre-existing containers showed the link until they were recreated.

Fix

  • Read org.opencontainers.image.source from the list response's merged labels (available before the early-return, and how the watcher already reads its other labels).
  • Backfill it onto cached rows that lack it, then persist via updateContainer.

A single watch cycle now populates image.source across all existing containers with no manual re-detection.

Verified

  • Backend tests: 513/513 pass, including new cases for capturing the label on fresh detection and backfilling a cached row.
  • Live on devtest: after deploying, a normal watch cycle backfilled image.source onto 47 previously-stored containers that were never manually re-added. No-link-template containers (e.g. searxng) now carry the source and render the "Link (auto-detected)" row.

The OCI source label was read from the image inspect, which runs after the
early-return for already-known running containers, so the field only ever
populated on a container's first detection. Existing store rows never gained it,
leaving auto-detected release-notes links blank until a container was recreated.

Read the label from the list response's merged labels instead (available before
the early-return, and how the watcher already reads its other labels) and
backfill it onto cached rows that lack it. A single watch cycle now populates
image.source across the fleet with no manual re-detection.
@nopoz
nopoz merged commit ed1521c into main Jul 5, 2026
14 checks passed
@nopoz
nopoz deleted the fix/backfill-image-source branch July 5, 2026 15:42
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