Skip to content

Commit

Permalink
Deprecate GCS sensors (#1444)
Browse files Browse the repository at this point in the history
* feat(providers/google): deprecate GCSObjectExistenceSensorAsync, GCSObjectsWithPrefixExistenceSensorAsync, GCSUploadSessionCompleteSensorAsync, GCSObjectUpdateSensorAsync
  • Loading branch information
Lee-W authored Jan 24, 2024
1 parent 51a1df6 commit 3b136fb
Show file tree
Hide file tree
Showing 5 changed files with 200 additions and 470 deletions.
20 changes: 18 additions & 2 deletions astronomer/providers/google/cloud/hooks/gcs.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""This module contains a Google Cloud Storage hook."""
from typing import cast
import warnings
from typing import Any, cast

from aiohttp import ClientSession as ClientSession
from airflow.providers.google.cloud.hooks.gcs import GCSHook
Expand All @@ -12,7 +13,22 @@


class GCSHookAsync(GoogleBaseHookAsync):
"""GCSHookAsync run on the trigger worker, inherits from GoogleBaseHookAsync"""
"""GCSHookAsync run on the trigger worker, inherits from GoogleBaseHookAsync
This class is deprecated and will be removed in 2.0.0.
Use :class: `~airflow.providers.google.cloud.hooks.gcs.GCSAsyncHook` instead
"""

def __init__(self, **kwargs: Any):
warnings.warn(
(
"This class is deprecated and will be removed in 2.0.0."
"Use `airflow.providers.google.cloud.hooks.gcs.GCSAsyncHook` instead"
),
DeprecationWarning,
stacklevel=2,
)
super().__init__(**kwargs)

sync_hook_class = GCSHook

Expand Down
Loading

0 comments on commit 3b136fb

Please sign in to comment.