From d98983a0c6353aa0f475dcdc831db856a2077915 Mon Sep 17 00:00:00 2001 From: schneefux Date: Tue, 26 Mar 2024 14:15:08 +0100 Subject: [PATCH] cube: Patch redis error --- cube/Dockerfile | 7 ++++++- cube/fix-redis.patch | 14 ++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 cube/fix-redis.patch diff --git a/cube/Dockerfile b/cube/Dockerfile index b84d896d..777f454a 100644 --- a/cube/Dockerfile +++ b/cube/Dockerfile @@ -8,7 +8,12 @@ FROM cubejs/cube:v0.35 RUN apt-get update \ && apt-get install -y patch \ && rm -rf /var/lib/apt/lists/* +# https://github.com/cube-js/cube/issues/2368 COPY ./add-cache-control.patch /cube -RUN cd /cube && patch -p0 < add-cache-control.patch +# https://github.com/cube-js/cube/pull/7959 +COPY ./fix-redis.patch /cube +RUN cd /cube && \ + patch -p0 < add-cache-control.patch && \ + patch -p0 < fix-redis.patch COPY --from=builder /app . EXPOSE 4000 diff --git a/cube/fix-redis.patch b/cube/fix-redis.patch new file mode 100644 index 00000000..36c7a83e --- /dev/null +++ b/cube/fix-redis.patch @@ -0,0 +1,14 @@ +--- node_modules/@cubejs-backend/query-orchestrator/dist/src/orchestrator/RedisQueueDriver.js 2024-03-26 14:09:49 ++++ node_modules/@cubejs-backend/query-orchestrator/dist/src/orchestrator/RedisQueueDriver.js 2024-03-26 14:09:49 +@@ -196,6 +196,11 @@ + .set(lockKey, processingId, 'NX') + .zadd([this.heartBeatRedisKey(), 'NX', new Date().getTime(), this.redisHash(queryKey)]) + .execAsync(); ++ ++ if (!result) { ++ return null; ++ } ++ + if (result) { + result[4] = JSON.parse(result[4]); + if (this.getQueueEventsBus) {