Skip to content

Commit 70628fb

Browse files
UPDATE S3 backlog processing DAG to validate params used to trigger the DAG
1 parent e01a4f7 commit 70628fb

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

terraform/terraform-modules/test-data/dags/template-pds-nucleus-s3-backlog-processor.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,20 @@
2626
##################################################################################
2727

2828
dag = DAG(
29-
dag_id="${pds_nucleus_s3_backlog_processor_dag_id}",
30-
schedule_interval=None,
31-
catchup=False,
32-
start_date=days_ago(1),
33-
default_args={
29+
dag_id="PDS_SBN-pds-nucleus-s3-backlog-processor",
30+
schedule_interval=None,
31+
catchup=False,
32+
start_date=days_ago(1),
33+
default_args={
3434
"retries": 3,
3535
"retry_delay": timedelta(seconds=2),
36-
},
37-
params={
38-
"s3_bucket_name": Param("<S3 bucket name>", type="string"),
39-
"s3_bucket_prefix": Param("<prefix (S3 path to start listing the objects from>", type=["null", "string"]),
40-
"sqs_queue_url": Param("<SQS queue which is used to save files names in the database>", type="string"),
41-
"aws_region": Param("<aws_region>", type="string"),
42-
},
36+
},
37+
params={
38+
"s3_bucket_name": Param(default="<S3 bucket name>", type="string", pattern= "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$", minLength=3, maxLength=63),
39+
"s3_bucket_prefix": Param(default="<prefix (S3 path to start listing the objects from>", type=["null", "string"], pattern="^([^/]+/)*[^/]+/?$"),
40+
"sqs_queue_url": Param(default="<SQS queue which is used to save files names in the database>", type="string", pattern="^https:\\/\\/sqs\\.us-west-2\\.amazonaws\\.com\\/\\d+\\/pds-nucleus.*$"),
41+
"aws_region": Param(default="<aws_region>", type="string", pattern="^(us|eu|ap|ca|sa|af|me)-[a-z]+-\\d{1}$")
42+
},
4343
)
4444

4545
# Print start time

0 commit comments

Comments
 (0)