Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Embed the tool-versions data in the CLI and fall back to it

オープン
#7,768 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
12/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
docker, typescript

調査の方向性

This is design work spanning several parts: the bundled @containerbase/tool-versions package, the integrity chain (index.json, <tool>.json, <tool>.integrity.json), version resolution, and the install-tool command. Start by reading the open upstream dependency in containerbase/tool-versions#86 and the parent tracking issue #7673 before touching the CLI. Done means the fallback paths are tested with upstream lookups mocked to fail, and the generic prefix resolver behaves as described.

索引モデルが issue の本文から書いたものです。

説明

What would you like containerbase to do?

Embed the tool-versions release archive in the containerbase image, and let the CLI use it when the live lookups fail.

Proposal

  • The image build downloads a pinned tool-versions-<version>.tar.xz from the containerbase/tool-versions releases, verifies its .sha512 and extracts it into the image. Renovate updates the pinned version like the prebuilds.
  • The pinned archive and its .sha512 are the trust anchor, verified at build time. A schema test validates every embedded file and its integrity chain in CI.
  • At runtime the CLI reads only the v1/<tool>.json (and v1/<tool>/<version>.json) it needs, lazily and once per run, and checks just that file against the schema (well under a millisecond for most tools). No integrity chain and no index.json read, to keep it fast. A missing, unreadable or invalid file behaves like no embedded data.
  • Version resolution falls back to the embedded versions when the upstream source can't be reached, and logs the fallback.
  • The embedded versions feed one generic partial version resolver: install-tool <tool> <prefix> (e.g. 20, 3.12) resolves to the newest release of that line, with the tool's versioning from the file.
  • The install uses the embedded files (url and checksum) directly, instead of fetching checksum files or calling the Adoptium API, and keeps the current lookup for files that aren't listed.
  • git: with the embedded git.json, check offline whether a prebuild exists and fall back for every missing version, without the releases/latest request (after #7813).
  • Tests for the fallback paths with the upstream lookups mocked to fail, and docs.

Stack

  • #7820 export the format schemas from @containerbase/base
  • #7823 embed the release archive in the image
  • #7825 CLI: read the embedded data, fall back when the upstream lookup fails
  • #7826 CLI: resolve partial versions from the embedded data
  • CLI: install from the embedded files
  • git: offline prebuild check (after #7813)

Open question: may the embedded data skip the upstream lookup for an exact version it already knows?

Uses the release archive (containerbase/tool-versions#86). Part of #7673.

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

主要言語
TypeScript
スター
58
フォーク
65
平均マージ
11時間 54分
マージ済み PR(30日)
428

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

containerbase/base のほかの issue

containerbase/base の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。