From 9f7625fdfed971ce4b4aa5aa3b1c60386a5d5867 Mon Sep 17 00:00:00 2001 From: Krzysztof Findeisen Date: Tue, 19 Nov 2024 11:46:04 -0800 Subject: [PATCH 1/2] Fix style in Next Visit Fan Out template. --- applications/next-visit-fan-out/templates/deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applications/next-visit-fan-out/templates/deployment.yaml b/applications/next-visit-fan-out/templates/deployment.yaml index 2ec0ec5307..39416d74e2 100644 --- a/applications/next-visit-fan-out/templates/deployment.yaml +++ b/applications/next-visit-fan-out/templates/deployment.yaml @@ -52,7 +52,7 @@ spec: key: kafka_pp_sasl_password name: {{ template "next-visit-fan-out.fullname" . }}-secret - name: DEBUG_LOGS - value: {{ ternary "true" "false" .Values.debug | quote}} + value: {{ ternary "true" "false" .Values.debug | quote }} - name: SUPPORTED_INSTRUMENTS value: {{ .Values.instruments }} - name: INSTRUMENT_CONFIG_FILE From 1c2cbc717f38c4caab42668970713c56351dd27b Mon Sep 17 00:00:00 2001 From: Krzysztof Findeisen Date: Tue, 19 Nov 2024 11:48:40 -0800 Subject: [PATCH 2/2] Add retry option to Next Visit Fan Out. The flag (on by default) controls whether Fan Out retries certain requests (currently HTTP 503), or treats them as failed. --- applications/next-visit-fan-out/README.md | 1 + applications/next-visit-fan-out/templates/deployment.yaml | 2 ++ .../next-visit-fan-out/values-usdfdev-prompt-processing.yaml | 1 + applications/next-visit-fan-out/values.yaml | 2 ++ 4 files changed, 6 insertions(+) diff --git a/applications/next-visit-fan-out/README.md b/applications/next-visit-fan-out/README.md index c9d89654df..5f48aa4d07 100644 --- a/applications/next-visit-fan-out/README.md +++ b/applications/next-visit-fan-out/README.md @@ -22,6 +22,7 @@ Poll next visit events from Kafka, duplicate them, and send them to all applicat | kafka.saslMechamism | string | `"SCRAM-SHA-512"` | | | kafka.securityProtocol | string | `"SASL_PLAINTEXT"` | | | knative.maxMessages | string | None, must be set. | The maximum number of messages that can be forwarded to all Knative instances combined. | +| knative.retryRequests | bool | `true` | Whether or not to retry requests that returned a suitable response. | | knative.urls | object | See `values.yaml`. | A mapping of instrument to that instrument's Knative service. | | nameOverride | string | `""` | | | nodeSelector | object | `{}` | Node selection rules for the next-visit-fan-out deployment pod | diff --git a/applications/next-visit-fan-out/templates/deployment.yaml b/applications/next-visit-fan-out/templates/deployment.yaml index 39416d74e2..499ffd23b5 100644 --- a/applications/next-visit-fan-out/templates/deployment.yaml +++ b/applications/next-visit-fan-out/templates/deployment.yaml @@ -41,6 +41,8 @@ spec: value: {{ .Values.kafka.securityProtocol }} - name: MAX_FAN_OUT_MESSAGES value: {{ .Values.knative.maxMessages | toString | quote }} + - name: RETRY_KNATIVE_REQUESTS + value: {{ ternary "true" "false" .Values.knative.retryRequests | quote }} - name: SASL_USERNAME valueFrom: secretKeyRef: diff --git a/applications/next-visit-fan-out/values-usdfdev-prompt-processing.yaml b/applications/next-visit-fan-out/values-usdfdev-prompt-processing.yaml index e2ac0f59a6..ca025d6fc4 100644 --- a/applications/next-visit-fan-out/values-usdfdev-prompt-processing.yaml +++ b/applications/next-visit-fan-out/values-usdfdev-prompt-processing.yaml @@ -1,5 +1,6 @@ knative: maxMessages: 150 + retryRequests: false kafka: schemaRegistryUrl: http://10.96.181.159:8081 diff --git a/applications/next-visit-fan-out/values.yaml b/applications/next-visit-fan-out/values.yaml index 750b483c14..dc95396e8c 100644 --- a/applications/next-visit-fan-out/values.yaml +++ b/applications/next-visit-fan-out/values.yaml @@ -10,6 +10,8 @@ knative: # -- The maximum number of messages that can be forwarded to all Knative instances combined. # @default -- None, must be set. maxMessages: "" + # -- Whether or not to retry requests that returned a suitable response. + retryRequests: true kafka: offset: latest