This is an automated email from the ASF dual-hosted git repository.
onikolas pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 7b35e457be1 Update EOL AWS Redshift cluster node types (#55741)
7b35e457be1 is described below
commit 7b35e457be19b416589e20bfa9653cd59c29d19b
Author: Ramit Kataria <[email protected]>
AuthorDate: Tue Sep 16 16:32:57 2025 -0700
Update EOL AWS Redshift cluster node types (#55741)
The dc2.large node type and other node types in the dc and ds family
seem to not be supported anymore:
https://repost.aws/questions/QULBkUFiF4S3yFxOECb00zkQ/terraform-redshift-cluster-can-t-create-node-type-with-dc2-large
This replaces their usage in system tests and unit tests as well as
updates docstrings for Redshift's create cluster hook and operator to
refer to the offical docs for the list of supported node types.
---
.../providers/amazon/aws/hooks/redshift_cluster.py | 7 +++----
.../providers/amazon/aws/operators/redshift_cluster.py | 7 +++----
.../amazon/tests/system/amazon/aws/example_s3_to_sql.py | 2 +-
.../amazon/tests/system/amazon/aws/example_sql_to_s3.py | 2 +-
.../unit/amazon/aws/operators/test_redshift_cluster.py | 16 ++++++++--------
5 files changed, 16 insertions(+), 18 deletions(-)
diff --git
a/providers/amazon/src/airflow/providers/amazon/aws/hooks/redshift_cluster.py
b/providers/amazon/src/airflow/providers/amazon/aws/hooks/redshift_cluster.py
index bfc5f3d14a9..314ed871613 100644
---
a/providers/amazon/src/airflow/providers/amazon/aws/hooks/redshift_cluster.py
+++
b/providers/amazon/src/airflow/providers/amazon/aws/hooks/redshift_cluster.py
@@ -57,10 +57,9 @@ class RedshiftHook(AwsBaseHook):
- :external+boto3:py:meth:`Redshift.Client.create_cluster`
:param cluster_identifier: A unique identifier for the cluster.
- :param node_type: The node type to be provisioned for the cluster.
- Valid Values: ``ds2.xlarge``, ``ds2.8xlarge``, ``dc1.large``,
- ``dc1.8xlarge``, ``dc2.large``, ``dc2.8xlarge``, ``ra3.xlplus``,
- ``ra3.4xlarge``, and ``ra3.16xlarge``.
+ :param node_type: The node type to be provisioned for the cluster.
Refer
+
https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html#rs-node-type-info
+ for the list of available node types.
:param master_username: The username associated with the admin user
account
for the cluster that is being created.
:param master_user_password: password associated with the admin user
account
diff --git
a/providers/amazon/src/airflow/providers/amazon/aws/operators/redshift_cluster.py
b/providers/amazon/src/airflow/providers/amazon/aws/operators/redshift_cluster.py
index ec83ffc4b6f..b1f61ec6885 100644
---
a/providers/amazon/src/airflow/providers/amazon/aws/operators/redshift_cluster.py
+++
b/providers/amazon/src/airflow/providers/amazon/aws/operators/redshift_cluster.py
@@ -49,10 +49,9 @@ class
RedshiftCreateClusterOperator(AwsBaseOperator[RedshiftHook]):
:ref:`howto/operator:RedshiftCreateClusterOperator`
:param cluster_identifier: A unique identifier for the cluster.
- :param node_type: The node type to be provisioned for the cluster.
- Valid Values: ``ds2.xlarge``, ``ds2.8xlarge``, ``dc1.large``,
- ``dc1.8xlarge``, ``dc2.large``, ``dc2.8xlarge``, ``ra3.xlplus``,
- ``ra3.4xlarge``, and ``ra3.16xlarge``.
+ :param node_type: The node type to be provisioned for the cluster. Refer
+
https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html#rs-node-type-info
+ for the list of available node types.
:param master_username: The username associated with the admin user
account for
the cluster that is being created.
:param master_user_password: The password associated with the admin user
account for
diff --git a/providers/amazon/tests/system/amazon/aws/example_s3_to_sql.py
b/providers/amazon/tests/system/amazon/aws/example_s3_to_sql.py
index 00b0d52ca02..28be68759fa 100644
--- a/providers/amazon/tests/system/amazon/aws/example_s3_to_sql.py
+++ b/providers/amazon/tests/system/amazon/aws/example_s3_to_sql.py
@@ -117,7 +117,7 @@ with DAG(
vpc_security_group_ids=[security_group_id],
cluster_subnet_group_name=cluster_subnet_group_name,
cluster_type="single-node",
- node_type="dc2.large",
+ node_type="ra3.large",
master_username=DB_LOGIN,
master_user_password=DB_PASS,
)
diff --git a/providers/amazon/tests/system/amazon/aws/example_sql_to_s3.py
b/providers/amazon/tests/system/amazon/aws/example_sql_to_s3.py
index 44b7023878d..d92d645cb99 100644
--- a/providers/amazon/tests/system/amazon/aws/example_sql_to_s3.py
+++ b/providers/amazon/tests/system/amazon/aws/example_sql_to_s3.py
@@ -124,7 +124,7 @@ with DAG(
vpc_security_group_ids=[security_group_id],
cluster_subnet_group_name=cluster_subnet_group_name,
cluster_type="single-node",
- node_type="dc2.large",
+ node_type="ra3.large",
master_username=DB_LOGIN,
master_user_password=DB_PASS,
)
diff --git
a/providers/amazon/tests/unit/amazon/aws/operators/test_redshift_cluster.py
b/providers/amazon/tests/unit/amazon/aws/operators/test_redshift_cluster.py
index a4e6caa0ac3..62408df9e6f 100644
--- a/providers/amazon/tests/unit/amazon/aws/operators/test_redshift_cluster.py
+++ b/providers/amazon/tests/unit/amazon/aws/operators/test_redshift_cluster.py
@@ -47,13 +47,13 @@ class TestRedshiftCreateClusterOperator:
redshift_operator = RedshiftCreateClusterOperator(
task_id="task_test",
cluster_identifier="test_cluster",
- node_type="dc2.large",
+ node_type="ra3.large",
master_username="adminuser",
master_user_password="Test123$",
)
assert redshift_operator.task_id == "task_test"
assert redshift_operator.cluster_identifier == "test_cluster"
- assert redshift_operator.node_type == "dc2.large"
+ assert redshift_operator.node_type == "ra3.large"
assert redshift_operator.master_username == "adminuser"
assert redshift_operator.master_user_password == "Test123$"
@@ -62,7 +62,7 @@ class TestRedshiftCreateClusterOperator:
redshift_operator = RedshiftCreateClusterOperator(
task_id="task_test",
cluster_identifier="test-cluster",
- node_type="dc2.large",
+ node_type="ra3.large",
master_username="adminuser",
master_user_password="Test123$",
cluster_type="single-node",
@@ -80,7 +80,7 @@ class TestRedshiftCreateClusterOperator:
}
mock_conn.create_cluster.assert_called_once_with(
ClusterIdentifier="test-cluster",
- NodeType="dc2.large",
+ NodeType="ra3.large",
MasterUsername="adminuser",
MasterUserPassword="Test123$",
**params,
@@ -96,7 +96,7 @@ class TestRedshiftCreateClusterOperator:
redshift_operator = RedshiftCreateClusterOperator(
task_id="task_test",
cluster_identifier="test-cluster",
- node_type="dc2.large",
+ node_type="ra3.large",
number_of_nodes=3,
master_username="adminuser",
master_user_password="Test123$",
@@ -115,7 +115,7 @@ class TestRedshiftCreateClusterOperator:
}
mock_conn.create_cluster.assert_called_once_with(
ClusterIdentifier="test-cluster",
- NodeType="dc2.large",
+ NodeType="ra3.large",
MasterUsername="adminuser",
MasterUserPassword="Test123$",
**params,
@@ -129,7 +129,7 @@ class TestRedshiftCreateClusterOperator:
redshift_operator = RedshiftCreateClusterOperator(
task_id="task_test",
cluster_identifier="test-cluster",
- node_type="dc2.large",
+ node_type="ra3.large",
master_username="adminuser",
master_user_password="Test123$",
cluster_type="single-node",
@@ -143,7 +143,7 @@ class TestRedshiftCreateClusterOperator:
operator = RedshiftCreateClusterOperator(
task_id="task_test",
cluster_identifier="test-cluster",
- node_type="dc2.large",
+ node_type="ra3.large",
master_username="adminuser",
master_user_password="Test123$",
cluster_type="single-node",