From 45b2d2ac89af48e472098a8fb34c8e0388966300 Mon Sep 17 00:00:00 2001 From: jiangpengcheng Date: Mon, 25 Nov 2024 21:32:38 +0800 Subject: [PATCH] Change field processingGuarantee to processingGuarantees for WindowConfig --- .../integration/cases/logging-window-function/verify.sh | 7 +++++++ api/compute/v1alpha1/common.go | 2 +- .../crd-compute.functionmesh.io-functionmeshes.yaml | 2 +- .../templates/crd-compute.functionmesh.io-functions.yaml | 2 +- .../crd/bases/compute.functionmesh.io_functionmeshes.yaml | 2 +- config/crd/bases/compute.functionmesh.io_functions.yaml | 2 +- 6 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.ci/tests/integration/cases/logging-window-function/verify.sh b/.ci/tests/integration/cases/logging-window-function/verify.sh index 8828be91..a302342e 100644 --- a/.ci/tests/integration/cases/logging-window-function/verify.sh +++ b/.ci/tests/integration/cases/logging-window-function/verify.sh @@ -43,6 +43,13 @@ if [ $? -ne 0 ]; then exit 1 fi +# verify the `processingGuarantees` config +kubectl logs window-function-sample | grep processingGuarantees=ATLEAST_ONCE +if [ $? -ne 0 ]; then + kubectl delete -f "${manifests_file}" > /dev/null 2>&1 || true + exit 1 +fi + verify_java_result=$(NAMESPACE=${PULSAR_NAMESPACE} CLUSTER=${PULSAR_RELEASE_NAME} ci::send_test_data "persistent://public/default/window-function-input-topic" "test-message" 3 2>&1) if [ $? -ne 0 ]; then echo "$verify_java_result" diff --git a/api/compute/v1alpha1/common.go b/api/compute/v1alpha1/common.go index 178fdfeb..f679038a 100644 --- a/api/compute/v1alpha1/common.go +++ b/api/compute/v1alpha1/common.go @@ -546,7 +546,7 @@ type WindowConfig struct { MaxLagMs *int64 `json:"maxLagMs,omitempty"` WatermarkEmitIntervalMs *int64 `json:"watermarkEmitIntervalMs,omitempty"` TimestampExtractorClassName *string `json:"timestampExtractorClassName,omitempty"` - ProcessingGuarantee WindowProcessGuarantee `json:"processingGuarantee,omitempty"` + ProcessingGuarantees WindowProcessGuarantee `json:"processingGuarantees,omitempty"` } type VPASpec struct { diff --git a/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-functionmeshes.yaml b/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-functionmeshes.yaml index aad5b9d8..e48ac2a2 100644 --- a/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-functionmeshes.yaml +++ b/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-functionmeshes.yaml @@ -3786,7 +3786,7 @@ spec: maxLagMs: format: int64 type: integer - processingGuarantee: + processingGuarantees: enum: - ATLEAST_ONCE - ATMOST_ONCE diff --git a/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-functions.yaml b/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-functions.yaml index 179f9ebd..5289962a 100644 --- a/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-functions.yaml +++ b/charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-functions.yaml @@ -3805,7 +3805,7 @@ spec: maxLagMs: format: int64 type: integer - processingGuarantee: + processingGuarantees: enum: - ATLEAST_ONCE - ATMOST_ONCE diff --git a/config/crd/bases/compute.functionmesh.io_functionmeshes.yaml b/config/crd/bases/compute.functionmesh.io_functionmeshes.yaml index 890541ce..5deb3eb1 100644 --- a/config/crd/bases/compute.functionmesh.io_functionmeshes.yaml +++ b/config/crd/bases/compute.functionmesh.io_functionmeshes.yaml @@ -3786,7 +3786,7 @@ spec: maxLagMs: format: int64 type: integer - processingGuarantee: + processingGuarantees: enum: - ATLEAST_ONCE - ATMOST_ONCE diff --git a/config/crd/bases/compute.functionmesh.io_functions.yaml b/config/crd/bases/compute.functionmesh.io_functions.yaml index f1546efc..a9e28d8e 100644 --- a/config/crd/bases/compute.functionmesh.io_functions.yaml +++ b/config/crd/bases/compute.functionmesh.io_functions.yaml @@ -3783,7 +3783,7 @@ spec: maxLagMs: format: int64 type: integer - processingGuarantee: + processingGuarantees: enum: - ATLEAST_ONCE - ATMOST_ONCE