18
18
"""Operators that interact with Google Cloud Life Sciences service."""
19
19
from __future__ import annotations
20
20
21
+ import warnings
21
22
from typing import TYPE_CHECKING , Sequence
22
23
23
- from airflow .exceptions import AirflowException
24
+ from airflow .exceptions import AirflowException , AirflowProviderDeprecationWarning
24
25
from airflow .providers .google .cloud .hooks .life_sciences import LifeSciencesHook
25
26
from airflow .providers .google .cloud .links .life_sciences import LifeSciencesLink
26
27
from airflow .providers .google .cloud .operators .cloud_base import GoogleCloudBaseOperator
@@ -33,6 +34,11 @@ class LifeSciencesRunPipelineOperator(GoogleCloudBaseOperator):
33
34
"""
34
35
Runs a Life Sciences Pipeline.
35
36
37
+ .. warning::
38
+ This operator is deprecated. Consider using Google Cloud Batch Operators instead.
39
+ The Life Sciences API (beta) will be discontinued on July 8, 2025 in favor
40
+ of Google Cloud Batch.
41
+
36
42
.. seealso::
37
43
For more information on how to use this operator, take a look at the guide:
38
44
:ref:`howto/operator:LifeSciencesRunPipelineOperator`
@@ -81,6 +87,14 @@ def __init__(
81
87
self ._validate_inputs ()
82
88
self .impersonation_chain = impersonation_chain
83
89
90
+ warnings .warn (
91
+ """This operator is deprecated. Consider using Google Cloud Batch Operators instead.
92
+ The Life Sciences API (beta) will be discontinued on July 8, 2025 in favor
93
+ of Google Cloud Batch.""" ,
94
+ AirflowProviderDeprecationWarning ,
95
+ stacklevel = 3 ,
96
+ )
97
+
84
98
def _validate_inputs (self ) -> None :
85
99
if not self .body :
86
100
raise AirflowException ("The required parameter 'body' is missing" )
0 commit comments