[Bug]: Registry lookup always fails, so untagged images stay unknown
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
internal/source/registry.go の do() から始め、URL の構築と既存のページ送りの処理を確認します。internal/source/source_test.go のフェイクレジストリとアサーションを更新し、マニフェストの HEAD リクエストを含め、/v2/ のパスを要求するようにします。また、internal/source/resolve.go でキャッシュの動作を確認します。関連する Go テストを実行してください。タグなしの uptime-kuma:2 コンテナは実際のバージョンに解決され、存在しないタグが永続的にキャッシュされてはなりません。
索引モデルが issue の本文から書いたものです。
説明
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).
- 主要言語
- Go
- スター
- 3
- フォーク
- 1
- 平均マージ
- 1時間 11分
- マージ済み PR(30日)
- 10
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NotAFlightRisk/patchcall のほかの issue
-
[Bug]: RSS feed reuses guids and ignores PATCHCALL_URL対応中かも @amroquqa99-art が今日担当しました。 オープンbug good first issue
難易度 3/5 半日 初心者へのやさしさ 35/100
NotAFlightRisk/patchcall#12 ·
メンテナーはふだん 1 日以内に返信
NotAFlightRisk/patchcall の issue をすべて見る
似ている issue
-
factory:subtask
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
OneBusAway/watchdog#470 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 92/100
メンテナーはふだん 1 日以内に返信
-
area: session
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
charmbracelet/crush#4484 ·
メンテナーはふだん 1 日以内に返信
-
accepted good first issue
難易度 1/5 1〜3時間 初心者へのやさしさ 95/100