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

[#2079] Sync mirrored trees into commits

Aperta
#2,109 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
git, postgresql, python

Direzione di ricerca

Inizia dalla parent issue #2079, dalla schema issue #2089 e dall’helper SHA di parse/one-shot in #2090, quindi segui l’entry point del management-command o del cron. Verifica il flusso Git del repository esistente, gli upsert topologici in commits e commit_parents e la gestione degli errori per remote. Il lavoro è completato quando passano i test elencati per fetch/parse con mock, commit saltato, continuazione dopo un errore e dry-run, senza scrivere in modalità dry-run.

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

Descrizione

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.

Lingua principale
Python
Stelle
10
Fork
32
Merge medio
3g 2h
PR unite (30g)
23

Preparare l'ambiente

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

Tutte le issue di kernelci/dashboard

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.