Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚨 🚨 ✨ Source Jira: Migrate IssueComments and IssueWorklogs streams to low code #38612

Merged
merged 13 commits into from
Oct 30, 2024

Conversation

tolik0
Copy link
Contributor

@tolik0 tolik0 commented May 23, 2024

What

Migrate IssueComments and IssueWorklogs streams to low code based on the CDK update to add an incremental dependency to the parent stream. Corresponding CDK PR: #38211

How

The IssueComments and IssueWorklogs streams have been migrated to low code. Their parent stream, Issues, will now be read incrementally using the state from the child streams. The parent state will be saved to the child state.

User Impact

This change is not reversible.
This PR introduces a breaking change due to the state format modification. Migration to the new version will be done automatically, but the new state format is incompatible with the previous version. The first sync after migration may be slow as the connector needs to reread all parent records.

Old state format:

"stream_state": {
  "updated": "2222-05-08T03:04:45.056-0700"
}

New state format:

"stream_state": {
  "state": [
    {
        "updated": "2222-04-15T11:40:03.372-0700"
    }
  ],
  "parent_state": {
    "issues": {
      "states": [
        {
          "partition": {
            "parent_slice": {},
            "project_id": "10000"
          },
          "cursor": {
            "updated": "2222-10-12T13:43:50.735-0700"
          }
        },
        {
          "partition": {
            "parent_slice": {},
            "project_id": "10016"
          },
          "cursor": {
            "updated": "2222-07-05T12:57:51.258-0700"
          }
        }
      ]
    }
  }
}

Can this PR be safely reverted and rolled back?

  • YES 💚
  • NO ❌

Copy link

vercel bot commented May 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
airbyte-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 29, 2024 4:16pm

@@ -127,6 +127,7 @@ The Jira connector should not run into Jira API limitations under normal usage.

| Version | Date | Pull Request | Subject |
|:--------|:-----------|:-----------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 3.1.0 | 2024-08-16 | [38612](https://github.com/airbytehq/airbyte/pull/38612) | Migrate IssueComments and IssueWorklogs streams to low code |
Copy link
Contributor

Choose a reason for hiding this comment

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

let's be super clear that this is not revertible

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated the message

@tolik0 tolik0 force-pushed the tolik0/source-jira/migrate-incremental-substreams branch from 1cf7ca9 to 0e17388 Compare August 15, 2024 07:32
@tolik0 tolik0 force-pushed the tolik0/source-jira/migrate-incremental-substreams branch from 0e17388 to 9b95d9e Compare August 20, 2024 14:02
@tolik0 tolik0 force-pushed the tolik0/source-jira/migrate-incremental-substreams branch from 9b95d9e to 7b26c3a Compare September 12, 2024 11:47
@tolik0
Copy link
Contributor Author

tolik0 commented Oct 28, 2024

Regression tests - https://github.com/airbytehq/airbyte/actions/runs/11554415703/job/32157573020
The value of the cursor changed due to new format:
Previous - 2021-04-15T11:39:46.574000-07:00, New - 2021-04-15T11:39:46.574-07:00

@tolik0 tolik0 marked this pull request as ready for review October 28, 2024 13:47
@tolik0 tolik0 requested a review from a team October 28, 2024 14:19
@tolik0 tolik0 requested a review from clnoll October 29, 2024 11:31
Copy link
Contributor

@maxi297 maxi297 left a comment

Choose a reason for hiding this comment

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

LGTM! I'm just wondering why we emit so many more state messages in the new version based on the regression tests here

@tolik0
Copy link
Contributor Author

tolik0 commented Oct 30, 2024

The difference in state count is due to the Python implementation previously emitting state messages at intervals, whereas now we emit them after every slice.

@tolik0 tolik0 merged commit 7fe34ed into master Oct 30, 2024
38 checks passed
@tolik0 tolik0 deleted the tolik0/source-jira/migrate-incremental-substreams branch October 30, 2024 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/connectors Connector related issues area/documentation Improvements or additions to documentation connectors/source/jira
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants