Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#7,768 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
12/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
docker, typescript

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
TypeScript
Stelle
58
Fork
65
Merge medio
11h 54m
PR unite (30g)
428

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di containerbase/base

Tutte le issue di containerbase/base

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.