From 7683182f15e281a87622d6e550bd036a7b43c8c0 Mon Sep 17 00:00:00 2001 From: Tongtong Zhou Date: Fri, 20 Mar 2026 17:17:10 +0800 Subject: [PATCH 1/3] HYPERFLEET-755 - fix: correct Health CEL expression in adapter failure test --- .../adapter-task-config.yaml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/testdata/adapter-configs/cl-precondition-error/adapter-task-config.yaml b/testdata/adapter-configs/cl-precondition-error/adapter-task-config.yaml index a07ba89..54c9e7c 100644 --- a/testdata/adapter-configs/cl-precondition-error/adapter-task-config.yaml +++ b/testdata/adapter-configs/cl-precondition-error/adapter-task-config.yaml @@ -91,13 +91,23 @@ post: - type: "Health" status: expression: | - adapter.?executionStatus.orValue("") == "success" ? "True" : "False" + adapter.?executionStatus.orValue("") == "success" && !adapter.?resourcesSkipped.orValue(false) ? "True" : "False" reason: expression: | - adapter.?errorReason.orValue("") != "" ? adapter.?errorReason.orValue("") : "Healthy" + adapter.?executionStatus.orValue("") != "success" + ? "ExecutionFailed" + : adapter.?errorReason.orValue("") != "" + ? adapter.?errorReason.orValue("") + : adapter.?resourcesSkipped.orValue(false) + ? "ResourcesSkipped" + : "Healthy" message: expression: | - adapter.?errorMessage.orValue("") != "" ? adapter.?errorMessage.orValue("") : "All adapter operations completed successfully" + adapter.?errorMessage.orValue("") != "" + ? adapter.?errorMessage.orValue("") + : adapter.?resourcesSkipped.orValue(false) + ? "Resources skipped: " + adapter.?skipReason.orValue("unknown reason") + : "All adapter operations completed successfully" observed_generation: expression: "1" observed_time: "{{ now | date \"2006-01-02T15:04:05Z07:00\" }}" From 9b437fe92e56aa88da1b90b635319aa9fba0ba59 Mon Sep 17 00:00:00 2001 From: Tongtong Zhou Date: Fri, 20 Mar 2026 18:47:05 +0800 Subject: [PATCH 2/3] correct Health CEL expression --- .../cl-precondition-error/adapter-task-config.yaml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/testdata/adapter-configs/cl-precondition-error/adapter-task-config.yaml b/testdata/adapter-configs/cl-precondition-error/adapter-task-config.yaml index 54c9e7c..92ab211 100644 --- a/testdata/adapter-configs/cl-precondition-error/adapter-task-config.yaml +++ b/testdata/adapter-configs/cl-precondition-error/adapter-task-config.yaml @@ -91,23 +91,21 @@ post: - type: "Health" status: expression: | - adapter.?executionStatus.orValue("") == "success" && !adapter.?resourcesSkipped.orValue(false) ? "True" : "False" + adapter.?executionStatus.orValue("") == "success" + && !(adapter.?resourcesSkipped.orValue(false) && adapter.?errorReason.orValue("") != "") + ? "True" : "False" reason: expression: | adapter.?executionStatus.orValue("") != "success" ? "ExecutionFailed" : adapter.?errorReason.orValue("") != "" ? adapter.?errorReason.orValue("") - : adapter.?resourcesSkipped.orValue(false) - ? "ResourcesSkipped" - : "Healthy" + : "Healthy" message: expression: | adapter.?errorMessage.orValue("") != "" ? adapter.?errorMessage.orValue("") - : adapter.?resourcesSkipped.orValue(false) - ? "Resources skipped: " + adapter.?skipReason.orValue("unknown reason") - : "All adapter operations completed successfully" + : "All adapter operations completed successfully" observed_generation: expression: "1" observed_time: "{{ now | date \"2006-01-02T15:04:05Z07:00\" }}" From 79847ae1f273e7f754dff778c6952f208b525267 Mon Sep 17 00:00:00 2001 From: Tongtong Zhou Date: Fri, 20 Mar 2026 21:23:02 +0800 Subject: [PATCH 3/3] correct Health CEL expression in adapter failure test --- .../cl-precondition-error/adapter-task-config.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/testdata/adapter-configs/cl-precondition-error/adapter-task-config.yaml b/testdata/adapter-configs/cl-precondition-error/adapter-task-config.yaml index 92ab211..daf9e8a 100644 --- a/testdata/adapter-configs/cl-precondition-error/adapter-task-config.yaml +++ b/testdata/adapter-configs/cl-precondition-error/adapter-task-config.yaml @@ -103,9 +103,11 @@ post: : "Healthy" message: expression: | - adapter.?errorMessage.orValue("") != "" - ? adapter.?errorMessage.orValue("") - : "All adapter operations completed successfully" + adapter.?executionStatus.orValue("") != "success" + ? adapter.?errorMessage.orValue("Adapter execution failed") + : adapter.?errorMessage.orValue("") != "" + ? adapter.?errorMessage.orValue("") + : "All adapter operations completed successfully" observed_generation: expression: "1" observed_time: "{{ now | date \"2006-01-02T15:04:05Z07:00\" }}"