Skip to content

fix(infra): scope make logs to 7 days so demo events are visible (D114) - #96

Merged
GMartin-Data merged 1 commit into
mainfrom
fix/makefile-logs-freshness
Jun 4, 2026
Merged

GMartin-Data merged 1 commit into
mainfrom
fix/makefile-logs-freshness

Conversation

@GMartin-Data

Copy link
Copy Markdown
Owner

Contexte

Test des cibles read-only du Makefile démo (D114, hors make trigger) à la veille
de la soutenance. Trois cibles sur quatre se comportent comme attendu
(help, last-run, fresh) ; make logs renvoyait un résultat vide.

make logs est le geste qui prouve l'enchaînement ingestion → dbt (orchestration
conditionnelle, D72/D108) — un résultat vide en démo ferait tomber cet argument.

Cause racine

gcloud logging read n'interroge que les dernières 24 h par défaut. Le pipeline
tourne en hebdomadaire (cron lundi) : hors du lendemain d'un run, la fenêtre de 24 h
ne couvre plus aucun event. Le filtre était correct — les events ingestion_end /
dbt_invoked sont bien présents (vérifié avec --freshness=7d, la séquence remonte).
Seule la fenêtre temporelle implicite était trop étroite.

Changement

Makefile — cible logs :

  • ajout de --freshness=7d (couvre le dernier run hebdomadaire quoi qu'il arrive) ;
  • commentaire explicatif déplacé au-dessus de la recette (sinon make l'echo avant
    la sortie → bruit visuel en démo).

Validation

make logs après correction, sortie réelle (run du 2026-06-01) :

2026-06-01T04:07:22.876933Z	ingestion_end
2026-06-01T04:07:22.876916Z	dbt_invoked
2026-06-01T04:07:22.630177Z	ingestion_end
...

L'enchaînement ingestion_end → dbt_invoked est désormais visible. Les 3 autres
cibles read-only (help, last-run, fresh) ont été testées et se comportent comme
attendu. make trigger non testé (déclenche le pipeline, hors périmètre).

Refs : D114 (Makefile démo), D72 / D108 (orchestration conditionnelle ingestion → dbt).

…114)

`gcloud logging read` defaults to the last 24h. The pipeline runs weekly
(Monday cron), so outside the day after a run the `logs` target returned
nothing — the demo gesture proving the ingestion -> dbt orchestration showed
an empty result. Add --freshness=7d to cover the latest weekly run.

The filter itself was correct (ingestion_end / dbt_invoked events are present);
only the implicit time window was too narrow. Comment moved above the recipe
so make does not echo it before the output.
@GMartin-Data
GMartin-Data merged commit c4ed4c2 into main Jun 4, 2026
6 checks passed
@GMartin-Data
GMartin-Data deleted the fix/makefile-logs-freshness branch June 4, 2026 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant