From 32ae10e673d1db243744fadd4d902645fdddfe89 Mon Sep 17 00:00:00 2001 From: Juan Pardo Date: Wed, 1 Apr 2026 09:34:44 +0200 Subject: [PATCH] Fixed the ingestion type parameter for DynamoDB data jobs --- croud/__main__.py | 12 ++++++------ croud/clusters/commands.py | 2 +- tests/commands/test_clusters.py | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/croud/__main__.py b/croud/__main__.py index d7e38057..15920a8e 100644 --- a/croud/__main__.py +++ b/croud/__main__.py @@ -908,16 +908,16 @@ Argument( "--ingestion-type", type=str, choices=[ - "IMPORT_ONLY", - "IMPORT_AND_CDC", - "CDC_ONLY" + "import-only", + "import-and-cdc", + "cdc-only" ], required=True, help="Determines how to ingest the data. " - "IMPORT_ONLY will just ingest the data " - "and finish. CDC_ONLY will continuously " + "import-only will just ingest the data " + "and finish. cdc-only will continuously " "read CDC (Change Data Capture) events. " - "IMPORT_AND_CDC will first import the " + "import-and-cdc will first import the " "data and then start listening for CDC " "events." ), diff --git a/croud/clusters/commands.py b/croud/clusters/commands.py index b1d0102a..7cb42fff 100644 --- a/croud/clusters/commands.py +++ b/croud/clusters/commands.py @@ -219,7 +219,7 @@ def import_jobs_create_from_dynamodb(args: Namespace) -> None: extra_body["dynamodb"]["endpoint"] = args.endpoint if args.ingestion_type: extra_body["ingestion_type"] = args.ingestion_type - if "CDC" in extra_body.get("ingestion_type", ""): + if "cdc" in extra_body.get("ingestion_type", ""): if args.kinesis_stream_name: extra_body["dynamodb"]["kinesis_stream_name"] = args.kinesis_stream_name else: diff --git a/tests/commands/test_clusters.py b/tests/commands/test_clusters.py index 8b04ca19..b30682c1 100644 --- a/tests/commands/test_clusters.py +++ b/tests/commands/test_clusters.py @@ -1682,7 +1682,7 @@ def test_import_job_create_from_dynamodb(mock_request): kinesis_stream_name = "my_kinesis_stream_name" secret_id = gen_uuid() endpoint = "https://my-dynamodb-compatible-endpoint" - ingestion_type = "IMPORT_AND_CDC" + ingestion_type = "import-and-cdc" call_command( "croud", "clusters",