Skip to content

Commit

Permalink
dws: fix datamovement limit call
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jameshcorbett committed Sep 28, 2024
1 parent 1f3d498 commit 4f369fc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/modules/coral2_dws.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 4f369fc

Please sign in to comment.