Repository navigation
fix(dbt): set CMD ["build"] to prevent silent no-op (D111) - #83
Merged
Merged
Conversation
The dbt Cloud Run Job entrypoint was `uv run dbt` without a default subcommand, causing the container to print the help message and exit 0 on every invocation. Adding a default CMD makes the image a builder by default while remaining overridable via Cloud Run args or gcloud --args.
This was referenced May 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contexte
Découverte d'un bug critique en clôture de Phase 3 monitoring : le
Cloud Run Job
datatalent-dbt, invoqué paringestion/main.pyenfin de pipeline (PR #81, T9.17, D108), exécute en réalité un no-op
silencieux. Le container démarre, affiche l'aide
dbt, et exit 0.Cloud Run reporte
SUCCEEDED,main.pyloggedbt_invoked,l'alerte D105 ne déclenche pas, et les marts
marts.*ne sontjamais mis à jour.
Mode de défaillance précisément refusé par D72 (« dashboard stale
sans signal »), ramené par une autre porte : la robustesse de
l'orchestration applicative ne protège pas contre un container vide.
Bloquant pour la qualification end-to-end visée lundi 6h.
Décisions techniques
Voir D111 (notes-projet.md) pour l'arbitrage complet. Synthèse :
CMD ["build"]dans le DockerfileargsTerraform au niveau du modulecloud_run/container_overridescôtémain.pyVoie A : default surchargeable au moment de l'invocation (Cloud
Run
argsougcloud --args), pas de modification Terraform, pasde modification applicative, reproductibilité locale parfaite via
docker run.Voies B et C écartées : couplage transverse sans bénéfice
concret au stade actuel. Si un second usage récurrent émerge
(ex.
dbt docs generate), un second Job Cloud Run réutilisera lamême image avec
argsà l'instanciation (cohérent D34).Changements
dbt/Dockerfile: ajoutCMD ["build"]en forme exec aprèsENTRYPOINT, 2 lignes de commentaire expliquant le defaultsurchargeable et le no-op évité, newline final corrigé.
Validation locale
Trois tests
docker runsur image rebuilt :→
dbt buildinvoqué, parsing du projet réussi, erreur d'auth GCPattendue (pas de credentials locales).
→ Le
CMDest bien surchargeable, l'image n'est pas verrouillée.→ Sous-commande arbitraire passable, pattern
dbt docs generatefutur viable sans toucher au Dockerfile.
Validation prod (post-merge)
cd-dbt.ymlse déclenche surpushversmainuniquement, doncla validation prod n'est possible qu'après merge. Séquence prévue
post-merge :
build-push+deploy-job).gcloud run jobs execute datatalent-dbt --wait.Running with dbt=X.Y.Z+ au moinsun
PASS|FAILde test ou de modèle.marts.*a un timestamp postérieur àl'invocation.
Preuves de validation prod ajoutées au body de la PR avant clôture.
Décisions liées
no-op ici, fix renforce la doctrine.
(pas un faux positif d'image périmée).
applicatif (fire-and-forget).
notes-projet.md hors repo).
Refs : D72, D73, D108, D111.