Skip to content

Commit b27e38c

Browse files
authored
chore(apps): swap default runtime backend from deno to node (#41474)
1 parent 1d2bfd7 commit b27e38c

4 files changed

Lines changed: 16 additions & 10 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@rocket.chat/apps': minor
3+
'@rocket.chat/meteor': minor
4+
---
5+
6+
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'`

.github/workflows/ci-test-e2e.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ jobs:
207207
TRANSPORTER: ${{ inputs.transporter }}
208208
COMPOSE_PROFILES: ${{ inputs.type == 'api' && 'api' || '' }}
209209
TEST_MODE: ${{ startsWith(inputs.type, 'api') && 'api' || 'true' }}
210-
APPS_ENGINE_RUNTIME_BACKEND: ${{ inputs.type == 'api-apps-node' && 'node' || '' }}
210+
APPS_ENGINE_RUNTIME_BACKEND: ${{ inputs.type == 'api-apps-deno' && 'deno' || '' }}
211211
FIPS_OVERRIDE: ${{ inputs.fips && '-f docker-compose-ci.fips.yml' || '' }}
212212
run: |
213213
read -r -a fips_override <<< "$FIPS_OVERRIDE"
@@ -247,8 +247,8 @@ jobs:
247247
exit "${s:-0}"
248248
249249
# This step should be temporary, only here until we remove the deno-runtime
250-
- name: E2E Test API (apps + node-runtime)
251-
if: (inputs.type == 'api-apps-node' && inputs.release == 'ee')
250+
- name: E2E Test API (apps + deno-runtime)
251+
if: (inputs.type == 'api-apps-deno' && inputs.release == 'ee')
252252
working-directory: ./apps/meteor
253253
env:
254254
WEBHOOK_TEST_URL: 'http://httpbin'

.github/workflows/ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -711,13 +711,13 @@ jobs:
711711
CR_PAT: ${{ secrets.CR_PAT }}
712712
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
713713

714-
test-api-apps-node-ee:
715-
name: 🔨 Test API Apps (node-runtime - EE)
714+
test-api-apps-deno-ee:
715+
name: 🔨 Test API Apps (deno-runtime - EE)
716716
needs: [checks, build-gh-docker-publish, release-versions]
717717

718718
uses: ./.github/workflows/ci-test-e2e.yml
719719
with:
720-
type: api-apps-node
720+
type: api-apps-deno
721721
release: ee
722722
transporter: 'nats://nats:4222'
723723
enterprise-license: ${{ needs.release-versions.outputs.enterprise-license }}
@@ -985,7 +985,7 @@ jobs:
985985
tests-done:
986986
name: ✅ Tests Done
987987
runs-on: ubuntu-24.04-arm
988-
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]
988+
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]
989989
if: always() && needs.test-guard.outputs.skip-tests != 'true'
990990
steps:
991991
- name: Test finish aggregation
@@ -1022,7 +1022,7 @@ jobs:
10221022
exit 1
10231023
fi
10241024
1025-
if [[ '${{ needs.test-api-apps-node-ee.result }}' != 'success' ]]; then
1025+
if [[ '${{ needs.test-api-apps-deno-ee.result }}' != 'success' ]]; then
10261026
exit 1
10271027
fi
10281028

packages/apps/src/server/managers/AppRuntimeManager.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ export type ExecRequestOptions = {
1919
timeout?: number;
2020
};
2121

22-
const { APPS_ENGINE_RUNTIME_BACKEND = 'deno' } = process.env;
22+
const { APPS_ENGINE_RUNTIME_BACKEND = 'node' } = process.env;
2323

2424
export const nodeRuntimeFactory = (manager: AppManager, appPackage: IParseAppPackageResult, storageItem: IAppStorageItem) =>
2525
new NodeRuntimeSubprocessController(manager, appPackage, storageItem);
2626

2727
export const denoRuntimeFactory = (manager: AppManager, appPackage: IParseAppPackageResult, storageItem: IAppStorageItem) =>
2828
new DenoRuntimeSubprocessController(manager, appPackage, storageItem);
2929

30-
const defaultRuntimeFactory = APPS_ENGINE_RUNTIME_BACKEND === 'node' ? nodeRuntimeFactory : denoRuntimeFactory;
30+
const defaultRuntimeFactory = APPS_ENGINE_RUNTIME_BACKEND === 'deno' ? denoRuntimeFactory : nodeRuntimeFactory;
3131

3232
export class AppRuntimeManager {
3333
private readonly subprocesses: Record<string, IRuntimeController> = {};

0 commit comments

Comments
 (0)