From c1301804d4d52b577090b38b733175878abc32c4 Mon Sep 17 00:00:00 2001 From: Nelson Chan <3271800+chakflying@users.noreply.github.com> Date: Sun, 31 Mar 2024 10:33:59 +0800 Subject: [PATCH 1/2] Fix: Fix CI on Windows Runner [1.23.X] (#4633) --- .github/workflows/auto-test.yml | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/.github/workflows/auto-test.yml b/.github/workflows/auto-test.yml index 42d17993..071cc7df 100644 --- a/.github/workflows/auto-test.yml +++ b/.github/workflows/auto-test.yml @@ -22,7 +22,7 @@ jobs: strategy: matrix: os: [macos-latest, ubuntu-latest, windows-latest, ARM64] - node: [ 14, 20 ] + node: [ 16, 20.5 ] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: @@ -33,8 +33,7 @@ jobs: uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} - - run: npm install npm@9 -g - - run: npm install + - run: npm ci - run: npm run build - run: npm test env: @@ -50,7 +49,7 @@ jobs: strategy: matrix: os: [ ARMv7 ] - node: [ 14, 20 ] + node: [ 16, 20.5 ] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: @@ -61,7 +60,6 @@ jobs: uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} - - run: npm install npm@9 -g - run: npm ci --production check-linters: @@ -71,11 +69,11 @@ jobs: - run: git config --global core.autocrlf false # Mainly for Windows - uses: actions/checkout@v4 - - name: Use Node.js 14 + - name: Use Node.js 20 uses: actions/setup-node@v4 with: - node-version: 14 - - run: npm install + node-version: 20.5 + - run: npm ci - run: npm run lint:prod e2e-tests: @@ -85,11 +83,11 @@ jobs: - run: git config --global core.autocrlf false # Mainly for Windows - uses: actions/checkout@v4 - - name: Use Node.js 14 + - name: Use Node.js 16 uses: actions/setup-node@v4 with: - node-version: 14 - - run: npm install + node-version: 16 + - run: npm ci - run: npm run build - run: npm run cy:test @@ -100,10 +98,10 @@ jobs: - run: git config --global core.autocrlf false # Mainly for Windows - uses: actions/checkout@v4 - - name: Use Node.js 14 + - name: Use Node.js 16 uses: actions/setup-node@v4 with: - node-version: 14 - - run: npm install + node-version: 16 + - run: npm ci - run: npm run build - run: npm run cy:run:unit From ee7f8680c18a19f81bdba5134c57223fce0d364d Mon Sep 17 00:00:00 2001 From: Nelson Chan <3271800+chakflying@users.noreply.github.com> Date: Sun, 31 Mar 2024 12:05:38 +0800 Subject: [PATCH 2/2] Fix: Add missing FK for monitor-tls-info table [1.23.X] (#4631) --- db/patch-monitor-tls-info-add-fk.sql | 18 ++++++++++++++++++ server/database.js | 1 + 2 files changed, 19 insertions(+) create mode 100644 db/patch-monitor-tls-info-add-fk.sql diff --git a/db/patch-monitor-tls-info-add-fk.sql b/db/patch-monitor-tls-info-add-fk.sql new file mode 100644 index 00000000..9b9c2d2c --- /dev/null +++ b/db/patch-monitor-tls-info-add-fk.sql @@ -0,0 +1,18 @@ +BEGIN TRANSACTION; + +PRAGMA writable_schema = TRUE; + +UPDATE + SQLITE_MASTER +SET + sql = replace(sql, + 'monitor_id INTEGER NOT NULL', + 'monitor_id INTEGER NOT NULL REFERENCES [monitor] ([id]) ON DELETE CASCADE ON UPDATE CASCADE' +) +WHERE + name = 'monitor_tls_info' + AND type = 'table'; + +PRAGMA writable_schema = RESET; + +COMMIT; diff --git a/server/database.js b/server/database.js index 07a43a81..d31423c7 100644 --- a/server/database.js +++ b/server/database.js @@ -84,6 +84,7 @@ class Database { "patch-notification-config.sql": true, "patch-fix-kafka-producer-booleans.sql": true, "patch-timeout.sql": true, + "patch-monitor-tls-info-add-fk.sql": true, }; /**