-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Alex/configurable retrier #14330
Merged
Merged
Alex/configurable retrier #14330
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
github-actions
bot
removed
area/platform
issues related to the platform
area/documentation
Improvements or additions to documentation
area/connectors
Connector related issues
kubernetes
labels
Jul 12, 2022
brianjlai
approved these changes
Jul 13, 2022
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.
This is amazing! The most complex addition to the low code CDK yet!
sherifnada
approved these changes
Jul 14, 2022
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 great! nicely done
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
CDK
Connector Development Kit
connectors/destination/s3
connectors/source/file
connectors/source/github
connectors/source/okta
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
How
set
raise_on_http_errors
to false to bypass the default error handlingretrier's
should_retry
method returns aResponseStatus
, which describes whether a request was success, and if it failed, whether it should be fatal, ignored, or retried. if retried, it'll include how long to retrywhen determining if a request must be retried, the default retrier will apply an HttpResponseFilter on the response to determine whether it should be retried or ignored
HttpResponseFilter
s can match responses based off the HTTP code, by looking for a substring in the error message, or by applying an arbitrary boolean interpolationIf a request must be retried, the retrier will call its backoff strategies to get the backoff time. if a backoff strategy returns
None
, then the retrier will ask the next oneThe retrier always default to an exponential backoff strategy if non of its strategy resolved to a backoff time
ChainRetrier
will chain sequentially ask its retriers the status of a response and assume an error is fatal if none of them decides it should be ignored or retriedthe max_retries and factor properties were removed from the retriever and requester as they are not used anymore - declarative streams should always return a
ResponseStatus
with the desired backoff timeexisting backoff strategies include
* extract time to retry from response header
Recommended reading order
airbyte-cdk/python/airbyte_cdk/sources/declarative/requesters/retriers/retrier.py
airbyte-cdk/python/airbyte_cdk/sources/declarative/requesters/retriers/http_response_filter.py
airbyte-cdk/python/airbyte_cdk/sources/declarative/requesters/retriers/default_retrier.py
airbyte-cdk/python/airbyte_cdk/sources/declarative/requesters/retriers/backoff_strategy.py
airbyte-cdk/python/airbyte_cdk/sources/declarative/requesters/retriers/backoff_strategies/constant_backoff_strategy.py
airbyte-cdk/python/airbyte_cdk/sources/declarative/requesters/retriers/backoff_strategies/exponential_backoff_strategy.py
airbyte-cdk/python/airbyte_cdk/sources/declarative/requesters/retriers/backoff_strategies/wait_time_from_header_backoff_strategy.py
airbyte-cdk/python/airbyte_cdk/sources/declarative/requesters/retriers/backoff_strategies/wait_until_time_from_header_backoff_strategy.py
airbyte-cdk/python/airbyte_cdk/sources/declarative/requesters/retriers/chain_retrier.py
airbyte-cdk/python/airbyte_cdk/sources/declarative/requesters/requester.py
airbyte-cdk/python/airbyte_cdk/sources/declarative/requesters/http_requester.py
airbyte-cdk/python/airbyte_cdk/sources/declarative/parsers/yaml_parser.py
airbyte-cdk/python/airbyte_cdk/sources/declarative/parsers/factory.py
🚨 User Impact 🚨
Are there any breaking changes? What is the end result perceived by the user? If yes, please merge this PR with the 🚨🚨 emoji so changelog authors can further highlight this if needed.
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/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 changesTests
Unit
Put your unit tests output here.
Integration
Put your integration tests output here.
Acceptance
Put your acceptance tests output here.