Merge main into fase-9: SQLite test databases in memory on the CI
ci / test (postgres) (push) Failing after 6m53s
ci / test (sqlite) (push) Failing after 5m26s
ci / image (push) Skipped
ci / test (postgres) (pull_request) Failing after 7m47s
ci / test (sqlite) (pull_request) Canceled after 1m49s
ci / image (pull_request) Canceled after 0s
ci / test (postgres) (push) Failing after 6m53s
ci / test (sqlite) (push) Failing after 5m26s
ci / image (push) Skipped
ci / test (postgres) (pull_request) Failing after 7m47s
ci / test (sqlite) (pull_request) Canceled after 1m49s
ci / image (pull_request) Canceled after 0s
The CI of Phase 9 failed on seven tests that start the server on a SQLite file: on the runner's disk the migrations alone took 24 seconds, past the 30-second start limit. PR #110 (ADR 0019), now in main, keeps the test databases in a tmpfs folder on the CI. STATE.md no longer lists #110 as waiting for the user. refs #75 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
4aea2d0be7
4 files changed
+43
-4
No files matched your search
@@ -0,0 +1,26 @@
|
||||
# 0019 — Nella CI i database SQLite delle prove stanno in memoria
|
||||
|
||||
Data: 2026-12-01 · Stato: accettata · Continua l'ADR 0015 (CI, SPEC 15.5), senza componenti esterni nuovi
|
||||
|
||||
## Contesto
|
||||
|
||||
Il 1° dicembre 2026 la CI di `main` (run 557, lavoro `test (sqlite)`) è fallita in `HealthChecksDatabaseAndScheduler`: `/health` ha risposto 503. Il registro mostra che per oltre 6 secondi nessun test è avanzato, e il ping al database ha superato il suo limite di 5 secondi. Lo stesso codice era passato sul branch e nel lavoro PostgreSQL.
|
||||
|
||||
È la causa già vista nell'ADR 0015: il disco dell'esecutore su Unraid si ferma per secondi sotto carico. Lì il rimedio riguardava solo PostgreSQL. I database SQLite dei test sincronizzano ogni scrittura (`synchronous=FULL`, come dal vivo), e la Fase 8 ne ha aggiunti molti.
|
||||
|
||||
## Decisione
|
||||
|
||||
1. **Cartella temporanea in memoria.** Il contenitore del lavoro `test` monta un `tmpfs` da 4 GB al massimo in `/test-tmp`, e le prove la usano come cartella temporanea (`TMPDIR`). Il codice di Anubis e le impostazioni di SQLite restano quelli veri.
|
||||
2. **Il test di `/health` aspetta.** Un computer fermo da più di 5 secondi *deve* risultare non disponibile: il test guarda la risposta a cui si arriva entro 30 secondi. Uno scheduler o un database davvero fermi lo fanno fallire ancora, e il messaggio dice quale.
|
||||
|
||||
## Alternative scartate
|
||||
|
||||
- `synchronous=OFF` nei test: cambierebbe il codice che si prova.
|
||||
- Rilanciare il lavoro: nasconde la causa.
|
||||
- Meno test in parallelo: la CI durerebbe di più e il disco si fermerebbe lo stesso.
|
||||
|
||||
## Conseguenze
|
||||
|
||||
- I test SQLite della CI non provano la durata dei dati dopo un'interruzione di corrente: non lo facevano nemmeno prima.
|
||||
- In locale non cambia niente.
|
||||
- Il passo `Check` stampa lo spazio della cartella: se il montaggio sparisse si vedrebbe lì.
|
||||
Reference in new issue
Block a user