Show container version lag#36
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a best-effort “version lag” signal for Docker Hub semver-tagged container images by enriching container API responses with version metadata and rendering compact “X behind” badges + aggregated host summaries in the UI.
Changes:
- Introduces
src/image_versions.rsto parse supported image refs, query Docker Hub tags with timeouts, and cache results. - Extends
ContainerInfowith an optionalversionfield and annotates both local and remote container lists. - Updates UI rendering (TS + built JS + CSS) to show per-container version badges and roll-up “updates / versions behind” summaries.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/remote.rs |
Annotates remote containers with version info during SSH probe flow. |
src/main.rs |
Registers the new image_versions module. |
src/image_versions.rs |
Implements Docker Hub tag fetching, semver-ish parsing, comparison, and caching. |
src/containers.rs |
Adds version to ContainerInfo and annotates the local running container list. |
public/metrics.js |
Renders version badges and summary strings in the shipped UI JS bundle. |
public/app.css |
Adds styling/layout for version badges in normal + compact container rows. |
frontend/metrics.ts |
Updates frontend types and rendering logic for version badges and summaries. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+156
to
+161
| let rest = parts.collect::<Vec<_>>().join("/"); | ||
| if rest.split('/').count() == 1 { | ||
| format!("library/{rest}") | ||
| } else { | ||
| rest | ||
| } |
Comment on lines
+214
to
+225
| fn remember(image: String, info: Option<ContainerVersionInfo>) { | ||
| let cache = CACHE.get_or_init(|| Mutex::new(HashMap::new())); | ||
| if let Ok(mut cache) = cache.lock() { | ||
| cache.insert( | ||
| image, | ||
| CacheEntry { | ||
| checked_at: Instant::now(), | ||
| info, | ||
| }, | ||
| ); | ||
| } | ||
| } |
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.
Summary
6 behindplus host summaries like1 update · 6 versions behindlatest,stable, and non-semver tags are not guessedVerification
bun run build:frontendbun run checkcargo testcargo build --release/api/remote-hostsreturnscloudflare/cloudflared:2026.1.1as6 behind, latest2026.5.26 behindbadge render without overlapapple-mobile-web-app-capablemeta