From 37c22d1be66c2ace7036846226fe48ed84d1b847 Mon Sep 17 00:00:00 2001 From: Roman Mitasov Date: Mon, 22 Jun 2026 11:12:40 +0300 Subject: [PATCH] fix(reconcile): jira staging dbt selector matched zero models (tag:jira-staging) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The jira enrich pipeline runs three dbt phases: staging -> enrich -> silver. Both renderers (render_sync_trigger.py, render_cronworkflow.py) hardcoded the staging selector as `tag:jira-staging` for jira. No model carries that tag — the staging models jira__changelog_items and jira__issue_field_snapshot are tagged ['staging', 'jira']. So `dbt run --select tag:jira-staging` selected zero nodes, exited 0 ("Nothing to do"), and the step went green while building nothing. Effect on virtuozzo: nightly jira syncs were green end to end (sync, enrich, silver all Succeeded) but the staging tables were never rebuilt — staging.jira_issue_field_snapshot stayed at 0 rows, jira_changelog_items frozen, and the downstream silver (class_task_field_history, ephemeral off changelog_items) frozen at the date of the last MANUAL run. Manual run-sync.sh uses `tag:jira` for staging, which is why local/manual runs populated the tables but reconcile-rendered cronworkflows did not. Fix: select `tag:staging,tag:jira` (intersection) in both renderers — exactly the two jira staging models, nothing broader. Verified the tags on the models and that no model is tagged `jira-staging`. Co-Authored-By: Claude Fable 5 Signed-off-by: Roman Mitasov --- .../reconcile-connectors/python/render_cronworkflow.py | 10 +++++++++- .../reconcile-connectors/python/render_sync_trigger.py | 10 +++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/ingestion/reconcile-connectors/python/render_cronworkflow.py b/src/ingestion/reconcile-connectors/python/render_cronworkflow.py index 7265c135f..03cb40db6 100644 --- a/src/ingestion/reconcile-connectors/python/render_cronworkflow.py +++ b/src/ingestion/reconcile-connectors/python/render_cronworkflow.py @@ -49,7 +49,15 @@ def main() -> int: # operators can see what the workflow is for in Argo UI; only # `jira` triggers the enriched branch. data_source = args.connector - dbt_select_staging = "tag:jira-staging" if args.connector == "jira" else "" + # Intersection of the `staging` and `jira` tags = exactly the jira staging + # models (jira__changelog_items, jira__issue_field_snapshot). The old + # "tag:jira-staging" matched NO model (no such tag exists — they are tagged + # ['staging', 'jira']), so the nightly staging step ran zero models and the + # enrich/silver steps ran on empty/stale staging (jira_issue_field_snapshot + # stayed at 0 rows, changelog_items frozen). Manual run-sync.sh uses + # "tag:jira", which is why local runs worked but reconcile-rendered crons + # did not. + dbt_select_staging = "tag:staging,tag:jira" if args.connector == "jira" else "" env = { "CONNECTOR": args.connector, diff --git a/src/ingestion/reconcile-connectors/python/render_sync_trigger.py b/src/ingestion/reconcile-connectors/python/render_sync_trigger.py index fd5a020ff..d47941084 100644 --- a/src/ingestion/reconcile-connectors/python/render_sync_trigger.py +++ b/src/ingestion/reconcile-connectors/python/render_sync_trigger.py @@ -48,7 +48,15 @@ def main() -> int: args = p.parse_args() data_source = args.connector - dbt_select_staging = "tag:jira-staging" if args.connector == "jira" else "" + # Intersection of the `staging` and `jira` tags = exactly the jira staging + # models (jira__changelog_items, jira__issue_field_snapshot). The old + # "tag:jira-staging" matched NO model (no such tag exists — they are tagged + # ['staging', 'jira']), so the nightly staging step ran zero models and the + # enrich/silver steps ran on empty/stale staging (jira_issue_field_snapshot + # stayed at 0 rows, changelog_items frozen). Manual run-sync.sh uses + # "tag:jira", which is why local runs worked but reconcile-rendered crons + # did not. + dbt_select_staging = "tag:staging,tag:jira" if args.connector == "jira" else "" dbt_full_refresh = "true" if args.bump_kind == "major" else "false" env = {