From 25de78b2d94dff969de813eee84731161aca64fc Mon Sep 17 00:00:00 2001 From: Tyler Gu Date: Sun, 12 Nov 2023 19:58:51 -0600 Subject: [PATCH] Fix Signed-off-by: Tyler Gu --- performance_measurement/check_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/performance_measurement/check_utils.py b/performance_measurement/check_utils.py index f73d2f3fb..185c5aff3 100644 --- a/performance_measurement/check_utils.py +++ b/performance_measurement/check_utils.py @@ -92,7 +92,7 @@ def check_tolerations( def check_affinity(desired_affinity: dict, sts_object: k8s_models.V1StatefulSet) -> bool: # check if affinity match current_affinity = sts_object["spec"]["template"]["spec"]["affinity"] - if desired_affinity is None or desired_affinity == {}: + if desired_affinity is None or len(desired_affinity) == 0: return current_affinity is None or current_affinity == {} deepdiff = DeepDiff(desired_affinity, current_affinity, ignore_order=True) if deepdiff: