-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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 Braintre:: Adds timezone to timestamp in braintree connector #43953
Merged
natikgadzhi
merged 3 commits into
airbytehq:master
from
AGPapa:source-braintree/agpapa/timestamp-fix
Aug 20, 2024
Merged
🐛 Source Braintre:: Adds timezone to timestamp in braintree connector #43953
natikgadzhi
merged 3 commits into
airbytehq:master
from
AGPapa:source-braintree/agpapa/timestamp-fix
Aug 20, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
natikgadzhi
reviewed
Aug 14, 2024
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.
Looks good! State format is the same, change is in sending over to API, so it's backwards-compatible.
natikgadzhi
approved these changes
Aug 14, 2024
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
community
connectors/source/braintree
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
The incremental sync for the braintree connector misses newly created records, which I believe is a timezone issue. I think that airbyte is sending the "stream interval start time" as a UTC timestamp but Braintree inteprets it in the local timezone for your account. Testing with the braintree API shows this behavior. If I send a timestamp to the Braintree API without a timezone it interprets it in Eastern time, but if I add +00 it will interpret that as a UTC timestamp.
This means that the incremental sync misses records when in a timezone behind UTC (like North America). There wouldn't be missing data for timezones in Europe that are ahead of UTC, since they would pick up more records than they should and de-dup them.
How
To fix this I formatted the timestamp to include the timezone. After this change the Braintree API interprets it correctly.
Review guide
airbyte-integrations/connectors/source-braintree/source_braintree/manifest.yaml
User Impact
Users in timezones behind UTC will no longer drop records during incremental syncs. Users in timezones ahead of UTC should see no changes.
Can this PR be safely reverted and rolled back?