From 51b19633f4daf3742ad4c76e43162dd2f7bbdfd5 Mon Sep 17 00:00:00 2001 From: Dean Date: Wed, 7 Feb 2024 10:03:37 +0000 Subject: [PATCH 1/5] Ensure insert config items are defaulted to avoid destructring issue --- .../builder/src/components/common/CodeEditor/index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/components/common/CodeEditor/index.js b/packages/builder/src/components/common/CodeEditor/index.js index 38d377b47a..0d71a475f0 100644 --- a/packages/builder/src/components/common/CodeEditor/index.js +++ b/packages/builder/src/components/common/CodeEditor/index.js @@ -286,7 +286,13 @@ export const hbInsert = (value, from, to, text) => { return parsedInsert } -export function jsInsert(value, from, to, text, { helper, disableWrapping }) { +export function jsInsert( + value, + from, + to, + text, + { helper, disableWrapping } = {} +) { let parsedInsert = "" const left = from ? value.substring(0, from) : "" From 7dc2c3551f5eb6246a61abe9257f562b4588ba8b Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Wed, 7 Feb 2024 17:03:44 +0000 Subject: [PATCH 2/5] Updating the listObjects functionality to correctly handle truncated responses, when not all objects can be returned at once we need to loop, but we weren't correctly picking up the token that should be passed. --- .../backend-core/src/objectStore/objectStore.ts | 3 ++- packages/backend-core/src/queue/queue.ts | 13 ++++++++++--- packages/pro | 2 +- yarn.lock | 5 +++++ 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/packages/backend-core/src/objectStore/objectStore.ts b/packages/backend-core/src/objectStore/objectStore.ts index 3a3b9cdaab..8d18fb97fd 100644 --- a/packages/backend-core/src/objectStore/objectStore.ts +++ b/packages/backend-core/src/objectStore/objectStore.ts @@ -255,7 +255,8 @@ export async function listAllObjects(bucketName: string, path: string) { objects = objects.concat(response.Contents) } isTruncated = !!response.IsTruncated - } while (isTruncated) + token = response.NextContinuationToken + } while (isTruncated && token) return objects } diff --git a/packages/backend-core/src/queue/queue.ts b/packages/backend-core/src/queue/queue.ts index b95dace5b2..0bcb25a35f 100644 --- a/packages/backend-core/src/queue/queue.ts +++ b/packages/backend-core/src/queue/queue.ts @@ -2,7 +2,7 @@ import env from "../environment" import { getRedisOptions } from "../redis/utils" import { JobQueue } from "./constants" import InMemoryQueue from "./inMemoryQueue" -import BullQueue, { QueueOptions } from "bull" +import BullQueue, { QueueOptions, JobOptions } from "bull" import { addListeners, StalledFn } from "./listeners" import { Duration } from "../utils" import * as timers from "../timers" @@ -24,17 +24,24 @@ async function cleanup() { export function createQueue( jobQueue: JobQueue, - opts: { removeStalledCb?: StalledFn } = {} + opts: { + removeStalledCb?: StalledFn + maxStalledCount?: number + jobOptions?: JobOptions + } = {} ): BullQueue.Queue { const redisOpts = getRedisOptions() const queueConfig: QueueOptions = { redis: redisOpts, settings: { - maxStalledCount: 0, + maxStalledCount: opts.maxStalledCount ? opts.maxStalledCount : 0, lockDuration: QUEUE_LOCK_MS, lockRenewTime: QUEUE_LOCK_RENEW_INTERNAL_MS, }, } + if (opts.jobOptions) { + queueConfig.defaultJobOptions = opts.jobOptions + } let queue: any if (!env.isTest()) { queue = new BullQueue(jobQueue, queueConfig) diff --git a/packages/pro b/packages/pro index aaf7101cd1..93cd6cc2bd 160000 --- a/packages/pro +++ b/packages/pro @@ -1 +1 @@ -Subproject commit aaf7101cd1493215155cc8f83124c70d53eb1be4 +Subproject commit 93cd6cc2bd16afff16a9d7cf7c89d614b1c0b5ae diff --git a/yarn.lock b/yarn.lock index 2c12097fb5..fb231e2824 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15867,6 +15867,11 @@ nodemailer@6.7.2: resolved "https://registry.yarnpkg.com/nodemailer/-/nodemailer-6.7.2.tgz#44b2ad5f7ed71b7067f7a21c4fedabaec62b85e0" integrity sha512-Dz7zVwlef4k5R71fdmxwR8Q39fiboGbu3xgswkzGwczUfjp873rVxt1O46+Fh0j1ORnAC6L9+heI8uUpO6DT7Q== +nodemailer@6.9.9: + version "6.9.9" + resolved "https://registry.yarnpkg.com/nodemailer/-/nodemailer-6.9.9.tgz#4549bfbf710cc6addec5064dd0f19874d24248d9" + integrity sha512-dexTll8zqQoVJEZPwQAKzxxtFn0qTnjdQTchoU6Re9BUUGBJiOy3YMn/0ShTW6J5M0dfQ1NeDeRTTl4oIWgQMA== + nodemon@2.0.15: version "2.0.15" resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-2.0.15.tgz#504516ce3b43d9dc9a955ccd9ec57550a31a8d4e" From 943ad85d5b20db1631056ae469336509c3b7d1f6 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Wed, 7 Feb 2024 17:29:35 +0000 Subject: [PATCH 3/5] Update pro. --- packages/pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pro b/packages/pro index 93cd6cc2bd..9dc28c2efd 160000 --- a/packages/pro +++ b/packages/pro @@ -1 +1 @@ -Subproject commit 93cd6cc2bd16afff16a9d7cf7c89d614b1c0b5ae +Subproject commit 9dc28c2efd2c8e6b044731f3f5dc857e44836e3b From 7f13457ae0f420919ac9ac99b9162746e969538f Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Wed, 7 Feb 2024 17:55:03 +0000 Subject: [PATCH 4/5] Updating pro. --- packages/pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pro b/packages/pro index 9dc28c2efd..aaf7101cd1 160000 --- a/packages/pro +++ b/packages/pro @@ -1 +1 @@ -Subproject commit 9dc28c2efd2c8e6b044731f3f5dc857e44836e3b +Subproject commit aaf7101cd1493215155cc8f83124c70d53eb1be4 From 2616dbf46afacf6c0b9b3770af8a8e787639c07c Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Wed, 7 Feb 2024 18:24:56 +0000 Subject: [PATCH 5/5] Updating pro sub-reference after merging recent pro PR for updating queue params. --- packages/pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pro b/packages/pro index aaf7101cd1..9b14e5d518 160000 --- a/packages/pro +++ b/packages/pro @@ -1 +1 @@ -Subproject commit aaf7101cd1493215155cc8f83124c70d53eb1be4 +Subproject commit 9b14e5d5182bf5e5ee98f717997e7352e5904799