Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Improve the performance of the tool-versions version resolution

Đang mở
#7,908 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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ó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
docker, typescript
Lĩnh vực
backend, performance

Hướng nghiên cứu

Start by reading the changes in #7825 and #7826, then inspect the tool-versions resolution paths and the follow-ups to #7887. Measure which resolution paths and parsing costs affect actual install-tool requests before choosing an optimization; done means reducing unnecessary resolution cost while preserving fresh releases and the documented fallback behavior.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

What would you like containerbase to do?

Keep the version resolution through the tool-versions data cheap, as hosted Renovate runs install-tool millions of times a day and every run starts without a cache.

Costs per run since #7825 and #7826, for tools without their own resolver (exact versions read nothing):

  • latest or a missing version: one HTTP request to the online tool-versions data, tens to hundreds of ms, up to the 30 s timeout when the network stalls, plus an embedded read as fallback
  • a partial version: one embedded read and parse, plus the HTTP request unless the embedded data lists the version
  • an embedded read: JSON.parse and the zod check of one <tool>.json, below 0.5 ms typical, ~8 ms for the largest file (renovate.json)

Ideas

  • skip the online lookup when the embedded data is recent enough, needs the release time of the data (containerbase/tool-versions#149)
  • measure the zod check at runtime again and drop it if it matters (the image build already checks the data)
  • check which versions Renovate requests from install-tool (exact, partial or latest) to know which paths matter
  • measure the cost of the follow-ups of #7887 once more tools resolve through the data
  • any cache of the online data that outlives one resolve (per process, or on disk like HttpService.download()) needs an expiry time, so long running processes pick up new releases; today getJson() doesn't cache and the ToolVersionsService cache only lasts one resolve
  • warn when the v1 format is deprecated (with its removalDate) in the root index.json; the online lookup fetches v1/<tool>.json directly and after a removal would silently fall back to the embedded data on the 404. Not on every run, eg. only after a 404 or at most once a day

Drafted by Claude Opus 5.5 (Claude Code) for @viceice.

Ngôn ngữ chính
TypeScript
Star
58
Fork
65
Merge trung bình
11 giờ 54 phút
Pull request đã merge (30 ngày)
428

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

  • Có Dockerfile hoặc tệp Docker Compose
  • Không có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của containerbase/base

Tất cả issue của containerbase/base

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.