Skip to content

Commit

Permalink
Merge branch 'feat/airgapped-restrictions' of github.com:RocketChat/R…
Browse files Browse the repository at this point in the history
…ocket.Chat into airgapped/composer-restriction

* 'feat/airgapped-restrictions' of github.com:RocketChat/Rocket.Chat: (27 commits)
  review
  fix: skip invalid test for now
  consolidate restriction logic inside module
  remove constant from restriction module
  fix changeset
  Move tests to test folder
  remove wrong import
  fix proxyquire for airGappedRestrictionsCheck.ts
  test fix
  fix: Async E2EE key exchange not working on develop (#33378)
  Fix airgappedRestrictionswrapper tests
  Fix airgappedRestrictionCheck tests
  undo
  fix AirGappedRestriction logic
  Update logic and tests
  chore: Move Apps-Engine to monorepo (#32951)
  chore(Sidepanel): uses only local channels and discussions (#33387)
  chore: add gazzodown preview (#33279)
  wip
  fix: Avoid notifying `watch.settings` on uncaught errors (#33376)
  ...
  • Loading branch information
gabriellsh committed Oct 2, 2024
2 parents ef606da + 0beb0f3 commit cdf523c
Show file tree
Hide file tree
Showing 675 changed files with 36,075 additions and 483 deletions.
5 changes: 5 additions & 0 deletions .changeset/dry-taxis-cry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': patch
---

Fixes a race condition that causes livechat conversations to get stuck in the agent's sidebar panel after being forwarded.
7 changes: 7 additions & 0 deletions .changeset/little-gifts-do.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@rocket.chat/meteor": major
"@rocket.chat/i18n": major
"@rocket.chat/license": major
---

Adds restrictions to air-gapped environments without a license
5 changes: 5 additions & 0 deletions .changeset/witty-apples-pretend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rocket.chat/meteor": patch
---

Fixes async E2EE key exchange in development environments where change streams are no longer used
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/packages/* @RocketChat/Architecture
/packages/apps-engine/ @RocketChat/apps
/packages/core-typings/ @RocketChat/Architecture
/packages/rest-typings/ @RocketChat/Architecture @RocketChat/backend
/packages/ui-contexts/ @RocketChat/frontend
Expand Down
5 changes: 4 additions & 1 deletion .github/actions/build-docker-image/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ inputs:
required: false
password:
required: false
deno-version:
required: true
type: string

outputs:
image-name:
Expand Down Expand Up @@ -59,7 +62,7 @@ runs:
fi;
echo "Build ${{ inputs.release }} Docker image"
docker build -t $IMAGE_NAME .
docker build --build-arg DENO_VERSION=${{ inputs.deno-version }} -t $IMAGE_NAME .
echo "image-name-base=${IMAGE_NAME_BASE}" >> $GITHUB_OUTPUT
echo "image-name=${IMAGE_NAME}" >> $GITHUB_OUTPUT
Expand Down
7 changes: 7 additions & 0 deletions .github/actions/build-docker/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ inputs:
required: true
description: 'Node version'
type: string
deno-version:
required: true
description: 'Deno version'
type: string
platform:
required: false
description: 'Platform'
Expand Down Expand Up @@ -66,6 +70,7 @@ runs:
if: inputs.setup == 'true'
with:
node-version: ${{ inputs.node-version }}
deno-version: ${{ inputs.deno-version }}
cache-modules: true
install: true
NPM_TOKEN: ${{ inputs.NPM_TOKEN }}
Expand All @@ -79,6 +84,8 @@ runs:
run: |
args=(rocketchat ${{ inputs.build-containers }})
export DENO_VERSION="${{ inputs.deno-version }}"
docker compose -f docker-compose-ci.yml build "${args[@]}"
- name: Publish Docker images to GitHub Container Registry
Expand Down
5 changes: 5 additions & 0 deletions .github/actions/meteor-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ inputs:
NPM_TOKEN:
required: false
description: 'NPM token'
deno-version:
required: true
description: 'Deno version'
type: string

runs:
using: composite
Expand All @@ -30,6 +34,7 @@ runs:
uses: ./.github/actions/setup-node
with:
node-version: ${{ inputs.node-version }}
deno-version: ${{ inputs.deno-version }}
cache-modules: true
install: true
NPM_TOKEN: ${{ inputs.NPM_TOKEN }}
Expand Down
25 changes: 15 additions & 10 deletions .github/actions/setup-node/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ inputs:
install:
required: false
description: 'Install dependencies'
deno-dir:
required: false
description: 'Deno directory'
default: ~/.deno-cache
type: boolean
deno-version:
required: true
description: 'Deno version'
type: string
NPM_TOKEN:
required: false
description: 'NPM token'
Expand All @@ -28,21 +29,20 @@ runs:
using: composite

steps:
- run: echo 'DENO_DIR=${{ inputs.deno-dir }}' >> $GITHUB_ENV
shell: bash

- name: Cache Node Modules
- name: Cache Node Modules & Deno
if: inputs.cache-modules
id: cache-node-modules
uses: actions/cache@v3
with:
# We need to cache node_modules for all workspaces with "hoistingLimits" defined
path: |
.turbo/cache
node_modules
${{ env.DENO_DIR }}
apps/meteor/node_modules
apps/meteor/ee/server/services/node_modules
key: node-modules-${{ hashFiles('yarn.lock') }}
packages/apps-engine/node_modules
packages/apps-engine/.deno-cache
key: node-modules-${{ hashFiles('yarn.lock') }}-deno-${{ hashFiles('packages/apps-engine/deno-runtime/deno.lock') }}
#
# Could use this command to list all paths to save:
# find . -name 'node_modules' -prune | grep -v "/\.meteor/" | grep -v "/meteor/packages/"
Expand All @@ -54,6 +54,11 @@ runs:
node-version: ${{ inputs.node-version }}
cache: 'yarn'

- name: Use Deno ${{ inputs.deno-version }}
uses: denoland/setup-deno@v1
with:
deno-version: ${{ inputs.deno-version }}

- name: yarn login
shell: bash
if: inputs.NPM_TOKEN
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/ci-code-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
node-version:
required: true
type: string
deno-version:
required: true
type: string

env:
TOOL_NODE_FLAGS: ${{ vars.TOOL_NODE_FLAGS }}
Expand Down Expand Up @@ -33,6 +36,7 @@ jobs:
uses: ./.github/actions/setup-node
with:
node-version: ${{ inputs.node-version }}
deno-version: ${{ inputs.deno-version }}
cache-modules: true
install: true
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci-deploy-gh-pages-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
if: github.event.action != 'closed'
with:
node-version: 14.21.3
deno-version: 1.37.1
cache-modules: true
install: true

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci-deploy-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
uses: ./.github/actions/setup-node
with:
node-version: 14.21.3
deno-version: 1.37.1
cache-modules: true
install: true

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/ci-test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
node-version:
required: true
type: string
deno-version:
required: true
type: string
lowercase-repo:
required: true
type: string
Expand Down Expand Up @@ -128,6 +131,7 @@ jobs:
uses: ./.github/actions/setup-node
with:
node-version: ${{ inputs.node-version }}
deno-version: ${{ inputs.deno-version }}
cache-modules: true
install: true
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/ci-test-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
node-version:
required: true
type: string
deno-version:
required: true
type: string
enterprise-license:
required: false
type: string
Expand Down Expand Up @@ -37,6 +40,7 @@ jobs:
uses: ./.github/actions/setup-node
with:
node-version: ${{ inputs.node-version }}
deno-version: ${{ inputs.deno-version }}
cache-modules: true
install: true
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
rc-dockerfile-alpine: '${{ github.workspace }}/apps/meteor/.docker/Dockerfile.alpine'
rc-docker-tag-alpine: '${{ steps.docker.outputs.gh-docker-tag }}.alpine'
node-version: ${{ steps.var.outputs.node-version }}
deno-version: ${{ steps.var.outputs.deno-version }}
# this is 100% intentional, secrets are not available for forks, so ee-tests will always fail
# to avoid this, we are using a dummy license, expiring at 2025-06-31
enterprise-license: X/XumwIkgwQuld0alWKt37lVA90XjKOrfiMvMZ0/RtqsMtrdL9GoAk+4jXnaY1b2ePoG7XSzGhuxEDxFKIWJK3hIKGNTvrd980LgH5sM5+1T4P42ivSpd8UZi0bwjJkCFLIu9RozzYwslGG0IehMxe0S6VjcO0UYlUJtbMCBHuR2WmTAmO6YVU3ln+pZCbrPFaTPSS1RovhKaNCNkZwIx/CLWW8UTXUuFV/ML4PbKKVoa5nvvJwPeatgL7UCnlSD90lfCiiuikpzj/Y/JLkIL6velFbwNxsrxg9iRJ2k0sKheMMSmlTiGzSvZUm+na5WQq91aKGncih+DmaEZA7QGrjp4eoA0dqTk6OmItsy0fHmQhvZIOKNMeO7vNQiLbaSV6rqibrzu7WPpeIvsvL57T1h37USoCSB6+jDqkzdfoqIpz8BxTiJDj1d8xGPJFVrgxoqQqkj9qIP/gCaEz5DF39QFv5sovk4yK2O8fEQYod2d14V9yECYl4szZPMk1IBfCAC2w7czWGHHFonhL+CQGT403y5wmDmnsnjlCqMKF72odqfTPTI8XnCvJDriPMWohnQEAGtTTyciAhNokx/mjAVJ4NeZPcsbm4BjhvJvnjxx/BhYhBBTNWPaCSZzocfrGUj9Z+ZA7BEz+xAFQyGDx3xRzqIXfT0G7w8fvgYJMU=
Expand All @@ -39,6 +40,7 @@ jobs:
with:
sparse-checkout: |
package.json
.tool-versions
sparse-checkout-cone-mode: false
ref: ${{ github.ref }}

Expand All @@ -53,6 +55,10 @@ jobs:
echo "NODE_VERSION: ${NODE_VERSION}"
echo "node-version=${NODE_VERSION}" >> $GITHUB_OUTPUT
DENO_VERSION=$(awk '$1=="deno"{ print $2 }' .tool-versions)
echo "DENO_VERSION: ${DENO_VERSION}"
echo "deno-version=${DENO_VERSION}" >> $GITHUB_OUTPUT
- id: by-tag
run: |
if echo "$GITHUB_REF_NAME" | grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+$' ; then
Expand Down Expand Up @@ -150,6 +156,7 @@ jobs:
uses: ./.github/actions/setup-node
with:
node-version: ${{ needs.release-versions.outputs.node-version }}
deno-version: ${{ needs.release-versions.outputs.deno-version }}
cache-modules: true
install: true
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down Expand Up @@ -194,6 +201,7 @@ jobs:
- uses: ./.github/actions/meteor-build
with:
node-version: ${{ needs.release-versions.outputs.node-version }}
deno-version: ${{ needs.release-versions.outputs.deno-version }}
coverage: ${{ github.event_name != 'release' }}

build-prod:
Expand Down Expand Up @@ -224,6 +232,7 @@ jobs:
- uses: ./.github/actions/meteor-build
with:
node-version: ${{ needs.release-versions.outputs.node-version }}
deno-version: ${{ needs.release-versions.outputs.deno-version }}
coverage: ${{ github.event_name != 'release' }}

build-gh-docker-coverage:
Expand Down Expand Up @@ -252,6 +261,7 @@ jobs:
CR_USER: ${{ secrets.CR_USER }}
CR_PAT: ${{ secrets.CR_PAT }}
node-version: ${{ needs.release-versions.outputs.node-version }}
deno-version: ${{ needs.release-versions.outputs.deno-version }}
platform: ${{ matrix.platform }}
build-containers: ${{ matrix.platform == 'alpine' && 'authorization-service account-service ddp-streamer-service presence-service stream-hub-service queue-worker-service omnichannel-transcript-service' || '' }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down Expand Up @@ -280,6 +290,7 @@ jobs:
CR_USER: ${{ secrets.CR_USER }}
CR_PAT: ${{ secrets.CR_PAT }}
node-version: ${{ needs.release-versions.outputs.node-version }}
deno-version: ${{ needs.release-versions.outputs.deno-version }}
platform: ${{ matrix.platform }}
build-containers: ${{ matrix.platform == 'alpine' && 'authorization-service account-service ddp-streamer-service presence-service stream-hub-service queue-worker-service omnichannel-transcript-service' || '' }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand All @@ -300,6 +311,7 @@ jobs:
uses: ./.github/workflows/ci-code-check.yml
with:
node-version: ${{ needs.release-versions.outputs.node-version }}
deno-version: ${{ needs.release-versions.outputs.deno-version }}

test-unit:
name: 🔨 Test Unit
Expand All @@ -308,6 +320,7 @@ jobs:
uses: ./.github/workflows/ci-test-unit.yml
with:
node-version: ${{ needs.release-versions.outputs.node-version }}
deno-version: ${{ needs.release-versions.outputs.deno-version }}
enterprise-license: ${{ needs.release-versions.outputs.enterprise-license }}
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
Expand All @@ -321,6 +334,7 @@ jobs:
type: api
release: ce
node-version: ${{ needs.release-versions.outputs.node-version }}
deno-version: ${{ needs.release-versions.outputs.deno-version }}
lowercase-repo: ${{ needs.release-versions.outputs.lowercase-repo }}
rc-dockerfile: ${{ needs.release-versions.outputs.rc-dockerfile }}
rc-docker-tag: ${{ needs.release-versions.outputs.rc-docker-tag }}
Expand All @@ -344,6 +358,7 @@ jobs:
shard: '[1, 2, 3, 4]'
total-shard: 4
node-version: ${{ needs.release-versions.outputs.node-version }}
deno-version: ${{ needs.release-versions.outputs.deno-version }}
lowercase-repo: ${{ needs.release-versions.outputs.lowercase-repo }}
rc-dockerfile: ${{ needs.release-versions.outputs.rc-dockerfile }}
rc-docker-tag: ${{ needs.release-versions.outputs.rc-docker-tag }}
Expand Down Expand Up @@ -371,6 +386,7 @@ jobs:
enterprise-license: ${{ needs.release-versions.outputs.enterprise-license }}
mongodb-version: "['4.4']"
node-version: ${{ needs.release-versions.outputs.node-version }}
deno-version: ${{ needs.release-versions.outputs.deno-version }}
lowercase-repo: ${{ needs.release-versions.outputs.lowercase-repo }}
rc-dockerfile: ${{ needs.release-versions.outputs.rc-dockerfile }}
rc-docker-tag: ${{ needs.release-versions.outputs.rc-docker-tag }}
Expand All @@ -395,6 +411,7 @@ jobs:
total-shard: 5
mongodb-version: "['4.4']"
node-version: ${{ needs.release-versions.outputs.node-version }}
deno-version: ${{ needs.release-versions.outputs.deno-version }}
lowercase-repo: ${{ needs.release-versions.outputs.lowercase-repo }}
rc-dockerfile: ${{ needs.release-versions.outputs.rc-dockerfile }}
rc-docker-tag: ${{ needs.release-versions.outputs.rc-docker-tag }}
Expand Down Expand Up @@ -425,6 +442,7 @@ jobs:
total-shard: 5
mongodb-version: "['6.0']"
node-version: ${{ needs.release-versions.outputs.node-version }}
deno-version: ${{ needs.release-versions.outputs.deno-version }}
lowercase-repo: ${{ needs.release-versions.outputs.lowercase-repo }}
rc-dockerfile: ${{ needs.release-versions.outputs.rc-dockerfile }}
rc-docker-tag: ${{ needs.release-versions.outputs.rc-docker-tag }}
Expand Down Expand Up @@ -564,6 +582,7 @@ jobs:
username: ${{ secrets.CR_USER }}
password: ${{ secrets.CR_PAT }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
deno-version: ${{ needs.release-versions.outputs.deno-version }}

docker-image-publish:
name: 🚀 Publish Docker Image (main)
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/new-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
uses: ./.github/actions/setup-node
with:
node-version: 14.21.3
deno-version: 1.37.1
cache-modules: true
install: true
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pr-update-description.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
uses: ./.github/actions/setup-node
with:
node-version: 14.21.3
deno-version: 1.37.1
cache-modules: true
install: true
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
uses: ./.github/actions/setup-node
with:
node-version: 14.21.3
deno-version: 1.37.1
cache-modules: true
install: true
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release-candidate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
uses: ./.github/actions/setup-node
with:
node-version: 14.21.3
deno-version: 1.37.1
cache-modules: true
install: true
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down
Loading

0 comments on commit cdf523c

Please sign in to comment.