[Bug]: Registry lookup always fails, so untagged images stay unknown
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 90/100
Hướng nghiên cứu
Bắt đầu với do() trong internal/source/registry.go và kiểm tra việc xây dựng URL cùng cách xử lý trang tiếp theo hiện có. Cập nhật fake registry và các assertion trong internal/source/source_test.go để yêu cầu các đường dẫn /v2/, bao gồm cả các yêu cầu HEAD đối với manifest, và kiểm tra hành vi cache trong internal/source/resolve.go. Chạy các bài kiểm thử Go liên quan; một container uptime-kuma:2 không có tag phải được phân giải thành một phiên bản thực, và các tag không tồn tại không được lưu vào cache vĩnh viễn.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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).
- Ngôn ngữ chính
- Go
- Star
- 3
- Fork
- 1
- Merge trung bình
- 1 giờ 11 phút
- Pull request đã merge (30 ngày)
- 10
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của NotAFlightRisk/patchcall
-
[Bug]: RSS feed reuses guids and ignores PATCHCALL_URLCó thể đã có người làm @amroquqa99-art đã nhận hôm nay. Đang mởbug good first issue
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 35/100
NotAFlightRisk/patchcall#12 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của NotAFlightRisk/patchcall
Issue tương tự
-
factory:subtask
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
OneBusAway/watchdog#470 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 92/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area: session
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
charmbracelet/crush#4484 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
accepted good first issue
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 95/100