Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,15 @@
from typing import TYPE_CHECKING, Any
from urllib.parse import urlparse

from ray.job_submission import JobSubmissionClient
from airflow.exceptions import AirflowOptionalProviderFeatureException

try:
from ray.job_submission import JobSubmissionClient
except ImportError:
raise AirflowOptionalProviderFeatureException(
"Ray is not installed. Please install the 'ray' extra to use this feature."
)


from airflow.providers.google.common.hooks.base_google import GoogleBaseHook

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,15 @@
from typing import TYPE_CHECKING, Any

from google.api_core.exceptions import NotFound
from ray.dashboard.modules.job.common import JobStatus

from airflow.exceptions import AirflowOptionalProviderFeatureException

try:
from ray.dashboard.modules.job.common import JobStatus
except ImportError:
raise AirflowOptionalProviderFeatureException(
"Ray is not installed. Please install the 'ray' extra to use this feature."
)

from airflow.providers.common.compat.sdk import AirflowNotFoundException, AirflowTaskTimeout
from airflow.providers.google.cloud.hooks.ray import RayJobHook
Expand Down