Skip to content
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

Deprecate Databricks Deferrable Operator #30761

Merged
merged 1 commit into from
Apr 22, 2023

Conversation

pankajastro
Copy link
Member

This PR aims to deprecate DatabricksSubmitRunDeferrableOperator and
DatabricksRunNowDeferrableOperator and add a param deferrable in
DatabricksSubmitRunOperator and DatabricksRunNowOperator.
The default value of the deferrable param is false.

Since at most of the places for the async operator, we have deferrable param.
so this will make the Databricks provider more consistent with other providers.
In future, we can remove the deprecated one so we will have fewer operators which is good.
This will also give a more logical easy way to navigate and figure out
if the operator supports the deferrable mode or not and
I can set deferrable=True/False dynamically for all operator in my dag
if deferrable attr exist in the operator


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.


class DatabricksSubmitRunDeferrableOperator(DatabricksSubmitRunOperator):
"""Deferrable version of ``DatabricksSubmitRunOperator``"""

def __init__(self, *args, **kwargs):
warnings.warn(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is just a kind of warning, but please let me know I should remove execute and execute_complete from DatabricksRunNowDeferrableOperator

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's OK for now.

@pankajastro pankajastro force-pushed the deprecate_databricks_async_op branch from bf991ea to 978f0ba Compare April 20, 2023 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants