-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 Facebook Marketing: implement retry logic for async reports #7904
Conversation
|
WIP on adding few unittests for the new class |
@@ -6,7 +6,7 @@ | |||
from setuptools import find_packages, setup | |||
|
|||
MAIN_REQUIREMENTS = [ | |||
"airbyte-cdk~=0.1.33", | |||
"airbyte-cdk~=0.1", |
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.
Why you changed this line?
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.
LGTM
@@ -280,8 +279,6 @@ class AdsInsights(FBMarketingIncrementalStream): | |||
"action_destination", | |||
] | |||
|
|||
MAX_WAIT_TO_START = pendulum.duration(minutes=5) | |||
MAX_WAIT_TO_FINISH = pendulum.duration(minutes=30) | |||
MAX_ASYNC_SLEEP = pendulum.duration(minutes=5) |
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.
Maybe we should increase this number. 5 min to wait for a job feels too low
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.
It would be nice to have some logs for statistics to know exactly how often this happens, but from the logs that I have seen it almost never exceed this time.
Will increase this value though
@@ -497,14 +444,6 @@ def _date_ranges(self, stream_state: Mapping[str, Any]) -> Iterator[dict]: | |||
"time_range": {"since": since.to_date_string(), "until": until.to_date_string()}, | |||
} | |||
|
|||
@backoff_policy |
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.
Not blocking but it seems the new Async class should be responsible for the retry logic instead of communicating to a calling class it should be retried by raising an exception. Not blocking though
/test connector=source-facebook-marketing
|
/publish connector=connectors/source-facebook-marketing
|
…irbytehq#7904) * added AsyncJob with retry logic Co-authored-by: Eugene Kulak <[email protected]>
What
closes #7822
How
Introduce AsyncJob class to spawn and retry AdReport jobs
Recommended reading order
x.java
y.python
Pre-merge Checklist
Expand the relevant checklist and delete the others.
New Connector
Community member or Airbyter
airbyte_secret
./gradlew :airbyte-integrations:connectors:<name>:integrationTest
.README.md
bootstrap.md
. See description and examplesdocs/SUMMARY.md
docs/integrations/<source or destination>/<name>.md
including changelog. See changelog exampledocs/integrations/README.md
airbyte-integrations/builds.md
Airbyter
If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.
/test connector=connectors/<name>
command is passing./publish
command described hereUpdating a connector
Community member or Airbyter
airbyte_secret
./gradlew :airbyte-integrations:connectors:<name>:integrationTest
.README.md
bootstrap.md
. See description and examplesdocs/integrations/<source or destination>/<name>.md
including changelog. See changelog exampleAirbyter
If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.
/test connector=connectors/<name>
command is passing./publish
command described hereConnector Generator
-scaffold
in their name) have been updated with the latest scaffold by running./gradlew :airbyte-integrations:connector-templates:generator:testScaffoldTemplates
then checking in your changes