[Bug]: Registry lookup always fails, so untagged images stay unknown
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 90/100
Línea de trabajo
Comienza con do() en internal/source/registry.go y examina la construcción de las URL y el tratamiento existente de la página siguiente. Actualiza el registro falso y las aserciones de internal/source/source_test.go para exigir rutas /v2/, incluidas las solicitudes HEAD de manifiestos, y comprueba el comportamiento del almacenamiento en caché en internal/source/resolve.go. Ejecuta las pruebas de Go relevantes; un contenedor uptime-kuma:2 sin etiqueta debe resolverse a una versión real, y las etiquetas inexistentes no deben almacenarse en caché de forma permanente.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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).
- Lenguaje dominante
- Go
- Estrellas
- 3
- Forks
- 1
- Merge medio
- 1 h 11 min
- PR fusionados (30 d)
- 10
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de NotAFlightRisk/patchcall
-
[Bug]: RSS feed reuses guids and ignores PATCHCALL_URLPosiblemente ocupada @amroquqa99-art la tomó hoy. Abiertobug good first issue
Dificultad 3/5 Medio día Aptitud para principiantes 35/100
NotAFlightRisk/patchcall#12 ·
Los mantenedores suelen responder en 1 día
Todos los issues de NotAFlightRisk/patchcall
Issues similares
-
factory:subtask
Dificultad 1/5 Menos de una hora Aptitud para principiantes 95/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 95/100
OneBusAway/watchdog#470 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 92/100
Los mantenedores suelen responder en 1 día
-
area: session
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
charmbracelet/crush#4484 ·
Los mantenedores suelen responder en 1 día
-
accepted good first issue
Dificultad 1/5 1-3 horas Aptitud para principiantes 95/100