From cbfc22d7f90f9468793872c52b153abe0cc83051 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 20 Jul 2026 10:45:48 +0000 Subject: [PATCH 1/3] feat(apps-engine): default runtime backend to node Swap the default apps-engine runtime backend from deno to node so the node runtime is exercised by the standard API test suite. The deno runtime can still be selected via APPS_ENGINE_RUNTIME_BACKEND='deno'. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01QzzSPVtd9ZcpaezJQtw6mm --- .changeset/apps-engine-runtime-default-node.md | 6 ++++++ packages/apps/src/server/managers/AppRuntimeManager.ts | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 .changeset/apps-engine-runtime-default-node.md diff --git a/.changeset/apps-engine-runtime-default-node.md b/.changeset/apps-engine-runtime-default-node.md new file mode 100644 index 0000000000000..3cdddc9415377 --- /dev/null +++ b/.changeset/apps-engine-runtime-default-node.md @@ -0,0 +1,6 @@ +--- +'@rocket.chat/apps': minor +'@rocket.chat/meteor': minor +--- + +Changes the default apps-engine runtime backend from `deno` to `node`. The previous behavior can be restored by setting the environment variable `APPS_ENGINE_RUNTIME_BACKEND='deno'` diff --git a/packages/apps/src/server/managers/AppRuntimeManager.ts b/packages/apps/src/server/managers/AppRuntimeManager.ts index 3539f80148121..99c16b9e90027 100644 --- a/packages/apps/src/server/managers/AppRuntimeManager.ts +++ b/packages/apps/src/server/managers/AppRuntimeManager.ts @@ -19,7 +19,7 @@ export type ExecRequestOptions = { timeout?: number; }; -const { APPS_ENGINE_RUNTIME_BACKEND = 'deno' } = process.env; +const { APPS_ENGINE_RUNTIME_BACKEND = 'node' } = process.env; export const nodeRuntimeFactory = (manager: AppManager, appPackage: IParseAppPackageResult, storageItem: IAppStorageItem) => new NodeRuntimeSubprocessController(manager, appPackage, storageItem); @@ -27,7 +27,7 @@ export const nodeRuntimeFactory = (manager: AppManager, appPackage: IParseAppPac export const denoRuntimeFactory = (manager: AppManager, appPackage: IParseAppPackageResult, storageItem: IAppStorageItem) => new DenoRuntimeSubprocessController(manager, appPackage, storageItem); -const defaultRuntimeFactory = APPS_ENGINE_RUNTIME_BACKEND === 'node' ? nodeRuntimeFactory : denoRuntimeFactory; +const defaultRuntimeFactory = APPS_ENGINE_RUNTIME_BACKEND === 'deno' ? denoRuntimeFactory : nodeRuntimeFactory; export class AppRuntimeManager { private readonly subprocesses: Record = {}; From d5b628f9072320386ea015b3346857f184d321d4 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 20 Jul 2026 10:46:52 +0000 Subject: [PATCH 2/3] ci: repurpose dedicated apps runtime job to test deno instead of node Now that node is the default apps-engine runtime backend (covered by the standard API test suite), the dedicated job explicitly exercises the non-default deno runtime. NOTE: this commit only touches .github/workflows/ and cannot be pushed by this session (the GitHub OAuth App lacks the 'workflow' scope). It is kept locally so it can be pushed once workflow scope is granted. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01QzzSPVtd9ZcpaezJQtw6mm --- .github/workflows/ci-test-e2e.yml | 6 +++--- .github/workflows/ci.yml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci-test-e2e.yml b/.github/workflows/ci-test-e2e.yml index 6f44816ac03e5..824efe276fb7f 100644 --- a/.github/workflows/ci-test-e2e.yml +++ b/.github/workflows/ci-test-e2e.yml @@ -207,7 +207,7 @@ jobs: TRANSPORTER: ${{ inputs.transporter }} COMPOSE_PROFILES: ${{ inputs.type == 'api' && 'api' || '' }} TEST_MODE: ${{ startsWith(inputs.type, 'api') && 'api' || 'true' }} - APPS_ENGINE_RUNTIME_BACKEND: ${{ inputs.type == 'api-apps-node' && 'node' || '' }} + APPS_ENGINE_RUNTIME_BACKEND: ${{ inputs.type == 'api-apps-deno' && 'deno' || '' }} FIPS_OVERRIDE: ${{ inputs.fips && '-f docker-compose-ci.fips.yml' || '' }} run: | read -r -a fips_override <<< "$FIPS_OVERRIDE" @@ -247,8 +247,8 @@ jobs: exit "${s:-0}" # This step should be temporary, only here until we remove the deno-runtime - - name: E2E Test API (apps + node-runtime) - if: (inputs.type == 'api-apps-node' && inputs.release == 'ee') + - name: E2E Test API (apps + deno-runtime) + if: (inputs.type == 'api-apps-deno' && inputs.release == 'ee') working-directory: ./apps/meteor env: WEBHOOK_TEST_URL: 'http://httpbin' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6e9c8f6a47893..024ca5c15e464 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -711,13 +711,13 @@ jobs: CR_PAT: ${{ secrets.CR_PAT }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - test-api-apps-node-ee: - name: 🔨 Test API Apps (node-runtime - EE) + test-api-apps-deno-ee: + name: 🔨 Test API Apps (deno-runtime - EE) needs: [checks, build-gh-docker-publish, release-versions] uses: ./.github/workflows/ci-test-e2e.yml with: - type: api-apps-node + type: api-apps-deno release: ee transporter: 'nats://nats:4222' enterprise-license: ${{ needs.release-versions.outputs.enterprise-license }} From f29822f568a59795d3606378d984d0681cc45562 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 27 Jul 2026 17:18:24 +0000 Subject: [PATCH 3/3] ci: update tests-done references to renamed deno apps job The tests-done aggregation job still referenced the old test-api-apps-node-ee job in its needs array and result check, which no longer exists after the rename to test-api-apps-deno-ee. Point both at the new job id so the workflow resolves. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01QzzSPVtd9ZcpaezJQtw6mm --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 024ca5c15e464..2c270d8d5ea1a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -985,7 +985,7 @@ jobs: tests-done: name: ✅ Tests Done runs-on: ubuntu-24.04-arm - needs: [test-guard, checks, test-unit, test-api, test-ui, test-api-ee, test-ui-ee, test-api-livechat, test-api-livechat-ee, test-api-apps-node-ee, test-api-fips, test-api-livechat-fips, test-ui-fips, test-federation-matrix] + needs: [test-guard, checks, test-unit, test-api, test-ui, test-api-ee, test-ui-ee, test-api-livechat, test-api-livechat-ee, test-api-apps-deno-ee, test-api-fips, test-api-livechat-fips, test-ui-fips, test-federation-matrix] if: always() && needs.test-guard.outputs.skip-tests != 'true' steps: - name: Test finish aggregation @@ -1022,7 +1022,7 @@ jobs: exit 1 fi - if [[ '${{ needs.test-api-apps-node-ee.result }}' != 'success' ]]; then + if [[ '${{ needs.test-api-apps-deno-ee.result }}' != 'success' ]]; then exit 1 fi