fix(jira): widen jira_project_discovery cursor formats to parse child parent_state#1383
Conversation
… parent_state
jira_project_discovery's cursor parsed only the ISO format
'%Y-%m-%dT%H:%M:%S.%f%z' (insight.lastIssueUpdateTime). But its child
substreams jira_issue / jira_issue_keys serialise their own cursor as
'%Y-%m-%d %H:%M', and that value flows back through parent_state. Reading
it crashed the issue stream:
Exception while syncing stream jira_issue:
No format in ['%Y-%m-%dT%H:%M:%S.%f%z'] matching 2026-06-15 02:00
Add the two child formats ('%Y-%m-%d %H:%M', '%Y-%m-%d') to the parent's
cursor_datetime_formats so parent and child cursor values are mutually
parseable. datetime_format (serialisation) stays ISO since
lastIssueUpdateTime is always ISO. Relevant now that 2.0.1 ships
global_substream_cursor and the descriptor bump (2.0.0->2.0.1) is a patch,
so reconcile carries stale per-partition state into the new manifest.
descriptor 2.0.1 -> 2.0.2 so reconcile republishes.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Roman Mitasov <Roman.Mitasov@constructor.tech>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe ChangesJira Project Discovery Cursor Fix
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Problem
jira syncs crash mid-stream:
(Observed on job 187, 2h8m / 2.1M records, "Sync did not complete".)
Root cause
jira_project_discovery(the auto-discovery parent from #1316) declares only the ISO format%Y-%m-%dT%H:%M:%S.%f%zincursor_datetime_formats— correct forinsight.lastIssueUpdateTime. But its child substreamsjira_issue/jira_issue_keysserialise their own cursor as%Y-%m-%d %H:%M, and that value flows back throughparent_state. When the discovery cursor parses it, none of its (single) formats match2026-06-15 02:00→ the stream throws.This is latent now that #1370 ships
global_substream_cursorand the descriptor bump 2.0.0→2.0.1 is a patch (no state reset), so reconcile carries stale per-partition state into the new manifest.Fix
Add the two child formats to the parent's
cursor_datetime_formats:datetime_format(serialisation) stays ISO sincelastIssueUpdateTimeis always ISO — this only widens what the cursor can parse, so parent and child cursor values are mutually parseable.descriptor
2.0.1 → 2.0.2so reconcile republishes the manifest.validate(CDK runtime): manifest valid.🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Version Updates