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: changed cursor field from created to updated #5426

Merged
merged 6 commits into from
Sep 2, 2021

Conversation

vitaliizazmic
Copy link
Contributor

What

Changed cursor field for Issues stream from created to updated JQL field. Updated cursor filed in schema for Issues stream. Improved slicing and cursor field for IssuesWorklogs stream.

Closes #4505

  • Secrets in the connector's spec are annotated with airbyte_secret
  • Unit & integration tests added and passing. Community members, please provide proof of success locally e.g: screenshot or copy-paste unit, integration, and acceptance test output. To run acceptance tests for a Python connector, follow instructions in the README. For java connectors run ./gradlew :airbyte-integrations:connectors:<name>:integrationTest.
  • Code reviews completed
  • Documentation updated
    • Connector's README.md
    • docs/SUMMARY.md
    • docs/integrations/<source or destination>/<name>.md including changelog. See changelog example
    • docs/integrations/README.md
    • airbyte-integrations/builds.md
  • PR name follows PR naming conventions
  • Connector added to connector index like described here

…s.started to fields.updated, update IssuesWorklogs slicing
@github-actions github-actions bot added the area/connectors Connector related issues label Aug 16, 2021
@vitaliizazmic
Copy link
Contributor Author

vitaliizazmic commented Aug 16, 2021

/test connector=source-jira

🕑 source-jira https://github.com/airbytehq/airbyte/actions/runs/1135050644
✅ source-jira https://github.com/airbytehq/airbyte/actions/runs/1135050644

@jrhizor jrhizor temporarily deployed to more-secrets August 16, 2021 09:59 Inactive
@@ -7455,10 +7455,10 @@
},
"supported_sync_modes": ["incremental"],
"source_defined_cursor": true,
"default_cursor_field": ["created"]
"default_cursor_field": ["fields", "updated"]
Copy link
Contributor

Choose a reason for hiding this comment

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

I dont sure about this change.
Previously issues.fields where a field containing additionalproperties. Yes, updated exists there.
It were stored as JSON column, and it will be possibly returned to additionalproperties without details (like it was before), to avoid data missing and db structure change. We'll discuss this tomorrow

@sherifnada
Copy link
Contributor

@Phlair would you be able to review this one?

current_stream_state = current_stream_state.get(self.cursor_field)
if current_stream_state:
return {self.cursor_field: str(max(latest_record_date, pendulum.parse(current_stream_state)))}
issue_id = latest_record.get("issueId")
Copy link
Contributor

Choose a reason for hiding this comment

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

why is this changing? we shouldn't store separate state for each issue, this can get massive

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 just make this stream full refresh for now

@vitaliizazmic
Copy link
Contributor Author

vitaliizazmic commented Aug 31, 2021

/test connector=source-jira

🕑 source-jira https://github.com/airbytehq/airbyte/actions/runs/1186622671
❌ source-jira https://github.com/airbytehq/airbyte/actions/runs/1186622671

@jrhizor jrhizor temporarily deployed to more-secrets August 31, 2021 14:57 Inactive
@vitaliizazmic
Copy link
Contributor Author

vitaliizazmic commented Aug 31, 2021

/test connector=source-jira

🕑 source-jira https://github.com/airbytehq/airbyte/actions/runs/1186763856
❌ source-jira https://github.com/airbytehq/airbyte/actions/runs/1186763856

@jrhizor jrhizor temporarily deployed to more-secrets August 31, 2021 15:36 Inactive
@vitaliizazmic
Copy link
Contributor Author

vitaliizazmic commented Aug 31, 2021

/test connector=source-jira

🕑 source-jira https://github.com/airbytehq/airbyte/actions/runs/1186802530
✅ source-jira https://github.com/airbytehq/airbyte/actions/runs/1186802530

@jrhizor jrhizor temporarily deployed to more-secrets August 31, 2021 15:48 Inactive
@github-actions github-actions bot added the area/documentation Improvements or additions to documentation label Sep 1, 2021
@vitaliizazmic
Copy link
Contributor Author

vitaliizazmic commented Sep 1, 2021

/publish connector=connectors/source-jira

🕑 connectors/source-jira https://github.com/airbytehq/airbyte/actions/runs/1190599557
✅ connectors/source-jira https://github.com/airbytehq/airbyte/actions/runs/1190599557

@jrhizor jrhizor temporarily deployed to more-secrets September 1, 2021 14:36 Inactive
@vitaliizazmic vitaliizazmic merged commit d3b2e8a into master Sep 2, 2021
@vitaliizazmic vitaliizazmic deleted the vitalii/4505_jira_use_update_for_cursor_field branch September 2, 2021 11:22
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Source Jira: use updated_at instead of created_at for cursor values
4 participants