Skip to content

feat(ingestion-monitoring): bronze freshness runtime — CronWorkflow + driver alerts#1356

Draft
dzarlax wants to merge 2 commits into
constructorfabric:mainfrom
dzarlax:feat/ingestion-freshness-runtime
Draft

feat(ingestion-monitoring): bronze freshness runtime — CronWorkflow + driver alerts#1356
dzarlax wants to merge 2 commits into
constructorfabric:mainfrom
dzarlax:feat/ingestion-freshness-runtime

Conversation

@dzarlax

@dzarlax dzarlax commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

What

The runtime / alerting half of bronze source-freshness monitoring — the operational counterpart to the per-source declarations that landed in #1346. Adds a new ingestion-monitoring domain.

  • dbt-source-freshness-check CronWorkflow — runs dbt source freshness --select source:* daily at 13:00 UTC (past every connector's 02:00–11:00 UTC sync window + 2h grace), parses target/sources.json, logs each breaching source with max_loaded_at + lag, and flips the workflow to Failed only on error / runtime error (warn stays green, still printed + emitted in the payload).
  • Driver-based notificationwebhook / zulip / slack / teams / email, selected via ingestion.freshness.notification.driver; every credential read from a Secret via secretKeyRef (never rendered into manifests / Argo UI).
  • Runtime trap detector (freshness-trap-detect.py) — advisory-only spotter for the full-reemit / windowed-refetch pattern dbt's own freshness can't see (exactly the false-green class that drove the per-source business-date anchoring in test(data): source freshness on all bronze connectors (#1322) #1346).
  • PRD / DESIGN / FEATURE for the ingestion-monitoring domain + an operator runbook (src/ingestion/MONITORING.md).

Relationship to the declaration half

This PR does not own thresholds or loaded_at_field — those are literal per source in each connector's schema.yml (#1346 / EPIC #1321). The cron reads whatever the sources declare; it only schedules the check and acts on the verdict. Sequencing was agreed with QA on #1346: declarations land first, this sits on top.

Notes

  • Additive only — one new WorkflowTemplate + CronWorkflow, a freshness-trap-detect.py, an ingestion.freshness.* Helm block (+ schema), and docs. No existing behavior changes.
  • dbt source freshness has not been run end-to-end against a populated warehouse from this branch; the helm template renders and the YAML/schema validate. First real run is the verification step.

Closes #949. Refs #1321 (EPIC), #1322. Depends on #1346 (merged).

@dzarlax
dzarlax requested a review from a team as a code owner June 17, 2026 08:57
Alexey Panfilov added 2 commits June 17, 2026 10:59
…trap-detector, driver notifications

Runtime/alerting half of bronze source freshness (EPIC constructorfabric#1321, closes constructorfabric#949).
Sits on top of the per-source freshness declarations from constructorfabric#1346:
- dbt-source-freshness-check CronWorkflow (daily, parses sources.json)
- driver-based notifications (webhook/zulip/slack/teams/email)
- freshness-trap-detect.py runtime trap detector
- ingestion-monitoring domain PRD/DESIGN/FEATURE + operator runbook

Thresholds owned by the per-source declarations, not this PR.

Signed-off-by: Alexey Panfilov <alexey.panfilov@constructor.tech>
The PRD/DESIGN/FEATURE/MONITORING docs described the original cohesive
design (inherited +freshness in dbt_project.yml, env_var-driven thresholds,
lint-bronze-freshness.py CI). That model was dropped in favor of the split
agreed with QA:
- declarations + literal per-source thresholds owned by the connector schemas
  (EPIC constructorfabric#1321/constructorfabric#1322 — PR constructorfabric#1346 + PR SharedQA#1), coverage counted by
  the QA dbt_coverage.py gate
- this PR owns runtime/alerting only (CronWorkflow, parser, trap detector,
  driver notifications)

Also folds in the empirically-verified false-green finding (windowed
vendor-analytics connectors must anchor on a business-date column, not
_airbyte_extracted_at) and corrects cyberfabric -> constructorfabric refs.

Signed-off-by: Alexey Panfilov <alexey.panfilov@constructor.tech>
@dzarlax
dzarlax force-pushed the feat/ingestion-freshness-runtime branch from 60f4a29 to e072ad4 Compare June 17, 2026 08:59

@mitasovr mitasovr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is better way

@mitasovr
mitasovr marked this pull request as draft July 13, 2026 11:04
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.

[PR #256] feat(ingestion): bronze freshness SLA + daily freshness CronWorkflow

2 participants