diff --git a/backend/components/cognigy/helm/BUILD b/backend/components/cognigy/helm/BUILD index 1f602ed4a8..45805d5f1c 100644 --- a/backend/components/cognigy/helm/BUILD +++ b/backend/components/cognigy/helm/BUILD @@ -1,28 +1,3 @@ -load("@rules_pkg//:pkg.bzl", "pkg_tar") -load("@com_github_airyhq_bazel_tools//helm:helm.bzl", "helm_template_test") -load("//tools/build:helm.bzl", "helm_push") +load("//tools/build:helm.bzl", "helm_ruleset_core_version") -filegroup( - name = "files", - srcs = glob( - ["**/*"], - exclude = ["BUILD"], - ), - visibility = ["//visibility:public"], -) - -pkg_tar( - name = "package", - srcs = [":files"], - extension = "tgz", - strip_prefix = "./", -) - -helm_template_test( - name = "template", - chart = ":package", -) - -helm_push( - chart = ":package", -) +helm_ruleset_core_version() diff --git a/backend/components/rasa/helm/BUILD b/backend/components/rasa/helm/BUILD index 1f602ed4a8..45805d5f1c 100644 --- a/backend/components/rasa/helm/BUILD +++ b/backend/components/rasa/helm/BUILD @@ -1,28 +1,3 @@ -load("@rules_pkg//:pkg.bzl", "pkg_tar") -load("@com_github_airyhq_bazel_tools//helm:helm.bzl", "helm_template_test") -load("//tools/build:helm.bzl", "helm_push") +load("//tools/build:helm.bzl", "helm_ruleset_core_version") -filegroup( - name = "files", - srcs = glob( - ["**/*"], - exclude = ["BUILD"], - ), - visibility = ["//visibility:public"], -) - -pkg_tar( - name = "package", - srcs = [":files"], - extension = "tgz", - strip_prefix = "./", -) - -helm_template_test( - name = "template", - chart = ":package", -) - -helm_push( - chart = ":package", -) +helm_ruleset_core_version() diff --git a/backend/components/whatsapp/connector/src/main/java/co/airy/core/sources/whatsapp/Stores.java b/backend/components/whatsapp/connector/src/main/java/co/airy/core/sources/whatsapp/Stores.java index 439b046a10..cd0a15c0e8 100644 --- a/backend/components/whatsapp/connector/src/main/java/co/airy/core/sources/whatsapp/Stores.java +++ b/backend/components/whatsapp/connector/src/main/java/co/airy/core/sources/whatsapp/Stores.java @@ -75,17 +75,17 @@ public void onApplicationEvent(ApplicationStartedEvent applicationStartedEvent) // Foreign key join on channels so that we have channels information for marking messages read final KTable messagesWithChannel = messageStream.toTable().join(channelsTable, Message::getChannelId, - (message, channel) -> MessageWithChannel.builder().channel(channel).message(message).build()); + (message, channel) -> MessageWithChannel.builder().channel(channel).message(message).build()); // Contact messages table for marking them as read final KTable markMessageReadTable = metadataStream - .filter((id, metadata) -> metadata.getKey().equals(MetadataKeys.MessageKeys.Source.ID)) + .filter((id, metadata) -> metadata != null && metadata.getKey().equals(MetadataKeys.MessageKeys.Source.ID)) .groupBy((id, metadata) -> getSubject(metadata).getIdentifier()) .reduce((v1, v2) -> v2) .join(messagesWithChannel, (metadata, messageWithChannel) -> messageWithChannel.toBuilder().sourceMessageId(metadata.getValue()).build()); - metadataStream.filter((id, metadata) -> metadata.getKey().equals(MetadataKeys.MessageKeys.READ_BY_USER)) + metadataStream.filter((id, metadata) -> metadata != null && metadata.getKey().equals(MetadataKeys.MessageKeys.READ_BY_USER)) .selectKey((id, metadata) -> getSubject(metadata).getIdentifier()) .join(markMessageReadTable, (metadata, messageWithChannel) -> messageWithChannel) .peek((messageId, messageWithChannel) -> connector.markMessageRead(messageWithChannel)); diff --git a/backend/components/whatsapp/connector/src/main/java/resources/application.properties b/backend/components/whatsapp/connector/src/main/resources/application.properties similarity index 100% rename from backend/components/whatsapp/connector/src/main/java/resources/application.properties rename to backend/components/whatsapp/connector/src/main/resources/application.properties diff --git a/backend/components/whatsapp/helm/templates/deployments.yaml b/backend/components/whatsapp/helm/templates/deployments.yaml index a6289c8869..1fcbff4b11 100644 --- a/backend/components/whatsapp/helm/templates/deployments.yaml +++ b/backend/components/whatsapp/helm/templates/deployments.yaml @@ -37,6 +37,17 @@ spec: name: core-config - configMapRef: name: "{{ .Values.name }}" + env: + - name: REQUESTED_CPU + valueFrom: + resourceFieldRef: + containerName: app + resource: requests.cpu + - name: LIMIT_CPU + valueFrom: + resourceFieldRef: + containerName: app + resource: limits.cpu livenessProbe: httpGet: path: /actuator/health