Skip to content
This repository was archived by the owner on Dec 17, 2025. It is now read-only.

feat: add open container version to log messages#2001

Open
aauren wants to merge 1421 commits into
containrrr:mainfrom
aauren:add_opencontainer_version_to_log
Open

feat: add open container version to log messages#2001
aauren wants to merge 1421 commits into
containrrr:mainfrom
aauren:add_opencontainer_version_to_log

Conversation

@aauren

@aauren aauren commented Jul 14, 2024

Copy link
Copy Markdown

What This PR Does

It adds the opencontainers image version to the update log if it exists on the container to give a better description of what the upgrade actually is.

As the issue that I linked below points out, org.opencontainers.image.version is a piloted standard to bring more consistency to container labels. All containers built via GitHub actions add them. Additionally, all containers from linuxserver contain them as well.

Related Issues

This is partially related to #1848

Although in that issue, they were asking that this information be added to watchtower's templating function. I don't actually use the templating function, so I didn't put it there, but I would imagine that making container labels available via the template functions would be a much larger PR.

Testing

I have been running with this setup for several days and it has worked great for me.

Example Output

Found new [lscr.io/linuxserver/nzbhydra2:latest](http://lscr.io/linuxserver/nzbhydra2:latest) image (fbeb6b7869e3 - v7.3.0-ls16)
Stopping /nzbhydra2 (387cd3eb4f70 - v7.2.3-ls15) with SIGTERM
Creating /nzbhydra2
Removing image ba50bb7dfb51

@aauren
aauren requested a review from simonaronsson as a code owner July 14, 2024 17:28

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congratulations on opening your first pull request! We'll get back to you as soon as possible. In the meantime, please make sure you've updated the documentation to reflect your changes and have added test automation as needed. Thanks! 🙏🏼

@aauren
aauren force-pushed the add_opencontainer_version_to_log branch from 4a1e6b2 to d60d5bb Compare September 8, 2025 23:24
@aauren
aauren requested a review from piksel as a code owner September 8, 2025 23:24
renovate Bot and others added 26 commits January 28, 2026 06:35
…containrrr#1244)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…containrrr#1245)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…containrrr#1246)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…r#1247)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…9366 (containrrr#1248)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…RLs and CLI flags (containrrr#1251)

- Expand documentation on using multiple notification services simultaneously
- Add detailed examples for Docker CLI and Docker Compose configurations
- Clarify differences between CLI flags and environment variables for multiple values
- Add verification section to confirm multiple notifications are configured correctly
- Restructure notification examples to include both environment variable and CLI flag approaches
- Remove outdated Viper bug reference that no longer applies
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…#1253)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…tainrrr#1254)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…containrrr#1255)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…inrrr#1256)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…containrrr#1257)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…r#1258)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…ontainrrr#1259)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…ee0c (containrrr#1260)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…rrr#1261)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…#1263)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…ainrrr#1262)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…ontainrrr#1264)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…inrrr#1265)

- Add self-reference guards to prevent containers from depending on themselves
- Fix prefix matching to only match Docker Compose numeric replica suffixes
- Prioritize same-project matches in linked container restart resolution
- Add deterministic ordering for cross-project dependency fallback
- Implement error notifications via emptyReport when updates fail
- Filter self-references consistently across all link sources
…containrrr#1268)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…ontainrrr#1269)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…ontainrrr#1270)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…containrrr#1272)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…r#1273)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
renovate Bot and others added 26 commits March 31, 2026 19:14
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…4.2 (containrrr#1504)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…g (#1505)

- Hash tokens with SHA-256 and use constant-time comparison for auth
- Add per-IP rate limiting with configurable --http-api-rate-limit flag
- Introduce Options struct for SetupAndStartAPI with nil validation
- Add method-based routing to restrict update endpoint to POST only
- Cap request body size at 1 MiB and return 413 on overflow
- Parse Authorization header case-insensitively per RFC
- Rename metrics API endpoint and update cross-references in docs
- Rewrite HTTP API documentation with rate limiting and security sections
…ntainrrr#1507)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…TTP API (containrrr#1506)

- Fix RunOnce flag in HTTP API update handler to allow self-updates
- Add Skipped field to Metric struct and populate from report.Skipped()
- Add watchtower_containers_skipped Prometheus gauge for per-scan visibility
- Rename skipped counter to skippedScans to distinguish from per-scan gauge
- Include skipped count in HTTP API /v1/update JSON response
- Convert TestAPI_StartServerAsynchronously from synctest to regular test
- Add assertion guards for metric family samples in HandleUpdate test
- Update HTTP API and metrics API documentation
…to f93e5f3 (containrrr#1510)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…to f93e5f3 (containrrr#1511)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…4.3 (containrrr#1513)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…rrr#1514)

- Detect locally built images by checking empty RepoDigests in CompareDigest
- Update log message to more accurately describe the condition
- Return up-to-date status for local images to avoid confusing 404 errors
- Add test coverage for CompareDigest with empty RepoDigests
- Add WithRepoDigests helper to improve mock container test realism
…to 3a24fdc (containrrr#1515)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…to 9d38bb4 (containrrr#1516)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…to 9d38bb4 (containrrr#1517)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…rrr#1518)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…#1520)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…tainrrr#1521)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…inrrr#1522)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…ontainrrr#1523)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…containrrr#1524)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…nrrr#1525)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…#1526)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…containrrr#1529)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…lptrace/otlptracehttp to v1.43.0 (containrrr#1530)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…ontainrrr#1531)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…entation (containrrr#1532)

Added reference to Linked Containers documentation for clarity on Watchtower's handling of linked containers.

Signed-off-by: Nick Fedor <nick@nickfedor.com>
@aauren
aauren force-pushed the add_opencontainer_version_to_log branch 2 times, most recently from be82147 to bdc9864 Compare April 5, 2026 19:40
Include org.opencontainers.image.version labels in email notifications
when a new image is found. Both the old (current) and new image versions
are displayed on a single line, making version transitions easy to see
at a glance. Example output:

  Found new image: ghcr.io/homarr-labs/homarr:latest (b7734c440450) v0.15.0 -> v0.16.0

The version is extracted from the new image during the staleness check
and from the running container's labels for the old version. Images
without the OCI version label are displayed without version info.
@aauren
aauren force-pushed the add_opencontainer_version_to_log branch from bdc9864 to 1c2b7b1 Compare April 6, 2026 16:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants