Skip to content

Commit f8c4f79

Browse files
CameronMcClymonttiborsimko
authored andcommitted
feat(manager): add user-uuid label to runtime batch pods (#665)
Also amend Dask runtime pods to use the same label instead of previously-used one. Closes #664
1 parent c8a6540 commit f8c4f79

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,6 @@ target/
6868

6969
# Visual Studio Code files
7070
.vscode
71+
72+
# PyCharm files
73+
.idea

reana_workflow_controller/dask.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def _prepare_cluster(self):
160160
self.cluster_body["metadata"] = {
161161
"name": self.cluster_name,
162162
"labels": {
163-
"reana-run-dask-owner-uuid": self.user_id,
163+
"user-uuid": self.user_id,
164164
"reana-run-dask-workflow-uuid": self.workflow_id,
165165
},
166166
}
@@ -233,7 +233,7 @@ def _prepare_autoscaler(self):
233233
self.autoscaler_body["metadata"] = {
234234
"name": self.autoscaler_name,
235235
"labels": {
236-
"reana-run-dask-owner-uuid": self.user_id,
236+
"user-uuid": self.user_id,
237237
"reana-run-dask-workflow-uuid": self.workflow_id,
238238
},
239239
}
@@ -706,7 +706,7 @@ def create_dask_dashboard_ingress(workflow_id, user_id):
706706
workflow_id, "dashboard_ingress_middleware"
707707
),
708708
"labels": {
709-
"reana-run-dask-owner-uuid": user_id,
709+
"user-uuid": user_id,
710710
"reana-run-dask-workflow-uuid": workflow_id,
711711
},
712712
"namespace": REANA_RUNTIME_KUBERNETES_NAMESPACE,
@@ -729,7 +729,7 @@ def create_dask_dashboard_ingress(workflow_id, user_id):
729729
"traefik.ingress.kubernetes.io/router.middlewares": f"{REANA_RUNTIME_KUBERNETES_NAMESPACE}-{get_dask_component_name(workflow_id, 'dashboard_ingress_middleware')}@kubernetescrd",
730730
},
731731
labels={
732-
"reana-run-dask-owner-uuid": user_id,
732+
"user-uuid": user_id,
733733
"reana-run-dask-workflow-uuid": workflow_id,
734734
},
735735
),

reana_workflow_controller/k8s.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def _build_deployment(self, metadata):
170170
"app": self.deployment_name,
171171
"reana_workflow_mode": "session",
172172
"reana-run-session-workflow-uuid": str(self.workflow_id),
173-
"reana-run-session-owner-uuid": str(self.owner_id),
173+
"user-uuid": str(self.owner_id),
174174
}
175175
template = client.V1PodTemplateSpec(
176176
metadata=client.V1ObjectMeta(labels=labels),

reana_workflow_controller/workflow_run_manager.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,7 @@ def _create_job_spec(
634634
labels = {
635635
"reana_workflow_mode": "batch",
636636
"reana-run-batch-workflow-uuid": str(self.workflow.id_),
637+
"user-uuid": owner_id,
637638
}
638639

639640
if KUEUE_ENABLED:

0 commit comments

Comments
 (0)