From 97cafac46c4b576f43cc896956e0b4360e1f4848 Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Fri, 19 Aug 2022 15:21:53 +0100 Subject: [PATCH] Add support for NODE_DEBUG to app-service in kubernetes --- charts/budibase/templates/app-service-deployment.yaml | 4 ++++ charts/budibase/values.yaml | 1 + packages/server/src/automations/utils.ts | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/charts/budibase/templates/app-service-deployment.yaml b/charts/budibase/templates/app-service-deployment.yaml index fd46e77647..0f8e2a08ce 100644 --- a/charts/budibase/templates/app-service-deployment.yaml +++ b/charts/budibase/templates/app-service-deployment.yaml @@ -130,6 +130,10 @@ spec: - name: BB_ADMIN_USER_PASSWORD value: { { .Values.globals.bbAdminUserPassword | quote } } {{ end }} + {{ if .Values.services.apps.nodeDebug }} + - name: NODE_DEBUG + value: {{ .Values.services.apps.nodeDebug | quote }} + {{ end }} image: budibase/apps:{{ .Values.globals.appVersion }} imagePullPolicy: Always diff --git a/charts/budibase/values.yaml b/charts/budibase/values.yaml index 404e92c70f..26f8cd24ed 100644 --- a/charts/budibase/values.yaml +++ b/charts/budibase/values.yaml @@ -126,6 +126,7 @@ services: port: 4002 replicaCount: 1 logLevel: info +# nodeDebug: "" # set the value of NODE_DEBUG worker: port: 4003 diff --git a/packages/server/src/automations/utils.ts b/packages/server/src/automations/utils.ts index 1799b4d74d..6e392d23de 100644 --- a/packages/server/src/automations/utils.ts +++ b/packages/server/src/automations/utils.ts @@ -24,7 +24,7 @@ const Runner = new Thread(ThreadType.AUTOMATION) export async function processEvent(job: any) { try { console.log( - `${job.data.automation.appId} automation ${job.data.automation._id} running` + `${job.data.automation.appId} automation ${job.data.automation._id} running. jobId=${job.id}` ) // need to actually await these so that an error can be captured properly const tenantId = tenancy.getTenantIDFromAppID(job.data.event.appId)