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/.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..2c270d8d5ea1a 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 }} @@ -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 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 = {};