fix(ai): detect release-notes repo from the OCI source label#118
Merged
Conversation
The update-analysis feature guessed a container's GitHub repo by fuzzing the ghcr.io image namespace, which is often wrong (e.g. linuxserver prefixes its repos with docker-), producing a 404 that surfaced as a 502 error. Two changes: - A 404 from the releases lookup is now treated as "no releases found" and degrades to the web fallback instead of erroring. - The watcher persists the image's org.opencontainers.image.source label as image.source, and repo detection prefers it (link template -> source label -> ghcr name split), turning a guess into an actual lookup. Also surface the source as a "Link (auto-detected)" release-notes row in the container and update tabs when no link template is set, so the traditional manual-check link is available for those containers.
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.
Problem
The update-analysis (Analyze) feature couldn't find release notes for containers without a link template, and could throw an error. Repo detection guessed a GitHub repo by fuzzing the ghcr.io image namespace, which is frequently wrong (e.g.
ghcr.io/linuxserver/socket-proxyis reallygithub.com/linuxserver/docker-socket-proxy). The wrong guess 404'd, and the error escaped as a 502: "Error analyzing update for ... (Request failed with status code 404)".Changes
app/ai/github.js): a 404 from the releases lookup is treated as "no releases found" and degrades to the web fallback / empty result instead of erroring. Non-404 errors still propagate.org.opencontainers.image.sourcelabel asimage.source(Docker.js,model/container.js), anddetectRepoprefers it. Precedence: link template -> OCI source label -> ghcr name split (last resort)./releasespage, giving the traditional manual release-notes link for those containers. A configured link template still takes precedence and shows the plain "Link" row.Notes
image.sourcepopulates on fresh detection, so existing stored rows pick it up the next time a container is re-detected.Verified
detectRepoprecedence cases and 404 handling.webhook-socket-proxy(linuxserver, no link template) now resolveslinuxserver/docker-socket-proxy, finds 14 releases in range, and returns a real analysis. The "Link (auto-detected)" row renders in both tabs pointing at the correct releases page.