Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#7,768 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
12/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
docker, typescript

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
TypeScript
Estrellas
58
Forks
65
Merge medio
11 h 31 min
PR fusionados (30 d)
443

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

  • Incluye un Dockerfile o un archivo de Docker Compose
  • Sin plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de containerbase/base

Todos los issues de containerbase/base

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.