Skip to content

Commit 48df44c

Browse files
authored
Merge pull request #4123 from bcgov/fix/taskid-case
fix: use correct kebab-case for task_ids in dags
2 parents afac4cc + 819bfdd commit 48df44c

2 files changed

Lines changed: 13 additions & 13 deletions

File tree

dags/bc_obps_reset_data.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def reset_data_task():
4141
trigger_k8s_cronjob("reset-database", BCIERS_NAMESPACE)
4242

4343
cycle_backend_pod_task = KubernetesJobOperator(
44-
task_id="cycle_backend_pod",
44+
task_id="cycle-backend-pod",
4545
name="cycle-backend-pod",
4646
namespace=BCIERS_NAMESPACE,
4747
service_account_name=SERVICE_ACCOUNT_NAME,
@@ -53,7 +53,7 @@ def reset_data_task():
5353

5454
# Triggers a check to see if the backend rollout has completed, but does not block the helm release use of the DAG
5555
trigger_wait_for_backend_rollout = TriggerDagRunOperator(
56-
task_id="trigger_wait_for_backend_rollout",
56+
task_id="trigger-wait-for-backend-rollout",
5757
trigger_dag_id=WAIT_FOR_BACKEND_ROLLOUT_DAG_NAME,
5858
)
5959

@@ -74,7 +74,7 @@ def reset_data_task():
7474
)
7575
def wait_for_backend_rollout():
7676
wait_for_backend_rollout_task = KubernetesJobOperator(
77-
task_id="wait_for_backend_rollout",
77+
task_id="wait-for-backend-rollout",
7878
name="wait-for-backend-rollout",
7979
namespace=BCIERS_NAMESPACE,
8080
service_account_name=SERVICE_ACCOUNT_NAME,

dags/bc_obps_test_migrations.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def trigger_k8s_cronjob_with_params(job_name_template, **context):
6363
trigger_k8s_cronjob(job_name, namespace)
6464

6565
postgres_helm_install = KubernetesJobOperator(
66-
task_id="install_cas_obps_postgres_migration_test_chart",
66+
task_id="install-cas-obps-postgres-migration-test-chart",
6767
name="install-cas-obps-postgres-migration-test-chart",
6868
namespace="{{ params.destination_namespace }}",
6969
service_account_name=SERVICE_ACCOUNT_NAME,
@@ -84,21 +84,21 @@ def trigger_k8s_cronjob_with_params(job_name_template, **context):
8484
)
8585

8686
time_delay_postgres = TimeDeltaSensor(
87-
task_id="wait_time_before_postgres_initial_ready_check",
87+
task_id="wait-time-before-postgres-initial-ready-check",
8888
delta=timedelta(minutes=8),
8989
doc_md="""Waits for 8 minutes before checking if the postgres pod is ready.""",
9090
)
9191

92-
wait_for_postgres_restore = trigger_k8s_cronjob_with_params.override(task_id="wait_for_postgres_restore")(
92+
wait_for_postgres_restore = trigger_k8s_cronjob_with_params.override(task_id="wait-for-postgres-restore")(
9393
"pg-migration-test-wait-for-postgres-restore-job"
9494
)
9595

96-
postgres_migration_test = trigger_k8s_cronjob_with_params.override(task_id="postgres_migration_test")(
96+
postgres_migration_test = trigger_k8s_cronjob_with_params.override(task_id="postgres-migration-test")(
9797
"pg-migration-test-job"
9898
)
9999

100100
backend_helm_install = KubernetesJobOperator(
101-
task_id="install_cas_obps_backend_migration_test_chart",
101+
task_id="install-cas-obps-backend-migration-test-chart",
102102
name="install-cas-obps-backend-migration-test-chart",
103103
namespace="{{ params.destination_namespace }}",
104104
service_account_name=SERVICE_ACCOUNT_NAME,
@@ -120,21 +120,21 @@ def trigger_k8s_cronjob_with_params(job_name_template, **context):
120120
)
121121

122122
time_delay_backend = TimeDeltaSensor(
123-
task_id="wait_time_before_backend_initial_ready_check",
123+
task_id="wait-time-before-backend-initial-ready-check",
124124
delta=timedelta(seconds=150),
125125
doc_md="""Waits for 150 seconds (based on the initial ready check time set in the backend) before checking if the backend pod is ready.""",
126126
)
127127

128-
wait_for_backend = trigger_k8s_cronjob_with_params.override(task_id="wait_for_backend")(
128+
wait_for_backend = trigger_k8s_cronjob_with_params.override(task_id="wait-for-backend")(
129129
"be-migration-test-wait-for-backend-job"
130130
)
131131

132-
backend_migration_test = trigger_k8s_cronjob_with_params.override(task_id="backend_migration_test")(
132+
backend_migration_test = trigger_k8s_cronjob_with_params.override(task_id="backend-migration-test")(
133133
"be-migration-test-job"
134134
)
135135

136136
uninstall_postgres_helm_charts = KubernetesJobOperator(
137-
task_id="uninstall_postgres_helm_charts",
137+
task_id="uninstall-postgres-helm-charts",
138138
name="uninstall-postgres-helm-charts",
139139
namespace="{{ params.destination_namespace }}",
140140
service_account_name=SERVICE_ACCOUNT_NAME,
@@ -149,7 +149,7 @@ def trigger_k8s_cronjob_with_params(job_name_template, **context):
149149
)
150150

151151
uninstall_backend_helm_charts = KubernetesJobOperator(
152-
task_id="uninstall_backend_helm_charts",
152+
task_id="uninstall-backend-helm-charts",
153153
name="uninstall-backend-helm-charts",
154154
namespace="{{ params.destination_namespace }}",
155155
service_account_name=SERVICE_ACCOUNT_NAME,

0 commit comments

Comments
 (0)