Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/apps-engine-runtime-default-node.md
Original file line number Diff line number Diff line change
@@ -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'`
6 changes: 3 additions & 3 deletions .github/workflows/ci-test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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'
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Comment thread
cubic-dev-ai[bot] marked this conversation as resolved.
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 }}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions packages/apps/src/server/managers/AppRuntimeManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ 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);

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<string, IRuntimeController> = {};
Expand Down
Loading