From 70f505d562a804eeee0cda068164860d60c9477f Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Tue, 25 Jul 2023 17:03:44 +0100 Subject: [PATCH 01/52] Update helm chart to expose OFFLINE_MODE env var --- charts/budibase/templates/app-service-deployment.yaml | 2 ++ charts/budibase/templates/worker-service-deployment.yaml | 2 ++ charts/budibase/values.yaml | 1 + 3 files changed, 5 insertions(+) diff --git a/charts/budibase/templates/app-service-deployment.yaml b/charts/budibase/templates/app-service-deployment.yaml index 2b2589406a..a1d4753cdb 100644 --- a/charts/budibase/templates/app-service-deployment.yaml +++ b/charts/budibase/templates/app-service-deployment.yaml @@ -120,6 +120,8 @@ spec: {{ end }} - name: MULTI_TENANCY value: {{ .Values.globals.multiTenancy | quote }} + - name: OFFLINE_MODE + value: {{ .Values.globals.offlineMode | quote }} - name: LOG_LEVEL value: {{ .Values.services.apps.logLevel | quote }} - name: REDIS_PASSWORD diff --git a/charts/budibase/templates/worker-service-deployment.yaml b/charts/budibase/templates/worker-service-deployment.yaml index 5fed80b355..3d1a7369c9 100644 --- a/charts/budibase/templates/worker-service-deployment.yaml +++ b/charts/budibase/templates/worker-service-deployment.yaml @@ -116,6 +116,8 @@ spec: value: {{ .Values.services.worker.port | quote }} - name: MULTI_TENANCY value: {{ .Values.globals.multiTenancy | quote }} + - name: OFFLINE_MODE + value: {{ .Values.globals.offlineMode | quote }} - name: LOG_LEVEL value: {{ .Values.services.worker.logLevel | quote }} - name: REDIS_PASSWORD diff --git a/charts/budibase/values.yaml b/charts/budibase/values.yaml index 74e4c52654..bed92bfe05 100644 --- a/charts/budibase/values.yaml +++ b/charts/budibase/values.yaml @@ -82,6 +82,7 @@ globals: posthogToken: "phc_bIjZL7oh2GEUd2vqvTBH8WvrX0fWTFQMs6H5KQxiUxU" selfHosted: "1" # set to 0 for budibase cloud environment, set to 1 for self-hosted setup multiTenancy: "0" # set to 0 to disable multiple orgs, set to 1 to enable multiple orgs + offlineMode: "0" # set to 1 to enable offline mode accountPortalUrl: "" accountPortalApiKey: "" cookieDomain: "" From 546c16f1180bffb3e1f7a42ccd964642d8aaa233 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Mon, 24 Jul 2023 17:20:42 +0200 Subject: [PATCH 02/52] Update local tools --- .nvmrc | 2 +- .tool-versions | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.nvmrc b/.nvmrc index 835d07c442..7950a44576 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v14.20.1 +v18.17.0 diff --git a/.tool-versions b/.tool-versions index 9f2ea77b14..a909d60941 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,3 +1,3 @@ -nodejs 14.21.3 +nodejs 18.17.0 python 3.10.0 -yarn 1.22.19 \ No newline at end of file +yarn 1.22.19 From d8c2499c15d5e5d1db8444dbe8069cba08836b35 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Mon, 24 Jul 2023 17:46:57 +0200 Subject: [PATCH 03/52] Fix automation issues --- packages/server/src/automations/tests/automation.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/src/automations/tests/automation.spec.ts b/packages/server/src/automations/tests/automation.spec.ts index 67ff6d40ec..0cdc69c5ac 100644 --- a/packages/server/src/automations/tests/automation.spec.ts +++ b/packages/server/src/automations/tests/automation.spec.ts @@ -33,7 +33,7 @@ describe("Run through some parts of the automations system", () => { setup.afterAll() }) - it("should be able to init in builder", async () => { + it.only("should be able to init in builder", async () => { const automation: Automation = { ...basicAutomation(), appId: config.appId, From 5e59d735332b288ff86b51dcd7399e6c7efe2e24 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Mon, 24 Jul 2023 17:48:10 +0200 Subject: [PATCH 04/52] Change actions to use node 18 --- .github/workflows/budibase_ci.yml | 24 +++++++++++------------ .github/workflows/release-develop.yml | 2 +- .github/workflows/release-master.yml | 2 +- .github/workflows/release-selfhost.yml | 4 ++-- .github/workflows/release-singleimage.yml | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/budibase_ci.yml b/.github/workflows/budibase_ci.yml index 9509a22e99..661fcb170b 100644 --- a/.github/workflows/budibase_ci.yml +++ b/.github/workflows/budibase_ci.yml @@ -33,10 +33,10 @@ jobs: uses: actions/checkout@v3 if: github.repository != github.event.pull_request.head.repo.full_name - - name: Use Node.js 14.x + - name: Use Node.js 18.x uses: actions/setup-node@v3 with: - node-version: 14.x + node-version: 18.x cache: "yarn" - run: yarn - run: yarn lint @@ -54,10 +54,10 @@ jobs: uses: actions/checkout@v3 if: github.repository != github.event.pull_request.head.repo.full_name - - name: Use Node.js 14.x + - name: Use Node.js 18.x uses: actions/setup-node@v3 with: - node-version: 14.x + node-version: 18.x cache: "yarn" - run: yarn # Run build all the projects @@ -78,10 +78,10 @@ jobs: uses: actions/checkout@v3 if: github.repository != github.event.pull_request.head.repo.full_name - - name: Use Node.js 14.x + - name: Use Node.js 18.x uses: actions/setup-node@v3 with: - node-version: 14.x + node-version: 18.x cache: "yarn" - run: yarn - run: yarn test --ignore=@budibase/worker --ignore=@budibase/server --ignore=@budibase/pro @@ -104,10 +104,10 @@ jobs: uses: actions/checkout@v3 if: github.repository != github.event.pull_request.head.repo.full_name - - name: Use Node.js 14.x + - name: Use Node.js 18.x uses: actions/setup-node@v3 with: - node-version: 14.x + node-version: 18.x cache: "yarn" - run: yarn - run: yarn test --scope=@budibase/worker --scope=@budibase/server @@ -127,10 +127,10 @@ jobs: submodules: true token: ${{ secrets.PERSONAL_ACCESS_TOKEN || github.token }} - - name: Use Node.js 14.x + - name: Use Node.js 18.x uses: actions/setup-node@v3 with: - node-version: 14.x + node-version: 18.x cache: "yarn" - run: yarn - run: yarn test --scope=@budibase/pro @@ -148,10 +148,10 @@ jobs: uses: actions/checkout@v3 if: github.repository != github.event.pull_request.head.repo.full_name - - name: Use Node.js 14.x + - name: Use Node.js 18.x uses: actions/setup-node@v3 with: - node-version: 14.x + node-version: 18.x cache: "yarn" - run: yarn - run: yarn build diff --git a/.github/workflows/release-develop.yml b/.github/workflows/release-develop.yml index 61cb283e28..bd727b7865 100644 --- a/.github/workflows/release-develop.yml +++ b/.github/workflows/release-develop.yml @@ -44,7 +44,7 @@ jobs: - uses: actions/setup-node@v1 with: - node-version: 14.x + node-version: 18.x - run: yarn install --frozen-lockfile - name: Update versions diff --git a/.github/workflows/release-master.yml b/.github/workflows/release-master.yml index 7f8b8f1d55..db2723cdfe 100644 --- a/.github/workflows/release-master.yml +++ b/.github/workflows/release-master.yml @@ -36,7 +36,7 @@ jobs: - uses: actions/setup-node@v1 with: - node-version: 14.x + node-version: 18.x - run: yarn install --frozen-lockfile - name: Update versions diff --git a/.github/workflows/release-selfhost.yml b/.github/workflows/release-selfhost.yml index 39ee812726..ddfe202465 100644 --- a/.github/workflows/release-selfhost.yml +++ b/.github/workflows/release-selfhost.yml @@ -28,10 +28,10 @@ jobs: exit 1 fi - - name: Use Node.js 14.x + - name: Use Node.js 18.x uses: actions/setup-node@v1 with: - node-version: 14.x + node-version: 18.x - name: Get the latest budibase release version id: version diff --git a/.github/workflows/release-singleimage.yml b/.github/workflows/release-singleimage.yml index 5b75c20d29..25be68feb0 100644 --- a/.github/workflows/release-singleimage.yml +++ b/.github/workflows/release-singleimage.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [14.x] + node-version: [18.x] steps: - name: Fail if not a tag run: | From e2ac7e3463a165ac9ecfc58fcc500ce5112b3d7a Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 25 Jul 2023 10:44:53 +0200 Subject: [PATCH 05/52] Fix minio usage --- .../backend-core/tests/core/utilities/testContainerUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend-core/tests/core/utilities/testContainerUtils.ts b/packages/backend-core/tests/core/utilities/testContainerUtils.ts index f6c702f7ef..06bd91392e 100644 --- a/packages/backend-core/tests/core/utilities/testContainerUtils.ts +++ b/packages/backend-core/tests/core/utilities/testContainerUtils.ts @@ -80,7 +80,7 @@ function getRedisConfig() { export function setupEnv(...envs: any[]) { const couch = getCouchConfig(), - minio = getCouchConfig(), + minio = getMinioConfig(), redis = getRedisConfig() const configs = [ { key: "COUCH_DB_PORT", value: couch.port }, From f7cae98a963dad0b3469332ef9151bbd98fe87b0 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 27 Jul 2023 10:00:10 +0200 Subject: [PATCH 06/52] Change node engine --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a392aeee78..358c027026 100644 --- a/package.json +++ b/package.json @@ -109,7 +109,7 @@ "@budibase/types": "0.0.0" }, "engines": { - "node": ">=14.0.0 <15.0.0" + "node": ">=18.0.0 <19.0.0" }, "dependencies": {} } From c7b0960bb3063013c08f516ec3b90b09d8b77d39 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 27 Jul 2023 11:30:44 +0200 Subject: [PATCH 07/52] Make use of workerIdleMemoryLimit --- packages/server/jest.config.ts | 1 + packages/worker/jest.config.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/server/jest.config.ts b/packages/server/jest.config.ts index f36864f999..b43bd742c0 100644 --- a/packages/server/jest.config.ts +++ b/packages/server/jest.config.ts @@ -16,6 +16,7 @@ const baseConfig: Config.InitialProjectOptions = { "@budibase/shared-core": "/../shared-core/src", "@budibase/types": "/../types/src", }, + workerIdleMemoryLimit: "40%", } // add pro sources if they exist diff --git a/packages/worker/jest.config.ts b/packages/worker/jest.config.ts index 0a640766f4..f03f8006cc 100644 --- a/packages/worker/jest.config.ts +++ b/packages/worker/jest.config.ts @@ -16,6 +16,7 @@ const config: Config.InitialOptions = { "@budibase/types": "/../types/src", "@budibase/shared-core": ["/../shared-core/src"], }, + workerIdleMemoryLimit: "40%", } // add pro sources if they exist From 225d498909580f6b8912e99f3d0402b5a0d6c424 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 27 Jul 2023 16:02:03 +0200 Subject: [PATCH 08/52] Run with concurrency 1 --- .github/workflows/budibase_ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/budibase_ci.yml b/.github/workflows/budibase_ci.yml index 661fcb170b..bdb2e640b5 100644 --- a/.github/workflows/budibase_ci.yml +++ b/.github/workflows/budibase_ci.yml @@ -110,7 +110,7 @@ jobs: node-version: 18.x cache: "yarn" - run: yarn - - run: yarn test --scope=@budibase/worker --scope=@budibase/server + - run: yarn test --concurrency=1 --scope=@budibase/worker --scope=@budibase/server - uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN || github.token }} # not required for public repos From 5dc36238667104cd9745defe5f048ac6da5c3dbe Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 27 Jul 2023 16:03:53 +0200 Subject: [PATCH 09/52] Remove workerIdleMemoryLimit from worker --- packages/worker/jest.config.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/worker/jest.config.ts b/packages/worker/jest.config.ts index f03f8006cc..0a640766f4 100644 --- a/packages/worker/jest.config.ts +++ b/packages/worker/jest.config.ts @@ -16,7 +16,6 @@ const config: Config.InitialOptions = { "@budibase/types": "/../types/src", "@budibase/shared-core": ["/../shared-core/src"], }, - workerIdleMemoryLimit: "40%", } // add pro sources if they exist From e71ec971a093b6c1d40d4571da80e623230ab400 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 27 Jul 2023 16:04:19 +0200 Subject: [PATCH 10/52] workerIdleMemoryLimit server at 50% --- packages/server/jest.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/jest.config.ts b/packages/server/jest.config.ts index b43bd742c0..a683be8150 100644 --- a/packages/server/jest.config.ts +++ b/packages/server/jest.config.ts @@ -16,7 +16,7 @@ const baseConfig: Config.InitialProjectOptions = { "@budibase/shared-core": "/../shared-core/src", "@budibase/types": "/../types/src", }, - workerIdleMemoryLimit: "40%", + workerIdleMemoryLimit: "50%", } // add pro sources if they exist From c2a5a37c487e1961d4d132c158d159db5aecfb1f Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 27 Jul 2023 16:23:56 +0200 Subject: [PATCH 11/52] Split tests --- .github/workflows/budibase_ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/budibase_ci.yml b/.github/workflows/budibase_ci.yml index bdb2e640b5..d12e632fd4 100644 --- a/.github/workflows/budibase_ci.yml +++ b/.github/workflows/budibase_ci.yml @@ -110,7 +110,12 @@ jobs: node-version: 18.x cache: "yarn" - run: yarn - - run: yarn test --concurrency=1 --scope=@budibase/worker --scope=@budibase/server + - name: Test worker + run: yarn test --scope=@budibase/worker + - name: Test server + env: + NODE_OPTIONS: "--max_old_space_size=4096" + run: yarn test --scope=@budibase/server - uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN || github.token }} # not required for public repos From 0f75660808d0206e3f40299f3310be49acd5cd73 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 27 Jul 2023 16:47:09 +0200 Subject: [PATCH 12/52] Attempt different commands --- .github/workflows/budibase_ci.yml | 8 ++------ packages/server/scripts/test.sh | 5 +++-- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/budibase_ci.yml b/.github/workflows/budibase_ci.yml index d12e632fd4..5dc3ba1222 100644 --- a/.github/workflows/budibase_ci.yml +++ b/.github/workflows/budibase_ci.yml @@ -110,12 +110,8 @@ jobs: node-version: 18.x cache: "yarn" - run: yarn - - name: Test worker - run: yarn test --scope=@budibase/worker - - name: Test server - env: - NODE_OPTIONS: "--max_old_space_size=4096" - run: yarn test --scope=@budibase/server + - name: Test worker and server + run: yarn test --concurrency=1 --scope=@budibase/worker --scope=@budibase/server - uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN || github.token }} # not required for public repos diff --git a/packages/server/scripts/test.sh b/packages/server/scripts/test.sh index f3f679c4da..4aad5b3c7c 100644 --- a/packages/server/scripts/test.sh +++ b/packages/server/scripts/test.sh @@ -5,8 +5,9 @@ if [[ -n $CI ]] then # --runInBand performs better in ci where resources are limited export NODE_OPTIONS="--max-old-space-size=4096" - echo "jest --coverage --runInBand --forceExit" - jest --coverage --runInBand --forceExit + node ../../node_modules/jest/bin/jest.js --version + echo "node --expose-gc --no-compilation-cache ../../node_modules/jest/bin/jest.js" + node --expose-gc --no-compilation-cache ../../node_modules/jest/bin/jest.js else # --maxWorkers performs better in development echo "jest --coverage --maxWorkers=2 --forceExit" From f82c10782fb3da16e8022433d0dc440e686dbdef Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 27 Jul 2023 17:14:34 +0200 Subject: [PATCH 13/52] Log heap usage --- packages/server/jest.config.ts | 1 - packages/server/scripts/test.sh | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/server/jest.config.ts b/packages/server/jest.config.ts index a683be8150..f36864f999 100644 --- a/packages/server/jest.config.ts +++ b/packages/server/jest.config.ts @@ -16,7 +16,6 @@ const baseConfig: Config.InitialProjectOptions = { "@budibase/shared-core": "/../shared-core/src", "@budibase/types": "/../types/src", }, - workerIdleMemoryLimit: "50%", } // add pro sources if they exist diff --git a/packages/server/scripts/test.sh b/packages/server/scripts/test.sh index 4aad5b3c7c..19f3fb33d7 100644 --- a/packages/server/scripts/test.sh +++ b/packages/server/scripts/test.sh @@ -7,7 +7,7 @@ then export NODE_OPTIONS="--max-old-space-size=4096" node ../../node_modules/jest/bin/jest.js --version echo "node --expose-gc --no-compilation-cache ../../node_modules/jest/bin/jest.js" - node --expose-gc --no-compilation-cache ../../node_modules/jest/bin/jest.js + node --expose-gc --no-compilation-cache ../../node_modules/jest/bin/jest.js --logHeapUsage else # --maxWorkers performs better in development echo "jest --coverage --maxWorkers=2 --forceExit" From 2e1903f95577275e102dfbf26de80e683541f9fb Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 27 Jul 2023 17:40:44 +0200 Subject: [PATCH 14/52] Log --- packages/server/scripts/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/scripts/test.sh b/packages/server/scripts/test.sh index 19f3fb33d7..3adc5abbd0 100644 --- a/packages/server/scripts/test.sh +++ b/packages/server/scripts/test.sh @@ -6,7 +6,7 @@ then # --runInBand performs better in ci where resources are limited export NODE_OPTIONS="--max-old-space-size=4096" node ../../node_modules/jest/bin/jest.js --version - echo "node --expose-gc --no-compilation-cache ../../node_modules/jest/bin/jest.js" + echo "node --expose-gc --no-compilation-cache ../../node_modules/jest/bin/jest.js --logHeapUsage" node --expose-gc --no-compilation-cache ../../node_modules/jest/bin/jest.js --logHeapUsage else # --maxWorkers performs better in development From 42b14fe712aa04124f3c65acef66bfa05db34630 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 27 Jul 2023 17:45:47 +0200 Subject: [PATCH 15/52] Add workerIdleMemoryLimit --- packages/server/jest.config.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/server/jest.config.ts b/packages/server/jest.config.ts index f36864f999..f12e2e46c7 100644 --- a/packages/server/jest.config.ts +++ b/packages/server/jest.config.ts @@ -16,6 +16,7 @@ const baseConfig: Config.InitialProjectOptions = { "@budibase/shared-core": "/../shared-core/src", "@budibase/types": "/../types/src", }, + workerIdleMemoryLimit: 0.2, } // add pro sources if they exist From e5ceaf8ffd75f3cec86373671504ccd7e8d71aef Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 27 Jul 2023 18:03:13 +0200 Subject: [PATCH 16/52] Add 2gb limit --- packages/server/jest.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/jest.config.ts b/packages/server/jest.config.ts index f12e2e46c7..87e2ef4d0a 100644 --- a/packages/server/jest.config.ts +++ b/packages/server/jest.config.ts @@ -16,7 +16,7 @@ const baseConfig: Config.InitialProjectOptions = { "@budibase/shared-core": "/../shared-core/src", "@budibase/types": "/../types/src", }, - workerIdleMemoryLimit: 0.2, + workerIdleMemoryLimit: "2GB", } // add pro sources if they exist From 800f5c5095e2eeca639414d1293b311293e112cd Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 27 Jul 2023 18:11:34 +0200 Subject: [PATCH 17/52] Use --frozen-lock --- .github/workflows/budibase_ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/budibase_ci.yml b/.github/workflows/budibase_ci.yml index 5dc3ba1222..6c9fb1c253 100644 --- a/.github/workflows/budibase_ci.yml +++ b/.github/workflows/budibase_ci.yml @@ -38,7 +38,7 @@ jobs: with: node-version: 18.x cache: "yarn" - - run: yarn + - run: yarn --frozen-lockfile - run: yarn lint build: @@ -59,7 +59,7 @@ jobs: with: node-version: 18.x cache: "yarn" - - run: yarn + - run: yarn --frozen-lockfile # Run build all the projects - run: yarn build # Check the types of the projects built via esbuild @@ -83,7 +83,7 @@ jobs: with: node-version: 18.x cache: "yarn" - - run: yarn + - run: yarn --frozen-lockfile - run: yarn test --ignore=@budibase/worker --ignore=@budibase/server --ignore=@budibase/pro - uses: codecov/codecov-action@v3 with: @@ -109,7 +109,7 @@ jobs: with: node-version: 18.x cache: "yarn" - - run: yarn + - run: yarn --frozen-lockfile - name: Test worker and server run: yarn test --concurrency=1 --scope=@budibase/worker --scope=@budibase/server - uses: codecov/codecov-action@v3 @@ -133,7 +133,7 @@ jobs: with: node-version: 18.x cache: "yarn" - - run: yarn + - run: yarn --frozen-lockfile - run: yarn test --scope=@budibase/pro integration-test: @@ -154,7 +154,7 @@ jobs: with: node-version: 18.x cache: "yarn" - - run: yarn + - run: yarn --frozen-lockfile - run: yarn build - name: Run tests run: | From 712732f79589353ffed3817207c25980fa9c17e8 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 27 Jul 2023 18:37:13 +0200 Subject: [PATCH 18/52] Run in band? --- packages/server/scripts/test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/server/scripts/test.sh b/packages/server/scripts/test.sh index 3adc5abbd0..5d0c793846 100644 --- a/packages/server/scripts/test.sh +++ b/packages/server/scripts/test.sh @@ -6,8 +6,8 @@ then # --runInBand performs better in ci where resources are limited export NODE_OPTIONS="--max-old-space-size=4096" node ../../node_modules/jest/bin/jest.js --version - echo "node --expose-gc --no-compilation-cache ../../node_modules/jest/bin/jest.js --logHeapUsage" - node --expose-gc --no-compilation-cache ../../node_modules/jest/bin/jest.js --logHeapUsage + echo "node --expose-gc --no-compilation-cache ../../node_modules/jest/bin/jest.js --runInBand --logHeapUsage" + node --expose-gc --no-compilation-cache ../../node_modules/jest/bin/jest.js --runInBand --logHeapUsage else # --maxWorkers performs better in development echo "jest --coverage --maxWorkers=2 --forceExit" From a0be6029b3bd8a7524f5c07ef10ed5b5c278ba6e Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 27 Jul 2023 21:10:28 +0200 Subject: [PATCH 19/52] Remove concurrency --- .github/workflows/budibase_ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/budibase_ci.yml b/.github/workflows/budibase_ci.yml index 6c9fb1c253..9e2d0b3fbe 100644 --- a/.github/workflows/budibase_ci.yml +++ b/.github/workflows/budibase_ci.yml @@ -111,7 +111,7 @@ jobs: cache: "yarn" - run: yarn --frozen-lockfile - name: Test worker and server - run: yarn test --concurrency=1 --scope=@budibase/worker --scope=@budibase/server + run: yarn test --scope=@budibase/worker --scope=@budibase/server - uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN || github.token }} # not required for public repos From e2758d3da18c90f062d7749c86cfaa320914e7bb Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 27 Jul 2023 21:12:26 +0200 Subject: [PATCH 20/52] Remove it.only( --- packages/server/src/automations/tests/automation.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/src/automations/tests/automation.spec.ts b/packages/server/src/automations/tests/automation.spec.ts index 0cdc69c5ac..67ff6d40ec 100644 --- a/packages/server/src/automations/tests/automation.spec.ts +++ b/packages/server/src/automations/tests/automation.spec.ts @@ -33,7 +33,7 @@ describe("Run through some parts of the automations system", () => { setup.afterAll() }) - it.only("should be able to init in builder", async () => { + it("should be able to init in builder", async () => { const automation: Automation = { ...basicAutomation(), appId: config.appId, From 51a1d1c183664809022461a66d72e6fed4fe8f06 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Fri, 28 Jul 2023 10:59:12 +0200 Subject: [PATCH 21/52] Add force exists --- packages/server/scripts/test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/server/scripts/test.sh b/packages/server/scripts/test.sh index 5d0c793846..353995f8bb 100644 --- a/packages/server/scripts/test.sh +++ b/packages/server/scripts/test.sh @@ -6,8 +6,8 @@ then # --runInBand performs better in ci where resources are limited export NODE_OPTIONS="--max-old-space-size=4096" node ../../node_modules/jest/bin/jest.js --version - echo "node --expose-gc --no-compilation-cache ../../node_modules/jest/bin/jest.js --runInBand --logHeapUsage" - node --expose-gc --no-compilation-cache ../../node_modules/jest/bin/jest.js --runInBand --logHeapUsage + echo "node --expose-gc --no-compilation-cache ../../node_modules/jest/bin/jest.js --runInBand --logHeapUsage --forceExit" + node --expose-gc --no-compilation-cache ../../node_modules/jest/bin/jest.js --runInBand --logHeapUsage --forceExit else # --maxWorkers performs better in development echo "jest --coverage --maxWorkers=2 --forceExit" From d5533c00d609a73847d06d25f4396c42abc69ae6 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Fri, 28 Jul 2023 12:53:52 +0200 Subject: [PATCH 22/52] Fix workerIdleMemoryLimit usage --- packages/server/jest.config.ts | 1 - packages/server/scripts/test.sh | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/server/jest.config.ts b/packages/server/jest.config.ts index 87e2ef4d0a..f36864f999 100644 --- a/packages/server/jest.config.ts +++ b/packages/server/jest.config.ts @@ -16,7 +16,6 @@ const baseConfig: Config.InitialProjectOptions = { "@budibase/shared-core": "/../shared-core/src", "@budibase/types": "/../types/src", }, - workerIdleMemoryLimit: "2GB", } // add pro sources if they exist diff --git a/packages/server/scripts/test.sh b/packages/server/scripts/test.sh index 353995f8bb..a2c6f2cdf2 100644 --- a/packages/server/scripts/test.sh +++ b/packages/server/scripts/test.sh @@ -6,8 +6,8 @@ then # --runInBand performs better in ci where resources are limited export NODE_OPTIONS="--max-old-space-size=4096" node ../../node_modules/jest/bin/jest.js --version - echo "node --expose-gc --no-compilation-cache ../../node_modules/jest/bin/jest.js --runInBand --logHeapUsage --forceExit" - node --expose-gc --no-compilation-cache ../../node_modules/jest/bin/jest.js --runInBand --logHeapUsage --forceExit + echo "jest --coverage --maxWorkers=2 --forceExit" + jest --coverage --maxWorkers=2 --forceExit --workerIdleMemoryLimit=2000MB else # --maxWorkers performs better in development echo "jest --coverage --maxWorkers=2 --forceExit" From 52078d6fd7475c8a17e6d2ebdb537d3dd70b2d4f Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Fri, 28 Jul 2023 17:52:24 +0200 Subject: [PATCH 23/52] Don't modify production pipelines --- .github/workflows/release-master.yml | 2 +- .github/workflows/release-selfhost.yml | 4 ++-- .github/workflows/release-singleimage.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-master.yml b/.github/workflows/release-master.yml index db2723cdfe..7f8b8f1d55 100644 --- a/.github/workflows/release-master.yml +++ b/.github/workflows/release-master.yml @@ -36,7 +36,7 @@ jobs: - uses: actions/setup-node@v1 with: - node-version: 18.x + node-version: 14.x - run: yarn install --frozen-lockfile - name: Update versions diff --git a/.github/workflows/release-selfhost.yml b/.github/workflows/release-selfhost.yml index ddfe202465..39ee812726 100644 --- a/.github/workflows/release-selfhost.yml +++ b/.github/workflows/release-selfhost.yml @@ -28,10 +28,10 @@ jobs: exit 1 fi - - name: Use Node.js 18.x + - name: Use Node.js 14.x uses: actions/setup-node@v1 with: - node-version: 18.x + node-version: 14.x - name: Get the latest budibase release version id: version diff --git a/.github/workflows/release-singleimage.yml b/.github/workflows/release-singleimage.yml index 25be68feb0..5b75c20d29 100644 --- a/.github/workflows/release-singleimage.yml +++ b/.github/workflows/release-singleimage.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [18.x] + node-version: [14.x] steps: - name: Fail if not a tag run: | From ac5ce13f80cdbb8e80e2b3b460888dd3c7fc8fcc Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Mon, 7 Aug 2023 10:59:42 +0100 Subject: [PATCH 24/52] debug log for automation ID --- packages/server/src/threads/automation.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/server/src/threads/automation.ts b/packages/server/src/threads/automation.ts index 9831a96936..7d4a0f1dd1 100644 --- a/packages/server/src/threads/automation.ts +++ b/packages/server/src/threads/automation.ts @@ -486,6 +486,7 @@ class Orchestrator { const end = performance.now() const executionTime = end - start + console.debug(`[Automation ID]: ${automation._id} completed`) console.info(`Execution time: ${executionTime} milliseconds`, { _logKey: "automation", executionTime, From c60a54bd23df677644f735594216f33cefdd1e90 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Mon, 7 Aug 2023 13:50:48 +0300 Subject: [PATCH 25/52] Fix checks --- .github/workflows/budibase_ci.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/budibase_ci.yml b/.github/workflows/budibase_ci.yml index 9da52f8bc0..f57a729ba9 100644 --- a/.github/workflows/budibase_ci.yml +++ b/.github/workflows/budibase_ci.yml @@ -25,13 +25,13 @@ jobs: steps: - name: Checkout repo and submodules uses: actions/checkout@v3 - if: github.repository == 'Budibase/budibase' + if: github.event_name = "pull_request" && github.event.pull_request.head.repo.full_name == 'Budibase/budibase' with: submodules: true token: ${{ secrets.PERSONAL_ACCESS_TOKEN || github.token }} - name: Checkout repo only uses: actions/checkout@v3 - if: github.repository != 'Budibase/budibase' + if: github.event.pull_request.head.repo.full_name != 'Budibase/budibase' - name: Use Node.js 14.x uses: actions/setup-node@v3 @@ -46,13 +46,13 @@ jobs: steps: - name: Checkout repo and submodules uses: actions/checkout@v3 - if: github.repository == 'Budibase/budibase' + if: github.event_name = "pull_request" && github.event.pull_request.head.repo.full_name == 'Budibase/budibase' with: submodules: true token: ${{ secrets.PERSONAL_ACCESS_TOKEN || github.token }} - name: Checkout repo only uses: actions/checkout@v3 - if: github.repository != 'Budibase/budibase' + if: github.event.pull_request.head.repo.full_name != 'Budibase/budibase' - name: Use Node.js 14.x uses: actions/setup-node@v3 @@ -70,13 +70,13 @@ jobs: steps: - name: Checkout repo and submodules uses: actions/checkout@v3 - if: github.repository == 'Budibase/budibase' + if: github.event_name = "pull_request" && github.event.pull_request.head.repo.full_name == 'Budibase/budibase' with: submodules: true token: ${{ secrets.PERSONAL_ACCESS_TOKEN || github.token }} - name: Checkout repo only uses: actions/checkout@v3 - if: github.repository != 'Budibase/budibase' + if: github.event.pull_request.head.repo.full_name != 'Budibase/budibase' - name: Use Node.js 14.x uses: actions/setup-node@v3 @@ -96,13 +96,13 @@ jobs: steps: - name: Checkout repo and submodules uses: actions/checkout@v3 - if: github.repository == 'Budibase/budibase' + if: github.event_name = "pull_request" && github.event.pull_request.head.repo.full_name == 'Budibase/budibase' with: submodules: true token: ${{ secrets.PERSONAL_ACCESS_TOKEN || github.token }} - name: Checkout repo only uses: actions/checkout@v3 - if: github.repository != 'Budibase/budibase' + if: github.event.pull_request.head.repo.full_name != 'Budibase/budibase' - name: Use Node.js 14.x uses: actions/setup-node@v3 @@ -119,7 +119,7 @@ jobs: test-pro: runs-on: ubuntu-latest - if: github.repository == 'Budibase/budibase' + if: github.event_name = "pull_request" && github.event.pull_request.head.repo.full_name == 'Budibase/budibase' steps: - name: Checkout repo and submodules uses: actions/checkout@v3 @@ -140,13 +140,13 @@ jobs: steps: - name: Checkout repo and submodules uses: actions/checkout@v3 - if: github.repository == 'Budibase/budibase' + if: github.event_name = "pull_request" && github.event.pull_request.head.repo.full_name == 'Budibase/budibase' with: submodules: true token: ${{ secrets.PERSONAL_ACCESS_TOKEN || github.token }} - name: Checkout repo only uses: actions/checkout@v3 - if: github.repository != 'Budibase/budibase' + if: github.event.pull_request.head.repo.full_name != 'Budibase/budibase' - name: Use Node.js 14.x uses: actions/setup-node@v3 @@ -166,7 +166,7 @@ jobs: check-pro-submodule: runs-on: ubuntu-latest - if: github.repository == 'Budibase/budibase' + if: github.event_name = "pull_request" && github.event.pull_request.head.repo.full_name == 'Budibase/budibase' steps: - name: Checkout repo and submodules uses: actions/checkout@v3 From be3912904e2f88577889b29464f9f14585b571a7 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Mon, 7 Aug 2023 13:56:57 +0300 Subject: [PATCH 26/52] Fix yaml --- .github/workflows/budibase_ci.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/budibase_ci.yml b/.github/workflows/budibase_ci.yml index f57a729ba9..60401099bc 100644 --- a/.github/workflows/budibase_ci.yml +++ b/.github/workflows/budibase_ci.yml @@ -25,7 +25,7 @@ jobs: steps: - name: Checkout repo and submodules uses: actions/checkout@v3 - if: github.event_name = "pull_request" && github.event.pull_request.head.repo.full_name == 'Budibase/budibase' + if: github.event_name = 'pull_request' && github.event.pull_request.head.repo.full_name == 'Budibase/budibase' with: submodules: true token: ${{ secrets.PERSONAL_ACCESS_TOKEN || github.token }} @@ -46,7 +46,7 @@ jobs: steps: - name: Checkout repo and submodules uses: actions/checkout@v3 - if: github.event_name = "pull_request" && github.event.pull_request.head.repo.full_name == 'Budibase/budibase' + if: github.event_name = 'pull_request' && github.event.pull_request.head.repo.full_name == 'Budibase/budibase' with: submodules: true token: ${{ secrets.PERSONAL_ACCESS_TOKEN || github.token }} @@ -70,7 +70,7 @@ jobs: steps: - name: Checkout repo and submodules uses: actions/checkout@v3 - if: github.event_name = "pull_request" && github.event.pull_request.head.repo.full_name == 'Budibase/budibase' + if: github.event_name = 'pull_request' && github.event.pull_request.head.repo.full_name == 'Budibase/budibase' with: submodules: true token: ${{ secrets.PERSONAL_ACCESS_TOKEN || github.token }} @@ -96,7 +96,7 @@ jobs: steps: - name: Checkout repo and submodules uses: actions/checkout@v3 - if: github.event_name = "pull_request" && github.event.pull_request.head.repo.full_name == 'Budibase/budibase' + if: github.event_name = 'pull_request' && github.event.pull_request.head.repo.full_name == 'Budibase/budibase' with: submodules: true token: ${{ secrets.PERSONAL_ACCESS_TOKEN || github.token }} @@ -119,7 +119,7 @@ jobs: test-pro: runs-on: ubuntu-latest - if: github.event_name = "pull_request" && github.event.pull_request.head.repo.full_name == 'Budibase/budibase' + if: github.event_name = 'pull_request' && github.event.pull_request.head.repo.full_name == 'Budibase/budibase' steps: - name: Checkout repo and submodules uses: actions/checkout@v3 @@ -140,7 +140,7 @@ jobs: steps: - name: Checkout repo and submodules uses: actions/checkout@v3 - if: github.event_name = "pull_request" && github.event.pull_request.head.repo.full_name == 'Budibase/budibase' + if: github.event_name = 'pull_request' && github.event.pull_request.head.repo.full_name == 'Budibase/budibase' with: submodules: true token: ${{ secrets.PERSONAL_ACCESS_TOKEN || github.token }} @@ -166,7 +166,7 @@ jobs: check-pro-submodule: runs-on: ubuntu-latest - if: github.event_name = "pull_request" && github.event.pull_request.head.repo.full_name == 'Budibase/budibase' + if: github.event_name = 'pull_request' && github.event.pull_request.head.repo.full_name == 'Budibase/budibase' steps: - name: Checkout repo and submodules uses: actions/checkout@v3 From b5e7755948a8c98bf14de75c070a66e4dc1ebd47 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Mon, 7 Aug 2023 13:59:59 +0300 Subject: [PATCH 27/52] Attempt yaml --- .github/workflows/budibase_ci.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/budibase_ci.yml b/.github/workflows/budibase_ci.yml index 60401099bc..9730487684 100644 --- a/.github/workflows/budibase_ci.yml +++ b/.github/workflows/budibase_ci.yml @@ -25,7 +25,7 @@ jobs: steps: - name: Checkout repo and submodules uses: actions/checkout@v3 - if: github.event_name = 'pull_request' && github.event.pull_request.head.repo.full_name == 'Budibase/budibase' + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'Budibase/budibase' with: submodules: true token: ${{ secrets.PERSONAL_ACCESS_TOKEN || github.token }} @@ -46,7 +46,7 @@ jobs: steps: - name: Checkout repo and submodules uses: actions/checkout@v3 - if: github.event_name = 'pull_request' && github.event.pull_request.head.repo.full_name == 'Budibase/budibase' + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'Budibase/budibase' with: submodules: true token: ${{ secrets.PERSONAL_ACCESS_TOKEN || github.token }} @@ -70,7 +70,7 @@ jobs: steps: - name: Checkout repo and submodules uses: actions/checkout@v3 - if: github.event_name = 'pull_request' && github.event.pull_request.head.repo.full_name == 'Budibase/budibase' + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'Budibase/budibase' with: submodules: true token: ${{ secrets.PERSONAL_ACCESS_TOKEN || github.token }} @@ -96,7 +96,7 @@ jobs: steps: - name: Checkout repo and submodules uses: actions/checkout@v3 - if: github.event_name = 'pull_request' && github.event.pull_request.head.repo.full_name == 'Budibase/budibase' + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'Budibase/budibase' with: submodules: true token: ${{ secrets.PERSONAL_ACCESS_TOKEN || github.token }} @@ -119,7 +119,7 @@ jobs: test-pro: runs-on: ubuntu-latest - if: github.event_name = 'pull_request' && github.event.pull_request.head.repo.full_name == 'Budibase/budibase' + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'Budibase/budibase' steps: - name: Checkout repo and submodules uses: actions/checkout@v3 @@ -140,7 +140,7 @@ jobs: steps: - name: Checkout repo and submodules uses: actions/checkout@v3 - if: github.event_name = 'pull_request' && github.event.pull_request.head.repo.full_name == 'Budibase/budibase' + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'Budibase/budibase' with: submodules: true token: ${{ secrets.PERSONAL_ACCESS_TOKEN || github.token }} @@ -166,7 +166,7 @@ jobs: check-pro-submodule: runs-on: ubuntu-latest - if: github.event_name = 'pull_request' && github.event.pull_request.head.repo.full_name == 'Budibase/budibase' + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'Budibase/budibase' steps: - name: Checkout repo and submodules uses: actions/checkout@v3 From 02f28442d69238affa0cc356351db0aab75fe980 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Mon, 7 Aug 2023 14:05:44 +0300 Subject: [PATCH 28/52] Fix double checkout --- .github/workflows/budibase_ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/budibase_ci.yml b/.github/workflows/budibase_ci.yml index 9730487684..e060db8370 100644 --- a/.github/workflows/budibase_ci.yml +++ b/.github/workflows/budibase_ci.yml @@ -31,7 +31,7 @@ jobs: token: ${{ secrets.PERSONAL_ACCESS_TOKEN || github.token }} - name: Checkout repo only uses: actions/checkout@v3 - if: github.event.pull_request.head.repo.full_name != 'Budibase/budibase' + if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != 'Budibase/budibase' - name: Use Node.js 14.x uses: actions/setup-node@v3 @@ -52,7 +52,7 @@ jobs: token: ${{ secrets.PERSONAL_ACCESS_TOKEN || github.token }} - name: Checkout repo only uses: actions/checkout@v3 - if: github.event.pull_request.head.repo.full_name != 'Budibase/budibase' + if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != 'Budibase/budibase' - name: Use Node.js 14.x uses: actions/setup-node@v3 @@ -76,7 +76,7 @@ jobs: token: ${{ secrets.PERSONAL_ACCESS_TOKEN || github.token }} - name: Checkout repo only uses: actions/checkout@v3 - if: github.event.pull_request.head.repo.full_name != 'Budibase/budibase' + if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != 'Budibase/budibase' - name: Use Node.js 14.x uses: actions/setup-node@v3 @@ -102,7 +102,7 @@ jobs: token: ${{ secrets.PERSONAL_ACCESS_TOKEN || github.token }} - name: Checkout repo only uses: actions/checkout@v3 - if: github.event.pull_request.head.repo.full_name != 'Budibase/budibase' + if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != 'Budibase/budibase' - name: Use Node.js 14.x uses: actions/setup-node@v3 @@ -146,7 +146,7 @@ jobs: token: ${{ secrets.PERSONAL_ACCESS_TOKEN || github.token }} - name: Checkout repo only uses: actions/checkout@v3 - if: github.event.pull_request.head.repo.full_name != 'Budibase/budibase' + if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != 'Budibase/budibase' - name: Use Node.js 14.x uses: actions/setup-node@v3 From e991a0bd9cc50cfdaf184762491a682448cb74c9 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Mon, 7 Aug 2023 11:26:11 +0000 Subject: [PATCH 29/52] Bump version to 2.8.32 --- lerna.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index 238a2a2192..84d2a24b86 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.8.32-alpha.1", + "version": "2.8.32", "npmClient": "yarn", "packages": [ "packages/*" From 14785ca49ddf158d3f29aca5dc855b609b7e261b Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Mon, 7 Aug 2023 12:36:19 +0100 Subject: [PATCH 30/52] move to info log line --- packages/server/src/threads/automation.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/server/src/threads/automation.ts b/packages/server/src/threads/automation.ts index 7d4a0f1dd1..e06abcb665 100644 --- a/packages/server/src/threads/automation.ts +++ b/packages/server/src/threads/automation.ts @@ -486,8 +486,7 @@ class Orchestrator { const end = performance.now() const executionTime = end - start - console.debug(`[Automation ID]: ${automation._id} completed`) - console.info(`Execution time: ${executionTime} milliseconds`, { + console.info(`Automation ID: ${automation._id} Execution time: ${executionTime} milliseconds`, { _logKey: "automation", executionTime, }) From 768016ce2e234c3be3e5e83ab67458469d391a10 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Mon, 7 Aug 2023 14:36:47 +0300 Subject: [PATCH 31/52] Update docs --- docs/CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 2fb4c36fa8..70f198a84c 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -90,7 +90,7 @@ Component libraries are collections of components as well as the definition of t #### 1. Prerequisites -- NodeJS version `14.x.x` +- NodeJS version `18.x.x` - Python version `3.x` ### Using asdf (recommended) From f6c042ae341e9f24849b8332d6d0c1d4aa082284 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Mon, 7 Aug 2023 14:37:57 +0300 Subject: [PATCH 32/52] Remove hardcoded target in esbuild --- scripts/build.js | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/build.js b/scripts/build.js index b93ae1bbe6..2ca41b5f7d 100755 --- a/scripts/build.js +++ b/scripts/build.js @@ -43,7 +43,6 @@ function runBuild(entry, outfile) { TsconfigPathsPlugin({ tsconfig: tsconfigPathPluginContent }), nodeExternalsPlugin(), ], - target: "node14", preserveSymlinks: true, loader: { ".svelte": "copy", From 12d6911ae390ce6a566862984a3d4c64876db484 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Mon, 7 Aug 2023 14:38:16 +0300 Subject: [PATCH 33/52] Update docker images to 18.x --- hosting/single/Dockerfile | 2 +- packages/server/Dockerfile | 2 +- packages/worker/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hosting/single/Dockerfile b/hosting/single/Dockerfile index e43e5ad10c..6fc1f96d28 100644 --- a/hosting/single/Dockerfile +++ b/hosting/single/Dockerfile @@ -1,4 +1,4 @@ -FROM node:14-slim as build +FROM node:18-slim as build # install node-gyp dependencies RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends apt-utils cron g++ make python diff --git a/packages/server/Dockerfile b/packages/server/Dockerfile index a526538b71..61f064ecfb 100644 --- a/packages/server/Dockerfile +++ b/packages/server/Dockerfile @@ -1,4 +1,4 @@ -FROM node:14-slim +FROM node:18-slim LABEL com.centurylinklabs.watchtower.lifecycle.pre-check="scripts/watchtower-hooks/pre-check.sh" LABEL com.centurylinklabs.watchtower.lifecycle.pre-update="scripts/watchtower-hooks/pre-update.sh" diff --git a/packages/worker/Dockerfile b/packages/worker/Dockerfile index dd98f3b7f8..4230ee86f8 100644 --- a/packages/worker/Dockerfile +++ b/packages/worker/Dockerfile @@ -1,4 +1,4 @@ -FROM node:14-alpine +FROM node:18-alpine LABEL com.centurylinklabs.watchtower.lifecycle.pre-check="scripts/watchtower-hooks/pre-check.sh" LABEL com.centurylinklabs.watchtower.lifecycle.pre-update="scripts/watchtower-hooks/pre-update.sh" From aed1874ef01613348d79f46e57b0dfba68f59bc0 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Mon, 7 Aug 2023 11:51:58 +0000 Subject: [PATCH 34/52] Bump version to 2.9.0 --- lerna.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index 84d2a24b86..15fea034e6 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.8.32", + "version": "2.9.0", "npmClient": "yarn", "packages": [ "packages/*" From b7810f915e89b40020d643738f00d5cb8b9d55d6 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Mon, 7 Aug 2023 12:55:28 +0100 Subject: [PATCH 35/52] fix lint --- packages/server/src/threads/automation.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/server/src/threads/automation.ts b/packages/server/src/threads/automation.ts index e06abcb665..bc0629a939 100644 --- a/packages/server/src/threads/automation.ts +++ b/packages/server/src/threads/automation.ts @@ -486,10 +486,13 @@ class Orchestrator { const end = performance.now() const executionTime = end - start - console.info(`Automation ID: ${automation._id} Execution time: ${executionTime} milliseconds`, { - _logKey: "automation", - executionTime, - }) + console.info( + `Automation ID: ${automation._id} Execution time: ${executionTime} milliseconds`, + { + _logKey: "automation", + executionTime, + } + ) // store the logs for the automation run try { From 9bc008012d983068f476f46da8832ca7bd628129 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Mon, 7 Aug 2023 15:23:12 +0300 Subject: [PATCH 36/52] Update master pipeline to fix the current tag issue --- .github/workflows/release-master.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-master.yml b/.github/workflows/release-master.yml index 7f8b8f1d55..4d836aa9e4 100644 --- a/.github/workflows/release-master.yml +++ b/.github/workflows/release-master.yml @@ -61,8 +61,8 @@ jobs: id: currenttag run: | version=v$(./scripts/getCurrentVersion.sh) - echo 'Using tag $version' - echo "::set-output name=tag::$resversionult" + echo "Using tag $version" + echo "version=$version" >> "$GITHUB_OUTPUT" - name: Build/release Docker images run: | @@ -71,7 +71,7 @@ jobs: env: DOCKER_USER: ${{ secrets.DOCKER_USERNAME }} DOCKER_PASSWORD: ${{ secrets.DOCKER_API_KEY }} - BUDIBASE_RELEASE_VERSION: ${{ steps.currenttag.outputs.tag }} + BUDIBASE_RELEASE_VERSION: ${{ steps.currenttag.outputs.version }} release-helm-chart: needs: [release-images] From 4c9dfb85c81df20e697cf4772b2c35a5dad8052f Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Mon, 7 Aug 2023 12:24:52 +0000 Subject: [PATCH 37/52] Bump version to 2.9.1 --- lerna.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index 15fea034e6..911fd037d1 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.9.0", + "version": "2.9.1", "npmClient": "yarn", "packages": [ "packages/*" From 889face88cb4bd9b6d944b8cdb7f13bb4b8ca40c Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Mon, 7 Aug 2023 14:30:10 +0100 Subject: [PATCH 38/52] remove v from tagging --- .github/workflows/release-master.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-master.yml b/.github/workflows/release-master.yml index 4d836aa9e4..1dae4ae578 100644 --- a/.github/workflows/release-master.yml +++ b/.github/workflows/release-master.yml @@ -60,7 +60,7 @@ jobs: - name: "Get Current tag" id: currenttag run: | - version=v$(./scripts/getCurrentVersion.sh) + version=$(./scripts/getCurrentVersion.sh) echo "Using tag $version" echo "version=$version" >> "$GITHUB_OUTPUT" From e6196e5da63173a87de3608d094a842c628e4e62 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Mon, 7 Aug 2023 13:30:34 +0000 Subject: [PATCH 39/52] Bump version to 2.9.2 --- lerna.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index 911fd037d1..6a55972a43 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.9.1", + "version": "2.9.2", "npmClient": "yarn", "packages": [ "packages/*" From 0049cc74bbc7a10f0b6dc5627530b28cd159419f Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Mon, 7 Aug 2023 13:56:12 +0000 Subject: [PATCH 40/52] Bump version to 2.8.32-alpha.7 --- lerna.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index 8be4ff3061..dc7cabb9fa 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.8.32-alpha.6", + "version": "2.8.32-alpha.7", "npmClient": "yarn", "packages": [ "packages/*" From a2bf1e27fbcbff974432179ca56d2fbe05428a36 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Mon, 7 Aug 2023 15:39:06 +0000 Subject: [PATCH 41/52] Bump version to 2.9.3 --- lerna.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index 6a55972a43..14d17b0909 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.9.2", + "version": "2.9.3", "npmClient": "yarn", "packages": [ "packages/*" From 62b724400a4f7997c8c01de08257b199c2baf74a Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Mon, 7 Aug 2023 15:55:09 +0000 Subject: [PATCH 42/52] Bump version to 2.9.4 --- lerna.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index 14d17b0909..0aaf9376d5 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.9.3", + "version": "2.9.4", "npmClient": "yarn", "packages": [ "packages/*" From 986939b85d4bb186258a370d95931b8a742ffcf9 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Mon, 7 Aug 2023 17:44:44 +0100 Subject: [PATCH 43/52] Fix for DS+ unable to patch rows correctly. --- packages/server/src/api/controllers/row/external.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/server/src/api/controllers/row/external.ts b/packages/server/src/api/controllers/row/external.ts index 802c70b6cb..3ee4ca6edd 100644 --- a/packages/server/src/api/controllers/row/external.ts +++ b/packages/server/src/api/controllers/row/external.ts @@ -44,7 +44,7 @@ export async function handleRequest( export async function patch(ctx: UserCtx) { const tableId = ctx.params.tableId - const { id, ...rowData } = ctx.request.body + const { _id, ...rowData } = ctx.request.body const validateResult = await sdk.rows.utils.validate({ row: rowData, @@ -54,10 +54,10 @@ export async function patch(ctx: UserCtx) { throw { validation: validateResult.errors } } const response = await handleRequest(Operation.UPDATE, tableId, { - id: breakRowIdField(id), + id: breakRowIdField(_id), row: rowData, }) - const row = await sdk.rows.external.getRow(tableId, id, { + const row = await sdk.rows.external.getRow(tableId, _id, { relationships: true, }) const table = await sdk.tables.getTable(tableId) @@ -104,9 +104,9 @@ export async function find(ctx: UserCtx) { export async function destroy(ctx: UserCtx) { const tableId = ctx.params.tableId - const id = ctx.request.body._id + const _id = ctx.request.body._id const { row } = (await handleRequest(Operation.DELETE, tableId, { - id: breakRowIdField(id), + id: breakRowIdField(_id), includeSqlRelationships: IncludeRelationship.EXCLUDE, })) as { row: Row } return { response: { ok: true }, row } From b367c7cbe40fc08e0e0247f42299d5e259d095de Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Mon, 7 Aug 2023 16:59:41 +0000 Subject: [PATCH 44/52] Bump version to 2.9.5 --- lerna.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index 0aaf9376d5..660ac559ab 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.9.4", + "version": "2.9.5", "npmClient": "yarn", "packages": [ "packages/*" From 4d0c7e56e17c5f7917bbde00a38a75f494ead152 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Mon, 7 Aug 2023 19:03:23 +0100 Subject: [PATCH 45/52] Utilising esbuild for the CLI to bundle in backend-core and types as required. --- packages/cli/package.json | 6 +++--- packages/cli/tsconfig.build.json | 7 ++++++- packages/cli/tsconfig.json | 7 +------ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/cli/package.json b/packages/cli/package.json index cb59bf7c69..76780acf30 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -2,16 +2,16 @@ "name": "@budibase/cli", "version": "0.0.0", "description": "Budibase CLI, for developers, self hosting and migrations.", - "main": "dist/src/index.js", + "main": "dist/index.js", "bin": { - "budi": "dist/src/index.js" + "budi": "dist/index.js" }, "author": "Budibase", "license": "GPL-3.0", "scripts": { "prebuild": "rm -rf prebuilds 2> /dev/null && cp -r ../../node_modules/leveldown/prebuilds prebuilds", "rename": "renamer --find .node --replace .fake 'prebuilds/**'", - "tsc": "tsc -p tsconfig.build.json", + "tsc": "node ../../scripts/build.js", "pkg": "pkg . --out-path build --no-bytecode --public --public-packages \"*\" -C GZip", "build": "yarn prebuild && yarn rename && yarn tsc && yarn pkg && yarn postbuild", "check:types": "tsc -p tsconfig.json --noEmit --paths null", diff --git a/packages/cli/tsconfig.build.json b/packages/cli/tsconfig.build.json index 8b2d44aec8..34a89f54c3 100644 --- a/packages/cli/tsconfig.build.json +++ b/packages/cli/tsconfig.build.json @@ -10,7 +10,12 @@ "incremental": true, "types": [ "node", "jest" ], "outDir": "dist", - "skipLibCheck": true + "skipLibCheck": true, + "paths": { + "@budibase/types": ["../types/src"], + "@budibase/backend-core": ["../backend-core/src"], + "@budibase/backend-core/*": ["../backend-core/*"] + } }, "include": [ "src/**/*" diff --git a/packages/cli/tsconfig.json b/packages/cli/tsconfig.json index c2935129a8..6ca641e214 100644 --- a/packages/cli/tsconfig.json +++ b/packages/cli/tsconfig.json @@ -5,12 +5,7 @@ "declaration": true, "sourceMap": true, "baseUrl": ".", - "resolveJsonModule": true, - "paths": { - "@budibase/types": ["../types/src"], - "@budibase/backend-core": ["../backend-core/src"], - "@budibase/backend-core/*": ["../backend-core/*"] - } + "resolveJsonModule": true }, "ts-node": { "require": ["tsconfig-paths/register"], From cb1cec27746f29b441d07df544736a1785087464 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Mon, 7 Aug 2023 20:21:36 +0100 Subject: [PATCH 46/52] Fixing pkg built CLI after using esbuild. --- packages/cli/package.json | 7 +++---- packages/cli/src/prebuilds.ts | 15 +++++++++------ 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/packages/cli/package.json b/packages/cli/package.json index 76780acf30..99771adbd3 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -19,12 +19,11 @@ }, "pkg": { "targets": [ - "node16-linux", - "node16-win", - "node16-macos" + "node18-linux", + "node18-win", + "node18-macos" ], "assets": [ - "node_modules/@budibase/backend-core/dist/**/*", "prebuilds/**/*" ], "outputPath": "build" diff --git a/packages/cli/src/prebuilds.ts b/packages/cli/src/prebuilds.ts index 17e084160a..21f3042274 100644 --- a/packages/cli/src/prebuilds.ts +++ b/packages/cli/src/prebuilds.ts @@ -5,7 +5,7 @@ import { error } from "./utils" const PREBUILDS = "prebuilds" const ARCH = `${os.platform()}-${os.arch()}` -const PREBUILD_DIR = join(process.execPath, "..", PREBUILDS, ARCH) +const PREBUILD_DIR = join(process.execPath, "..", "cli", PREBUILDS, ARCH) // running as built CLI pkg bundle if (!process.argv[0].includes("node")) { @@ -13,17 +13,19 @@ if (!process.argv[0].includes("node")) { } function checkForBinaries() { - const readDir = join(__filename, "..", "..", "..", PREBUILDS, ARCH) + const readDir = join(__filename, "..", "..", "..", "cli", PREBUILDS, ARCH) if (fs.existsSync(PREBUILD_DIR) || !fs.existsSync(readDir)) { return } const natives = fs.readdirSync(readDir) if (fs.existsSync(readDir)) { - fs.mkdirSync(PREBUILD_DIR, { recursive: true }) + const writePath = join(process.execPath, PREBUILDS, ARCH) + fs.mkdirSync(writePath, { recursive: true }) for (let native of natives) { const filename = `${native.split(".fake")[0]}.node` - fs.cpSync(join(readDir, native), join(PREBUILD_DIR, filename)) + fs.cpSync(join(readDir, native), join(writePath, filename)) } + console.log("copied something") } } @@ -39,8 +41,9 @@ function cleanup(evt?: number) { ) console.error(error(evt)) } - if (fs.existsSync(PREBUILD_DIR)) { - fs.rmSync(PREBUILD_DIR, { recursive: true }) + const path = join(process.execPath, PREBUILDS) + if (fs.existsSync(path)) { + fs.rmSync(path, { recursive: true }) } } From 3a99f6baa66b420c632d22d7b8e225e25aeb7183 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Mon, 7 Aug 2023 19:35:14 +0000 Subject: [PATCH 47/52] Bump version to 2.9.6 --- lerna.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index 660ac559ab..f580610019 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.9.5", + "version": "2.9.6", "npmClient": "yarn", "packages": [ "packages/*" From ad882b6685c5c751caa74c459983feecf1c09bef Mon Sep 17 00:00:00 2001 From: Michael Drury Date: Mon, 7 Aug 2023 21:06:40 +0100 Subject: [PATCH 48/52] Running the releases in parallel causes the old architecture tag that was released to be overwritten, meaning we only end up with a single release. --- .github/workflows/release-singleimage.yml | 78 +---------------------- 1 file changed, 2 insertions(+), 76 deletions(-) diff --git a/.github/workflows/release-singleimage.yml b/.github/workflows/release-singleimage.yml index 5b75c20d29..1f4a2d0b32 100644 --- a/.github/workflows/release-singleimage.yml +++ b/.github/workflows/release-singleimage.yml @@ -8,7 +8,7 @@ env: PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} REGISTRY_URL: registry.hub.docker.com jobs: - build-amd64: + build-amd64-arm64: name: "build-amd64" runs-on: ubuntu-latest strategy: @@ -68,81 +68,7 @@ jobs: with: context: . push: true - platforms: linux/amd64 - tags: budibase/budibase,budibase/budibase:v${{ env.RELEASE_VERSION }} - file: ./hosting/single/Dockerfile - - - name: Tag and release Budibase Azure App Service docker image - uses: docker/build-push-action@v2 - with: - context: . - push: true - platforms: linux/amd64 - build-args: TARGETBUILD=aas - tags: budibase/budibase-aas,budibase/budibase-aas:v${{ env.RELEASE_VERSION }} - file: ./hosting/single/Dockerfile - - build-arm64: - name: "build-arm64" - runs-on: ubuntu-latest - strategy: - matrix: - node-version: [14.x] - steps: - - name: Fail if not a tag - run: | - if [[ $GITHUB_REF != refs/tags/* ]]; then - echo "Workflow Dispatch can only be run on tags" - exit 1 - fi - - name: "Checkout" - uses: actions/checkout@v2 - with: - submodules: true - token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} - fetch-depth: 0 - - name: Fail if tag is not in master - run: | - if ! git merge-base --is-ancestor ${{ github.sha }} origin/master; then - echo "Tag is not in master. This pipeline can only execute tags that are present on the master branch" - exit 1 - fi - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - name: Setup QEMU - uses: docker/setup-qemu-action@v1 - - name: Setup Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v1 - - name: Run Yarn - run: yarn - - name: Update versions - run: ./scripts/updateVersions.sh - - name: Runt Yarn Lint - run: yarn lint - - name: Update versions - run: ./scripts/updateVersions.sh - - name: Run Yarn Build - run: yarn build:docker:pre - - name: Login to Docker Hub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_API_KEY }} - - name: Get the latest release version - id: version - run: | - release_version=$(cat lerna.json | jq -r '.version') - echo $release_version - echo "RELEASE_VERSION=$release_version" >> $GITHUB_ENV - - name: Tag and release Budibase service docker image - uses: docker/build-push-action@v2 - with: - context: . - push: true - platforms: linux/arm64 + platforms: linux/amd64,linux/arm64 tags: budibase/budibase,budibase/budibase:v${{ env.RELEASE_VERSION }} file: ./hosting/single/Dockerfile From 2e4e55e2cfa5532a95e65faf8f19fd21840be972 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Mon, 7 Aug 2023 20:30:10 +0000 Subject: [PATCH 49/52] Bump version to 2.9.7 --- lerna.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index f580610019..86af55741a 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.9.6", + "version": "2.9.7", "npmClient": "yarn", "packages": [ "packages/*" From f6c992964e3229b6f1d11f96c64e900b4fd3238b Mon Sep 17 00:00:00 2001 From: Michael Drury Date: Mon, 7 Aug 2023 21:31:55 +0100 Subject: [PATCH 50/52] Fixing issue with CLI build, removing some old cjs exports that shouldn't be there. --- packages/cli/src/exec.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/cli/src/exec.ts b/packages/cli/src/exec.ts index b121ca0e03..fb84d4fd0f 100644 --- a/packages/cli/src/exec.ts +++ b/packages/cli/src/exec.ts @@ -1,5 +1,6 @@ import util from "util" -const runCommand = util.promisify(require("child_process").exec) +import childProcess from "child_process" +const runCommand = util.promisify(childProcess.exec) export async function exec(command: string, dir = "./") { const { stdout } = await runCommand(command, { cwd: dir }) @@ -16,12 +17,12 @@ export async function utilityInstalled(utilName: string) { } export async function runPkgCommand(command: string, dir = "./") { - const yarn = await exports.utilityInstalled("yarn") - const npm = await exports.utilityInstalled("npm") + const yarn = await utilityInstalled("yarn") + const npm = await utilityInstalled("npm") if (!yarn && !npm) { throw new Error("Must have yarn or npm installed to run build.") } const npmCmd = command === "install" ? `npm ${command}` : `npm run ${command}` const cmd = yarn ? `yarn ${command} --ignore-engines` : npmCmd - await exports.exec(cmd, dir) + await exec(cmd, dir) } From 07a28fc284c4f1b26730d4bcf74d0a96faa84e99 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Mon, 7 Aug 2023 20:33:14 +0000 Subject: [PATCH 51/52] Bump version to 2.9.8-alpha.0 --- lerna.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lerna.json b/lerna.json index 0d412b0cbc..9640694d79 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.9.7", + "version": "2.9.8-alpha.0", "npmClient": "yarn", "packages": [ "packages/*" @@ -19,4 +19,4 @@ "loadEnvFiles": false } } -} +} \ No newline at end of file From 51f086030012f74d08f73879ccde797db097d531 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Tue, 8 Aug 2023 08:12:18 +0000 Subject: [PATCH 52/52] Bump version to 2.9.8-alpha.1 --- lerna.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index 9640694d79..0d8ae345e8 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.9.8-alpha.0", + "version": "2.9.8-alpha.1", "npmClient": "yarn", "packages": [ "packages/*"