From 347caadb0050163579f8242ae1813eb431093a62 Mon Sep 17 00:00:00 2001 From: pieterlukasse Date: Wed, 15 Nov 2023 18:43:40 +0100 Subject: [PATCH 1/2] fix: add missing items.metadata.labels to fields selection --- src/argowrapper/engine/argo_engine.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/argowrapper/engine/argo_engine.py b/src/argowrapper/engine/argo_engine.py index 6df57b1..6c1366a 100644 --- a/src/argowrapper/engine/argo_engine.py +++ b/src/argowrapper/engine/argo_engine.py @@ -384,7 +384,7 @@ def get_workflows_for_label_selector(self, label_selector: str) -> List[Dict]: namespace=ARGO_NAMESPACE, list_options_label_selector=label_selector, _check_return_type=False, - fields="items.metadata.name,items.metadata.namespace,items.metadata.annotations,items.metadata.uid,items.metadata.creationTimestamp,items.spec.arguments,items.spec.shutdown,items.status.phase,items.status.startedAt,items.status.finishedAt", + fields="items.metadata.name,items.metadata.namespace,items.metadata.annotations,items.metadata.uid,items.metadata.creationTimestamp,items.metadata.labels,items.spec.arguments,items.spec.shutdown,items.status.phase,items.status.startedAt,items.status.finishedAt", ) archived_workflow_list_return = ( self.archive_api_instance.list_archived_workflows( From 7ce1f9a93a37a7903c3fdc7fd702c573576c455d Mon Sep 17 00:00:00 2001 From: pieterlukasse Date: Wed, 15 Nov 2023 18:44:06 +0100 Subject: [PATCH 2/2] fix: add missing call to convert_pod_label_to_gen3teamproject --- src/argowrapper/engine/helpers/argo_engine_helper.py | 2 +- test/test_argo_engine_helper.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/argowrapper/engine/helpers/argo_engine_helper.py b/src/argowrapper/engine/helpers/argo_engine_helper.py index 4711f32..73aee54 100644 --- a/src/argowrapper/engine/helpers/argo_engine_helper.py +++ b/src/argowrapper/engine/helpers/argo_engine_helper.py @@ -94,7 +94,7 @@ def parse_list_item( result["wf_name"] = ( workflow_details["metadata"].get("annotations", {}).get("workflow_name") ) - result[GEN3_TEAM_PROJECT_METADATA_LABEL] = ( + result[GEN3_TEAM_PROJECT_METADATA_LABEL] = convert_pod_label_to_gen3teamproject( workflow_details["metadata"] .get("labels") .get(GEN3_TEAM_PROJECT_METADATA_LABEL) diff --git a/test/test_argo_engine_helper.py b/test/test_argo_engine_helper.py index e659ac0..b3e69b9 100644 --- a/test/test_argo_engine_helper.py +++ b/test/test_argo_engine_helper.py @@ -223,7 +223,9 @@ def test_parse_list_item(): "creationTimestamp": "test_creationtime", "labels": { GEN3_USER_METADATA_LABEL: "dummyuser", - GEN3_TEAM_PROJECT_METADATA_LABEL: "dummyteam", + GEN3_TEAM_PROJECT_METADATA_LABEL: argo_engine_helper.convert_gen3teamproject_to_pod_label( + "dummyteam" + ), }, }, "spec": {"shutdown": "Terminate"},