Skip to content

fix(ingestion): tag jira__task_field_metadata as staging so enrich builds it (#1743) - #1844

Merged
cyberantonz merged 2 commits into
constructorfabric:mainfrom
cyberantonz:fix/jira-task-field-metadata-staging-tag
Jul 22, 2026
Merged

fix(ingestion): tag jira__task_field_metadata as staging so enrich builds it (#1743)#1844
cyberantonz merged 2 commits into
constructorfabric:mainfrom
cyberantonz:fix/jira-task-field-metadata-staging-tag

Conversation

@cyberantonz

@cyberantonz cyberantonz commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Closes #1743.

Note: #1743 is assigned to @mitasovr — flagging in case of overlap. It's a vz_blocker with no PR yet and a trivial fix, so opening this to unblock; happy to defer if it conflicts with in-flight work.

Problem

After a successful Jira sync, Task Delivery and Code Quality KPIs are all blank (silver.class_task_* = 0) even though bronze_jira.jira_issue is populated.

Root cause

The pipeline's staging phase runs dbt_select_staging = "tag:staging,tag:jira" — a comma is an intersection. jira__task_field_metadata was tagged only ['jira', 'silver:class_task_field_metadata'] (no staging), so the intersection never built it. But jira-enrich reads it first thing — FROM staging.jira__task_field_metadata (enrich/src/io/reader.rs:34) — so the enrich step aborts on the missing relation and the pipeline stops before silver, leaving class_task_* empty.

Its sibling enrich inputs jira__changelog_items and jira__issue_field_snapshot are both tagged ['staging', 'jira'] and build fine — jira__task_field_metadata was the lone outlier.

Fix

Add the staging tag (one line) so it builds in the staging phase alongside the other enrich inputs:

tags=['staging', 'jira', 'silver:class_task_field_metadata']

This matches the issue's suggested fix and the sibling models. Low-risk: adding a tag only makes the model eligible in one more selector; the silver: union tag is unchanged.

Verification

Traced statically: enrich's fetch_field_metadata reads staging.jira__task_field_metadata; the model was the only enrich input missing staging. The issue's confirmed workaround (dbt_select_staging = "tag:jira") builds it — this fix makes the default intersection build it too. (Full pipeline needs ClickHouse+Argo; not runnable locally.)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Documented the required staging classification for Jira task field metadata.
    • Clarified that enrichment processes require both Jira and staging classifications.

…ilds it (constructorfabric#1743)

The pipeline's staging phase selects `tag:staging,tag:jira` (an intersection).
`jira__task_field_metadata` was tagged only `['jira', 'silver:...]`, so the
intersection never built it — yet jira-enrich reads
`staging.jira__task_field_metadata` (reader.rs), so the step aborted and
`silver.class_task_*` stayed empty, blanking all Task Delivery + Code Quality
KPIs despite a successful Jira sync.

Add the `staging` tag (matching the sibling enrich inputs
jira__changelog_items / jira__issue_field_snapshot) so it builds in the
staging phase.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Anton Zelenov <antonz@constructor.tech>
@cyberantonz
cyberantonz requested a review from a team as a code owner July 22, 2026 08:18
@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 910c4d56-7bcd-4c13-b80d-57fc2d94b574

📥 Commits

Reviewing files that changed from the base of the PR and between 8110637 and 1f7e352.

📒 Files selected for processing (1)
  • src/ingestion/connectors/task-tracking/jira/dbt/jira__task_field_metadata.sql

📝 Walkthrough

Walkthrough

The Jira task field metadata dbt model now includes the staging tag and documents that jira-enrich selects models tagged with both staging and jira.

Changes

Jira staging selection

Layer / File(s) Summary
Add Jira staging tag
src/ingestion/connectors/task-tracking/jira/dbt/jira__task_field_metadata.sql
The model configuration adds the staging tag and documents the jira-enrich selector requirements.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

Suggested reviewers: mitasovr

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: tagging jira__task_field_metadata as staging so enrich can build it.
Linked Issues check ✅ Passed The change matches issue #1743 by adding the missing staging tag so Jira enrich inputs are built and the pipeline can proceed.
Out of Scope Changes check ✅ Passed The PR only adds the required staging tag and a related explanatory comment move, with no unrelated code changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…ror)

The explanatory comment was placed with `--` INSIDE the `{{ config(...) }}`
Jinja expression, which isn't valid Jinja — dbt parse failed with
"invalid syntax for function call expression" and every metrics e2e test
errored. Move it below the config block (SQL comment space). The `staging`
tag itself is unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Anton Zelenov <antonz@constructor.tech>
@cyberantonz
cyberantonz merged commit 5810b65 into constructorfabric:main Jul 22, 2026
35 checks passed
ktursunov pushed a commit to ktursunov/insight that referenced this pull request Jul 23, 2026
…ilds it (constructorfabric#1743) (constructorfabric#1844)

* fix(ingestion): tag jira__task_field_metadata as staging so enrich builds it (constructorfabric#1743)

The pipeline's staging phase selects `tag:staging,tag:jira` (an intersection).
`jira__task_field_metadata` was tagged only `['jira', 'silver:...]`, so the
intersection never built it — yet jira-enrich reads
`staging.jira__task_field_metadata` (reader.rs), so the step aborted and
`silver.class_task_*` stayed empty, blanking all Task Delivery + Code Quality
KPIs despite a successful Jira sync.

Add the `staging` tag (matching the sibling enrich inputs
jira__changelog_items / jira__issue_field_snapshot) so it builds in the
staging phase.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Anton Zelenov <antonz@constructor.tech>

* fix(ingestion): move note out of the {{ config }} block (dbt parse error)

The explanatory comment was placed with `--` INSIDE the `{{ config(...) }}`
Jinja expression, which isn't valid Jinja — dbt parse failed with
"invalid syntax for function call expression" and every metrics e2e test
errored. Move it below the config block (SQL comment space). The `staging`
tag itself is unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Anton Zelenov <antonz@constructor.tech>

---------

Signed-off-by: Anton Zelenov <antonz@constructor.tech>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

Jira sync succeeds but Task Delivery + Code Quality KPIs are all blank (Tasks Completed, MTTR, Dev Time, Estimation Accuracy, Bugs Fixed, …)

3 participants