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 DatabricksSubmitRunOperatorAsync and DatabricksRunNowOperatorAsync #1460

Merged
merged 2 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 10 additions & 13 deletions astronomer/providers/databricks/hooks/databricks.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import asyncio
import base64
import warnings
from typing import Any, Dict, cast

import aiohttp
Expand All @@ -21,21 +22,17 @@

class DatabricksHookAsync(DatabricksHook):
"""
Interact with Databricks.

:param databricks_conn_id: Reference to the Databricks connection.
:type databricks_conn_id: str
:param timeout_seconds: The amount of time in seconds the requests library
will wait before timing-out.
:type timeout_seconds: int
:param retry_limit: The number of times to retry the connection in case of
service outages.
:type retry_limit: int
:param retry_delay: The number of seconds to wait between retries (it
might be a floating point number).
:type retry_delay: float
This class is deprecated and will be removed in 2.0.0.
Use :class: `~airflow.providers.databricks.hooks.databricks.DatabricksHook` instead.
"""

def __init__(self, *args: Any, **kwargs: Any):
warnings.warn(
"This class is deprecated and will be removed in 2.0.0. "
"Use `airflow.providers.databricks.hooks.databricks.DatabricksHook` instead "
)
super().__init__(*args, **kwargs)

async def get_run_state_async(self, run_id: str) -> RunState:
"""
Retrieves run state of the run using an asynchronous api call.
Expand Down
Loading
Loading