🐛 Source Braintre:: Adds timezone to timestamp in braintree connector #43953
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.yamlUser 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?