Skip to content

Commit 5ae23c1

Browse files
CameronMcClymonttiborsimko
authored andcommitted
refactor(reana-admin): harmonise user-uuid runtime pod label (#754)
Closes reanahub/reana-workflow-controller#664
1 parent bd3d24a commit 5ae23c1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

reana_server/reana_admin/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1074,7 +1074,7 @@ def interactive_session_cleanup(
10741074
try:
10751075
pod_name = pod.metadata.name
10761076
workflow_id = pod.metadata.labels["reana-run-session-workflow-uuid"]
1077-
user_id = pod.metadata.labels["reana-run-session-owner-uuid"]
1077+
user_id = pod.metadata.labels["user-uuid"]
10781078
container_args = pod.spec.containers[0].args
10791079
# find `--NotebookApp.token` session container argument and parse the user token value from it
10801080
token = next(filter(lambda a: "token" in a, container_args)).split("'")[1]

tests/test_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ def test_interactive_session_cleanup(
570570
"app": mock_session_pod.metadata.name,
571571
"reana_workflow_mode": "session",
572572
"reana-run-session-workflow-uuid": str(sample_serial_workflow_in_db.id_),
573-
"reana-run-session-owner-uuid": str(sample_serial_workflow_in_db.owner_id),
573+
"user-uuid": str(sample_serial_workflow_in_db.owner_id),
574574
}
575575
mock_pod_list = Mock()
576576
mock_pod_list.items = [mock_session_pod]

0 commit comments

Comments
 (0)