-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
Add support for user defined _retryable_error
in databricks provider
#43127
Comments
_retryable_error
in databricks provider
@potiuk , @pankajkoti , requesting your comments on this feature. |
_retryable_error
in databricks provider_retryable_error
in databricks provider
yeah, IMO another option is that we could accept a user supplied list of retryable errors & add those to our _retryable_error validation method. Probably we could also wait to work on this until there is a good demand for this? And users say how they would like it to be exposed as (how much control they would like)? |
I won't start working on this right away. But, if I see any users requesting this, I'll raise a PR |
IMO I think it will be a simpler interface if we pass a list of errors to add instead of a function. In particular since rewriting your own function more or less implies to go check the current implementation to make that you have not forgot any special use case. |
Yes. list of errors look good and we implemented it elsewhere already (i am quite sure I saw it in other operators). Having a method to pass, but if you implement the operator in the way that it has a public "should_retry(response)" method, then you should be able to implement your custom operator deriving from the base one and rewrite only that method - which is the way the operators should be extended with code. |
Description
we can let users pass their own
_retryable_error
method, which will validate if retry is allowed or not.As of now, databricks operators only accept
retry_limit
andretry_delay
. Adding support for custom retry function and after func should be good enough to handle all custom requirements.airflow/providers/src/airflow/providers/databricks/hooks/databricks_base.py
Line 127 in 6b090b3
Use case/motivation
It will allow user to set their own retry logics and also not require change to the provider everytime a user wants to retry for a particular type of exception.
Related issues
#43080
Are you willing to submit a PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: