[Bug]: Registry lookup always fails, so untagged images stay unknown
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 90/100
Rechercherichtung
Beginne mit do() in internal/source/registry.go und untersuche die URL-Konstruktion sowie die vorhandene Behandlung der nächsten Seite. Aktualisiere die Fake-Registry und die Assertions in internal/source/source_test.go, sodass sie /v2/-Pfade einschließlich HEAD-Anfragen für Manifeste verlangen, und prüfe das Caching-Verhalten in internal/source/resolve.go. Führe die relevanten Go-Tests aus; ein Container uptime-kuma:2 ohne Tag sollte auf eine reale Version aufgelöst werden, und fehlende Tags dürfen nicht dauerhaft zwischengespeichert werden.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
What happened?
The registry lookup never works, so any image on :latest, :2, :main or similar without a version label comes out as "Version unknown: registry lookup failed ... 404". The registry URLs are missing /v2/, so Docker Hub answers 404 and GHCR answers 303. With /v2/ added by hand, the same lookup for louislam/uptime-kuma:2 finds 2.5.12.
That lookup is what the README says makes :latest work, so it's a bit of a big one, but the fix is tiny.
Steps to reproduce
- Run the compose stack from the README
- Run
louislam/uptime-kuma:2next to it (it has no version label) - Patchcall lists it as "Version unknown: registry lookup failed ... 404"
Version
1.0.0, and still there on main at 31c39ef
How are you running it?
Docker, with the README's compose file
Environment
Linux, Docker Engine
Relevant log output
Version unknown: registry lookup failed ... 404
Before submitting
- I have searched existing issues for duplicates
- I am running the latest version
- I agree to follow this project's Code of Conduct
Fix
do() in internal/source/registry.go:104-108 builds https://<registry>/<path><suffix>. Make it https://<api>/v2/<path><suffix>. The next-page handling at registry.go:98 already strips /v2/<path>, so that bit stays as it is.
The test in internal/source/source_test.go:95 only checks the path ends in /tags/list, which is how this got past it. Make the fake registry refuse anything that isn't under /v2/, for the manifest HEADs too.
While you're in there: an empty result gets cached for good (internal/source/resolve.go:122), so a :latest pulled before its version tag lands stays unknown until the next pull. Only cache a tag it actually found.
To check it, an uptime-kuma:2 container with no version label should show its real version (2.5.12 at the time of writing).
- Vorherrschende Sprache
- Go
- Sterne
- 3
- Forks
- 1
- Ø Merge
- 1 Std. 11 Min.
- Gemergte PRs (30 T.)
- 10
Entwicklungsumgebung
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus NotAFlightRisk/patchcall
-
[Bug]: RSS feed reuses guids and ignores PATCHCALL_URLEvtl. vergeben @amroquqa99-art hat das heute übernommen. Offenbug good first issue
Schwierigkeit 3/5 Ein halber Tag Anfängerfreundlichkeit 35/100
NotAFlightRisk/patchcall#12 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in NotAFlightRisk/patchcall
Ähnliche Issues
-
factory:subtask
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 95/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 95/100
OneBusAway/watchdog#470 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 92/100
Maintainer antworten meist innerhalb von 1 Tag
-
area: session
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
charmbracelet/crush#4484 ·
Maintainer antworten meist innerhalb von 1 Tag
-
accepted good first issue
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 95/100