Skip to content

Commit

Permalink
feat(amazon): add deprecation warning to redshift_cluster triggerers …
Browse files Browse the repository at this point in the history
…and hooks
  • Loading branch information
Lee-W committed Jan 11, 2024
1 parent f4dcc16 commit ff10f78
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
5 changes: 5 additions & 0 deletions astronomer/providers/amazon/aws/hooks/redshift_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ class RedshiftHookAsync(AwsBaseHookAsync):
"""Interact with AWS Redshift using aiobotocore python library"""

def __init__(self, *args: Any, **kwargs: Any) -> None:
warnings.warn(
"This module is deprecated and will be removed in 2.0.0.",
DeprecationWarning,
stacklevel=2,
)
kwargs["client_type"] = "redshift"
kwargs["resource_type"] = "redshift"
super().__init__(*args, **kwargs)
Expand Down
11 changes: 11 additions & 0 deletions astronomer/providers/amazon/aws/triggers/redshift_cluster.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import warnings
import asyncio
from typing import Any, AsyncIterator, Dict, Optional, Tuple

Expand Down Expand Up @@ -30,6 +31,11 @@ def __init__(
skip_final_cluster_snapshot: bool = True,
final_cluster_snapshot_identifier: Optional[str] = None,
):
warnings.warn(
"This module is deprecated and will be removed in 2.0.0.",
DeprecationWarning,
stacklevel=2,
)
super().__init__()
self.task_id = task_id
self.polling_period_seconds = polling_period_seconds
Expand Down Expand Up @@ -118,6 +124,11 @@ def __init__(
target_status: str,
poke_interval: float,
):
warnings.warn(
"This module is deprecated and will be removed in 2.0.0.",
DeprecationWarning,
stacklevel=2,
)
super().__init__()
self.task_id = task_id
self.aws_conn_id = aws_conn_id
Expand Down

0 comments on commit ff10f78

Please sign in to comment.