Skip to content

fix(jira): widen jira_project_discovery cursor formats to parse child parent_state#1383

Merged
mitasovr merged 1 commit into
constructorfabric:mainfrom
mitasovr:claude/jira-discovery-cursor-formats
Jun 19, 2026
Merged

fix(jira): widen jira_project_discovery cursor formats to parse child parent_state#1383
mitasovr merged 1 commit into
constructorfabric:mainfrom
mitasovr:claude/jira-discovery-cursor-formats

Conversation

@mitasovr

@mitasovr mitasovr commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Problem

jira syncs crash mid-stream:

Exception while syncing stream jira_issue:
No format in ['%Y-%m-%dT%H:%M:%S.%f%z'] matching 2026-06-15 02:00

(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%z in cursor_datetime_formats — correct for 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. When the discovery cursor parses it, none of its (single) formats match 2026-06-15 02:00 → the stream throws.

This is latent now that #1370 ships global_substream_cursor and 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:

cursor_datetime_formats:
  - "%Y-%m-%dT%H:%M:%S.%f%z"
  - "%Y-%m-%d %H:%M"
  - "%Y-%m-%d"

datetime_format (serialisation) stays ISO since lastIssueUpdateTime is 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.2 so reconcile republishes the manifest.

validate (CDK runtime): manifest valid.

Note: this is one of two issues blocking jira on virtuozzo. The other is airbyte-server OOMKilling at its 1Gi eval limit under the full auto-discovery sync (211 projects) — handled separately in the gitops Airbyte overlay (server/worker → 3Gi), not in this repo.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes

    • The Jira connector now supports multiple datetime formats, preventing synchronization failures caused by timestamp format incompatibilities. This enhancement improves reliability when syncing data from various Jira project configurations and cursor states.
  • Version Updates

    • Jira connector updated to version 2.0.2.

… 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>
@mitasovr mitasovr requested a review from a team as a code owner June 19, 2026 14:19
@coderabbitai

coderabbitai Bot commented Jun 19, 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: d4a93432-084e-4b06-9d48-377c9244f461

📥 Commits

Reviewing files that changed from the base of the PR and between 50a7930 and 2207f87.

📒 Files selected for processing (2)
  • src/ingestion/connectors/task-tracking/jira/connector.yaml
  • src/ingestion/connectors/task-tracking/jira/descriptor.yaml

📝 Walkthrough

Walkthrough

The jira_project_discovery stream's cursor_datetime_formats in connector.yaml is expanded from one ISO format to three formats (full ISO with timezone, space-delimited minute precision, and date-only). The descriptor.yaml version is bumped from 2.0.1 to 2.0.2 with a matching changelog entry.

Changes

Jira Project Discovery Cursor Fix

Layer / File(s) Summary
Cursor datetime format expansion and version bump
src/ingestion/connectors/task-tracking/jira/connector.yaml, src/ingestion/connectors/task-tracking/jira/descriptor.yaml
jira_project_discovery incremental_sync.cursor_datetime_formats is extended from a single ISO format to three formats ("%Y-%m-%dT%H:%M:%S.%f%z", "%Y-%m-%d %H:%M", "%Y-%m-%d") with inline comments; descriptor version is bumped to 2.0.2 with a changelog entry describing the fix.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Suggested reviewers

  • cyberantonz
  • mozhaev-dev

Poem

🐇 Hoppity-hop through timestamps galore,
Three datetime formats where there was one before!
The cursor now parses child states with glee,
No crash, no mismatch — just harmony!
A version bump seals it: 2.0.2 for thee. 🎉

🚥 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: widening cursor datetime format parsing in the jira_project_discovery stream to handle multiple formats from child streams.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 and usage tips.

@mitasovr mitasovr merged commit b0be27f into constructorfabric:main Jun 19, 2026
18 checks passed
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.

2 participants