ferruzzi commented on code in PR #27276:
URL: https://github.com/apache/airflow/pull/27276#discussion_r1014326277
##########
airflow/providers/amazon/aws/hooks/redshift_cluster.py:
##########
@@ -157,16 +158,24 @@ def create_cluster_snapshot(
)
return response["Snapshot"] if response["Snapshot"] else None
- def get_cluster_snapshot_status(self, snapshot_identifier: str,
cluster_identifier: str):
+ def get_cluster_snapshot_status(self, snapshot_identifier: str,
cluster_identifier: str | None = None):
"""
Return Redshift cluster snapshot status. If cluster snapshot not found
return ``None``
:param snapshot_identifier: A unique identifier for the snapshot that
you are requesting
- :param cluster_identifier: The unique identifier of the cluster the
snapshot was created from
+ :param cluster_identifier: (deprecated) The unique identifier of the
cluster
+ the snapshot was created from
Review Comment:
In that case, maybe leave the parameter in and add a block at the beginning
of the method along the lines of
```
if not(cluster_identifier ^ snapshot_identifier):
raise SomeException("cluster_identifier or snapshot_identifier must be
included, but not both")
```
The ^ is an XOR operator, which returns true if one and only one of those
exists.

--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]