-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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: fix timezone issue #48838
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this with Jira version v3.4.1-dev.18c2e5d364
, and it successfully retrieved only the last entry as expected (when creating two new entries it pulled the last updated one + new entries).
Good to go on my end.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢
What
Fixes https://github.com/airbytehq/oncall/issues/7008
How
By considering the timezone when creating the str representation of what we send to the API. Indeed, when calling dt.strftime(format), the timezone information is just dropped if not mentioned which leads the interpolation with
timestamp
like this one to not have the timezone information as well.I checked quickly and we seem to always be building all the queries using interpolation and not with RequestOptionProvider
start_time_option
which therefore should be safe to change for the whole connector.User Impact
Using incremental syncs should lead to less duplication and no data loss
Before code change
https://airbyteio.atlassian.net/rest/api/3/search?fields=%2Aall&jql=updated+%3E%3D+1732877091000+and+project+in+%2810025%29+ORDER+BY+updated+asc&expand=renderedFields%2Ctransitions%2Cchangelog&maxResults=50
https://airbyteio.atlassian.net/rest/api/3/search?fields=%2Aall&jql=updated+%3E%3D+1732877091000+and+project+in+%2810025%29+ORDER+BY+updated+asc&expand=renderedFields%2Ctransitions%2Cchangelog&maxResults=50
As we can see, it creates the same request with epoch 1732877091000 that correspond to 2024-11-29T10:44:51.887 UTC regardless of the timezone in the state
After code change
State with cursor value of 2024-11-29T10:44:51.887+0000
https://airbyteio.atlassian.net/rest/api/3/search?fields=%2Aall&jql=updated+%3E%3D+1732877091000+and+project+in+%2810025%29+ORDER+BY+updated+asc&expand=renderedFields%2Ctransitions%2Cchangelog&maxResults=50
State with cursor value of 2024-11-29T10:44:51.887-0800
https://airbyteio.atlassian.net/rest/api/3/search?fields=%2Aall&jql=updated+%3E%3D+1732905891000+and+project+in+%2810025%29+ORDER+BY+updated+asc&expand=renderedFields%2Ctransitions%2Cchangelog&maxResults=50
State with cursor value of 2024-11-29T10:44:51.887+0800
https://airbyteio.atlassian.net/rest/api/3/search?fields=%2Aall&jql=updated+%3E%3D+1732848291000+and+project+in+%2810025%29+ORDER+BY+updated+asc&expand=renderedFields%2Ctransitions%2Cchangelog&maxResults=50
As we can see, the values are all different now as they consider the timezone when performing the requests.
Can this PR be safely reverted and rolled back?