[#2079] Sync mirrored trees into commits

Abierto
#2,109 2 comentarios 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 2 días

@felipebergamin ya está trabajando en esto.

Desde el 20/10/2026.

Evaluación

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

Línea de trabajo

Comienza con el issue padre #2079, el issue del esquema #2089 y el helper de SHA de parse/one-shot en #2090; después, sigue el punto de entrada del management-command o cron. Verifica el flujo de Git del repositorio existente, los upserts topológicos en commits y commit_parents, y el manejo de errores por remoto. Se considera terminado cuando pasan las pruebas indicadas de fetch/parse simulado, commit omitido, continuación tras errores y dry-run, sin escribir en modo dry-run.

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

Descripción

Backend Data Quality Database enhancement

Parent

https://github.com/kernelci/dashboard/issues/2079
Schema: https://github.com/kernelci/dashboard/issues/2089
Parse / one-shot SHA fetch: https://github.com/kernelci/dashboard/issues/2090

Replaces #2091 (checkout-hash backfill). Filling from distinct checkouts.git_commit_hash cannot produce a continuous first-parent chain when CI skips commits (#2079 discussion).

Management command / cron that keeps commits and commit_parents filled with the ancestor closure of commits we care about: every ancestor of hashes we see in checkouts on trees we mirror. Postgres is the query store. Git is an ingest cache.

In scope

  • Persistent treeless repo (--filter=tree:0), many remotes. Do not throw it away per hash. Do not write under BACKEND_VOLUME_DIR; dedicated volume / path, passed into git.
  • Remotes from a tree allowlist (treeproof-style known-good URLs), not from arbitrary checkouts.git_repository_url.
  • Cron: git fetch remotes; enumerate new objects (rev-list new tips --not previously ingested tips, or equivalent); parse via the helper in #2090 (existing-repo path, no per-hash fetch).
  • Upsert commits then commit_parents in topological order so parent rows exist before edges. No stub rows.
  • Continue on per-remote failure (bad URL, missing object, full pack). Log and move on. Job must not die on one tree.
  • Dry-run: fetch/parse optional, write nothing.
  • Do not write checkouts.git_commit_message. Message lives on commits.

Optional safety, not the main loop: report checkouts.git_commit_hash still missing from commits (and optionally call the #2090 SHA helper for those gaps).

Out of scope

  • trees / named_refs tables (follow-up).
  • Snapshot policy for update_db (follow-up once we know row counts).
  • Rewriting readers of checkouts.git_commit_message / dropping that column (follow-up; copy unreachable messages onto commits first).

Tests

Mocked parse/fetch: upserts commits + first-parent edges in topo order. One remote fails, others still write. Dry-run writes nothing. Skipped intermediate commit between two checkouts still lands in commits.

Lenguaje dominante
Python
Estrellas
10
Forks
32
Merge medio
3 d 19 h
PR fusionados (30 d)
33

Preparar el entorno

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 kernelci/dashboard

Todos los issues de kernelci/dashboard

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.