From eb45d9490bc2676b4fbd59e4682d15230ddbf2e7 Mon Sep 17 00:00:00 2001 From: James Corbett Date: Sat, 28 Sep 2024 08:35:28 -0700 Subject: [PATCH] dws: fix datamovement limit call Problem: on Tuolumne kubernetes was complaining that it could not interpret `None` as an int in a call to fetch datamovements. Do not pass `None` as an argument. --- src/modules/coral2_dws.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/coral2_dws.py b/src/modules/coral2_dws.py index 330aea8..2ae83f6 100755 --- a/src/modules/coral2_dws.py +++ b/src/modules/coral2_dws.py @@ -194,21 +194,21 @@ def get_datamovements(k8s_api, workflow_name, count): Return 'count' datamovements. """ if LOGGER.isEnabledFor(logging.INFO): - limit = None + limit_arg = {} else: if count <= 0: return [] - limit = count + limit_arg = {"limit": count} try: api_response = k8s_api.list_cluster_custom_object( group="nnf.cray.hpe.com", version="v1alpha2", plural="nnfdatamovements", - limit=limit, label_selector=( f"dataworkflowservices.github.io/workflow.name={workflow_name}," "dataworkflowservices.github.io/workflow.namespace=default" ), + **limit_arg, ) except Exception as exc: LOGGER.warning(