source-hubspot-native: add auto backfills for delayed streams #2069
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.
Description:
Delayed incremental streams should be wrapped in a
try/except
block to trigger automatic backfills if we encounter aMustBackfillBinding
error.I kept the recent incremental streams wrapped in the existing
try/except
that serves the same purpose since it's possible forMustBackfillBinding
exceptions to be raised if a task is disabled long enough for the cursor to fall far enough behind the recent changes available from HubSpot.Workflow steps:
(How does one use this feature, and how has it changed)
Documentation links affected:
(list any documentation links that you created, or existing ones that you've identified as needing updates, along with a brief description)
Notes for reviewers:
Tested on a local stack. Confirmed that auto backfills are triggered if the recent incremental
engagements
stream falls far enough behind by shifting the cutoff date back ~60 days. I didn't confirm that the same happens for delayed incremental streams since finding the right cutoff shift where the delayed stream raises aMustBackfillBinding
exception but not the recent stream would some sifting through API responses. Since thetry/except
wrapper for both recent & delayed streams are the same, and the wrapper works for the recent stream, I'm fairly confident it'll work for the delayed stream.This change is