[Bug]: Registry lookup always fails, so untagged images stay unknown
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Facilidade para iniciantes
- 90/100
Direção de pesquisa
Comece com do() em internal/source/registry.go e examine a construção das URLs e o tratamento existente da próxima página. Atualize o fake registry e as assertions em internal/source/source_test.go para exigir caminhos /v2/, incluindo requisições HEAD de manifestos, e verifique o comportamento do cache em internal/source/resolve.go. Execute os testes Go relevantes; um contêiner uptime-kuma:2 sem tag deve ser resolvido para uma versão real, e tags ausentes não devem ser mantidas em cache permanentemente.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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).
- Linguagem predominante
- Go
- Estrelas
- 3
- Forks
- 1
- Merge médio
- 1h 11min
- PRs com merge (30d)
- 10
Preparar o ambiente
- Inclui um Dockerfile ou arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de NotAFlightRisk/patchcall
-
[Bug]: RSS feed reuses guids and ignores PATCHCALL_URLTalvez já em andamento @amroquqa99-art assumiu hoje. Abertabug good first issue
Dificuldade 3/5 Meio dia Facilidade para iniciantes 35/100
NotAFlightRisk/patchcall#12 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de NotAFlightRisk/patchcall
Issues semelhantes
-
internal/core: cleanAttachmentName splits a rune at the 255-byte cap and stores invalid UTF-8Talvez já em andamento @pacwestnobody assumiu hoje. Abertago good first issue help wanted
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
Podiom/Podiom#427 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
TestLaunchGolden spends about 98 seconds on fake-agent exit delays under -raceTalvez já em andamento Um pull request vinculado a esta issue está aberto ou já foi mesclado. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
Mantenedores costumam responder em até 1 dia
-
factory:subtask
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 95/100
Mantenedores costumam responder em até 1 dia
-
documentation enhancement good first issue
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
limelit-co/open#75 ·