Skip to content

Commit

Permalink
Merge branch 'main' into kh/schema-shared-event
Browse files Browse the repository at this point in the history
  • Loading branch information
kraenhansen authored Oct 30, 2024
2 parents 55bdb82 + 2b44d26 commit 2ef302d
Show file tree
Hide file tree
Showing 123 changed files with 4,471 additions and 4,735 deletions.
3 changes: 3 additions & 0 deletions .depalignrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
],
"js-yaml": [
"^3.13.1"
],
"yargs": [
"^4.8.1"
]
}
}
27 changes: 24 additions & 3 deletions .evergreen/buildvariants-and-tasks.in.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ const PACKAGE_BUILD_VARIANTS = [
name: 'package-ubuntu',
display_name: 'Package Ubuntu',
// # NOTE: We are packaging on Ubuntu 16.04 in order to use glibc 2.23
// # NOTE: We are packaging on Ubuntu 18.04 in order to use glibc 2.27
// # when compiling/re-building addons. This ensures compatibility with other
// # debian platforms that have glibc 2.23 or newer.
run_on: 'ubuntu1604-large',
// # debian platforms that have glibc 2.27 or newer.
run_on: 'ubuntu1804-large',
silk_asset_group: 'compass-ubuntu',
},
{
Expand Down Expand Up @@ -275,6 +275,12 @@ buildvariants:
<% } %>
<% } %>

- name: test-web-sandbox-atlas-cloud
display_name: Test Web Sandbox (w/ Atlas Cloud login)
run_on: ubuntu2004-large
tasks:
- name: test-web-sandbox-atlas-cloud

- name: generate-vulnerability-report
display_name: Vulnerability Report
run_on: ubuntu2004-large
Expand Down Expand Up @@ -504,6 +510,21 @@ tasks:
<% } %>
<% } %>

- name: test-web-sandbox-atlas-cloud
tags:
- required-for-publish
- run-on-pr
- assigned_to_jira_team_compass_compass
- foliage_check_task_only
commands:
- func: prepare
- func: install
- func: bootstrap
- func: test-web-sandbox-atlas-cloud
vars:
compass_distribution: compass
debug: 'compass-e2e-tests*,electron*,hadron*,mongo*'

- name: create_static_analysis_report
tags: ['required-for-publish', 'run-on-pr']
depends_on:
Expand Down
21 changes: 20 additions & 1 deletion .evergreen/buildvariants-and-tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ buildvariants:
expansions:
silk_asset_group: compass-ubuntu
display_name: Package Ubuntu
run_on: ubuntu1604-large
run_on: ubuntu1804-large
tasks:
- name: package-compass
- name: package-compass-isolated
Expand Down Expand Up @@ -257,6 +257,11 @@ buildvariants:
- name: test-web-sandbox-firefox-1
- name: test-web-sandbox-firefox-2
- name: test-web-sandbox-firefox-3
- name: test-web-sandbox-atlas-cloud
display_name: Test Web Sandbox (w/ Atlas Cloud login)
run_on: ubuntu2004-large
tasks:
- name: test-web-sandbox-atlas-cloud
- name: generate-vulnerability-report
display_name: Vulnerability Report
run_on: ubuntu2004-large
Expand Down Expand Up @@ -1715,6 +1720,20 @@ tasks:
e2e_test_groups: 3
e2e_test_group: 3
debug: compass-e2e-tests*,electron*,hadron*,mongo*
- name: test-web-sandbox-atlas-cloud
tags:
- required-for-publish
- run-on-pr
- assigned_to_jira_team_compass_compass
- foliage_check_task_only
commands:
- func: prepare
- func: install
- func: bootstrap
- func: test-web-sandbox-atlas-cloud
vars:
compass_distribution: compass
debug: compass-e2e-tests*,electron*,hadron*,mongo*
- name: create_static_analysis_report
tags:
- required-for-publish
Expand Down
57 changes: 46 additions & 11 deletions .evergreen/functions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ post:
target: src/all-e2e-logs.tgz
source_dir: src/packages/compass-e2e-tests/.log
include:
- "**"
- '**'
- command: s3.put
params:
<<: *save-artifact-params-private
Expand Down Expand Up @@ -303,7 +303,7 @@ functions:
echo "Running tests in Electron runtime"
# Preparing native addons for electron runtime
npm run --unsafe-perm electron-rebuild
DEBUG=electron-rebuild* npm run --unsafe-perm electron-rebuild
npm run --unsafe-perm test-ci-electron -- --stream
Expand Down Expand Up @@ -597,10 +597,9 @@ functions:
DEBUG: ${debug|}
MONGODB_VERSION: ${mongodb_version|}
MONGODB_RUNNER_VERSION: ${mongodb_version|}
E2E_TEST_GROUPS: ${e2e_test_groups}
E2E_TEST_GROUP: ${e2e_test_group}
COMPASS_E2E_TEST_GROUPS: ${e2e_test_groups}
COMPASS_E2E_TEST_GROUP: ${e2e_test_group}
ATLAS_LOCAL_VERSION: latest
HADRON_DISTRIBUTION: compass
script: |
set -e
# Load environment variables
Expand Down Expand Up @@ -629,8 +628,8 @@ functions:
DEBUG: ${debug|}
MONGODB_VERSION: ${mongodb_version|}
MONGODB_RUNNER_VERSION: ${mongodb_version|}
E2E_TEST_GROUPS: ${e2e_test_groups}
E2E_TEST_GROUP: ${e2e_test_group}
COMPASS_E2E_TEST_GROUPS: ${e2e_test_groups}
COMPASS_E2E_TEST_GROUP: ${e2e_test_group}
script: |
set -e
# Load environment variables
Expand Down Expand Up @@ -664,14 +663,50 @@ functions:
DEBUG: ${debug|}
MONGODB_VERSION: ${mongodb_version|}
MONGODB_RUNNER_VERSION: ${mongodb_version|}
COMPASS_WEB_BROWSER_NAME: ${browser_name}
E2E_TEST_GROUPS: ${e2e_test_groups}
E2E_TEST_GROUP: ${e2e_test_group}
COMPASS_E2E_BROWSER_NAME: ${browser_name}
COMPASS_E2E_TEST_GROUPS: ${e2e_test_groups}
COMPASS_E2E_TEST_GROUP: ${e2e_test_group}
script: |
set -e
# Load environment variables
eval $(.evergreen/print-compass-env.sh)
npm run --unsafe-perm --workspace compass-e2e-tests test-ci web
test-web-sandbox-atlas-cloud:
- command: shell.exec
# It can take a very long time for Atlas cluster to get deployed
timeout_secs: 2400
params:
working_dir: src
shell: bash
env:
<<: *compass-env
DEBUG: ${debug|}
COMPASS_E2E_ATLAS_CLOUD_SANDBOX_CLOUD_CONFIG: 'qa'
COMPASS_E2E_ATLAS_CLOUD_SANDBOX_USERNAME: ${e2e_tests_compass_web_atlas_username}
COMPASS_E2E_ATLAS_CLOUD_SANDBOX_PASSWORD: ${e2e_tests_compass_web_atlas_password}
COMPASS_E2E_ATLAS_CLOUD_SANDBOX_DBUSER_USERNAME: ${e2e_tests_compass_web_atlas_db_username}
COMPASS_E2E_ATLAS_CLOUD_SANDBOX_DBUSER_PASSWORD: ${e2e_tests_compass_web_atlas_password}
MCLI_PUBLIC_API_KEY: ${e2e_tests_mcli_public_api_key}
MCLI_PRIVATE_API_KEY: ${e2e_tests_mcli_private_api_key}
MCLI_ORG_ID: ${e2e_tests_mcli_org_id}
MCLI_PROJECT_ID: ${e2e_tests_mcli_project_id}
MCLI_OPS_MANAGER_URL: ${e2e_tests_mcli_ops_manager_url}
script: |
set -e
# Load environment variables
eval $(.evergreen/print-compass-env.sh)
npm run --unsafe-perm --workspace compass-e2e-tests test-web
# Create Atlas cluster for test project
source .evergreen/start-atlas-cloud-cluster.sh
# Run the tests
echo "Starting e2e tests..."
# We're only running a special subset of tests as provisioning atlas
# clusters in CI is both pricey and flakey, so we want to limit the
# coverage to reduce those factors (at least for now)
npm run --unsafe-perm --workspace compass-e2e-tests test-ci -- -- web \
--test-atlas-cloud-sandbox \
--test-filter="atlas-cloud/**/*"
test-connectivity:
- command: shell.exec
Expand Down
10 changes: 3 additions & 7 deletions .evergreen/print-compass-env.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function printCompassEnv() {
// To build node modules on linux post electron 13 we need a newer c++
// compiler version and at least python v3.9, this adds it.
// https://jira.mongodb.org/browse/COMPASS-5150
pathsToPrepend.unshift('/opt/mongodbtoolchain/v3/bin');
pathsToPrepend.unshift('/opt/mongodbtoolchain/v4/bin');
}

PATH = maybePrependPaths(PATH, pathsToPrepend);
Expand Down Expand Up @@ -111,12 +111,8 @@ function printCompassEnv() {
process.env.EVERGREEN_REVISION_ORDER_ID
);

if (process.platform === 'darwin') {
// Without this, kerberos 2.1.1 is broken on macOS, but this flag is only
// really relevant for Linux.
// https://jira.mongodb.org/browse/NODE-6320
printVar('GYP_DEFINES', 'kerberos_use_rtld=false');
}
// https://jira.mongodb.org/browse/NODE-6320
printVar('GYP_DEFINES', `kerberos_use_rtld=${process.platform === 'linux'}`);
}

printCompassEnv();
39 changes: 39 additions & 0 deletions .evergreen/start-atlas-cloud-cluster.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/bash

# Atlas limits the naming to something like /^[\w\d-]{,23}$/ (and will auto
# truncate if it's too long) so we're very limited in terms of how unique this
# name can be. Hopefully the epoch + part of git hash is enough for these to not
# overlap when tests are running
ATLAS_CLOUD_TEST_CLUSTER_NAME="e2e-$(date +"%s")-$(git rev-parse HEAD)"

function atlascli() {
docker run \
-e MCLI_PUBLIC_API_KEY \
-e MCLI_PRIVATE_API_KEY \
-e MCLI_ORG_ID \
-e MCLI_PROJECT_ID \
-e MCLI_OPS_MANAGER_URL \
mongodb/atlas atlas $@
}

cleanup() {
echo "Scheduling Atlas deployment \`$ATLAS_CLOUD_TEST_CLUSTER_NAME\` for deletion..."
atlascli clusters delete $ATLAS_CLOUD_TEST_CLUSTER_NAME --force
}

trap cleanup EXIT

echo "Creating Atlas deployment \`$ATLAS_CLOUD_TEST_CLUSTER_NAME\` to test against..."
atlascli clusters create $ATLAS_CLOUD_TEST_CLUSTER_NAME \
--provider AWS \
--region US_EAST_1 \
--tier M10

echo "Waiting for the deployment to be provisioned..."
atlascli clusters watch "$ATLAS_CLOUD_TEST_CLUSTER_NAME"

echo "Getting connection string for provisioned cluster..."
ATLAS_CLOUD_TEST_CLUSTER_CONNECTION_STRING_JSON="$(atlascli clusters connectionStrings describe $ATLAS_CLOUD_TEST_CLUSTER_NAME -o json)"

export COMPASS_E2E_ATLAS_CLOUD_SANDBOX_DEFAULT_CONNECTIONS="{\"$ATLAS_CLOUD_TEST_CLUSTER_NAME\": $ATLAS_CLOUD_TEST_CLUSTER_CONNECTION_STRING_JSON}"
echo "Cluster connections: $COMPASS_E2E_ATLAS_CLOUD_SANDBOX_DEFAULT_CONNECTIONS"
1 change: 1 addition & 0 deletions .github/workflows/bump-packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,6 @@ jobs:
commit-message: 'chore(release): bump package versions'
branch: ci/bump-packages
title: 'chore(release): bump package versions'
labels: no-title-validation
body: |
- Bump package versions
24 changes: 24 additions & 0 deletions .github/workflows/check-pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: "Check PR Title"
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled, converted_to_draft, edited]

jobs:
check-pr-title:
name: Check PR Title
runs-on: ubuntu-latest
steps:
- name: Enforce conventional commit style
uses: realm/ci-actions/title-checker@main
with:
regex: '^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test|ops){1}(\([\w\-\.]+\))?(!)?: .*'
error-hint: 'Invalid PR title. Make sure it follows the conventional commit specification (i.e. "<type>(<optional scope>): <description>") or add the no-title-validation label'
ignore-labels: 'no-title-validation'
- name: Enforce JIRA ticket in title
uses: realm/ci-actions/title-checker@main
# Skip the JIRA ticket check for PRs opened by bots
if: ${{ !contains(github.event.pull_request.user.login, '[bot]') }}
with:
regex: '[A-Z]{4,10}-[0-9]{1,5}$'
error-hint: 'Invalid PR title. Make sure it ends with a JIRA ticket - i.e. COMPASS-1234 or add the no-title-validation label'
ignore-labels: 'no-title-validation'
7 changes: 4 additions & 3 deletions .github/workflows/update-electron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,15 @@ jobs:
run: |
node scripts/update-electron.js
git add .
git commit --no-allow-empty -m "chore: update electron" || true
git commit --no-allow-empty -m "chore(deps): update electron" || true
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.SVC_DEVTOOLSBOT_TOKEN }}
commit-message: 'chore: update electron'
commit-message: 'chore(deps): update electron'
branch: ci/update-electron
title: 'chore: update electron'
title: 'chore(deps): update electron'
labels: no-title-validation
body: |
- Update electron
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,4 @@ Kræn Hansen <[email protected]>
Kræn Hansen <[email protected]>
Ruchitha Rajaghatta <[email protected]>
syn-zhu <[email protected]>
Nikola Irinchev <[email protected]>
26 changes: 13 additions & 13 deletions THIRD-PARTY-NOTICES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
The following third-party software is used by and included in **Mongodb Compass**.
This document was automatically generated on Wed Oct 23 2024.
This document was automatically generated on Tue Oct 29 2024.

## List of dependencies

Expand Down Expand Up @@ -248,7 +248,7 @@ Package|Version|License
**[ee-first](#e2746902c758ae8a6f91ffb9618cd53717f936cb33c6323e65b6b7b24f7ebefe)**|1.1.1|MIT
**[electron-dl](#e97e034c7b93c63e7a433d75f6f1de3e0668764225ebbd61dbde8d1b55d6f3b7)**|3.5.0|MIT
**[electron-squirrel-startup](#09fb8168e8fda2e174f8d1a1c392ffd8f762c5637c788edd00d1e2486d060349)**|1.0.1|Apache-2.0
**[electron](#b8949aa8130b5ef5da1efc84f1a58e30028db62c230eb1da216dcfd7b263f55f)**|30.5.1|MIT
**[electron](#ddfad0a406da8c661d832155ebc87c378ac67db5d3c70f33126149f0084c639b)**|32.2.2|MIT
**[encodeurl](#b89152db475e86531e570f87b45d8a51aa5e5d87d4cc3b960cee7b8febf1d26a)**|1.0.2|MIT
**[encodeurl](#177948a319ae0aeebbd65742c53c62b37c75ec1d021afa5a188d10a7ceae6623)**|2.0.0|MIT
**[end-of-stream](#fadc10994f5fa767d06fb25cfff35fb17a895daf3bc3477c782907668ed16563)**|1.4.4|MIT
Expand Down Expand Up @@ -364,7 +364,7 @@ Package|Version|License
**[json5](#16281c6ea25e0cec4bc0bb8c01d1759d66992776381bf9c5af6959bec47d2f77)**|2.2.3|MIT
**[jsondiffpatch](#2cc3b990f6692cd23f883319a727b42a76a3a9d6675d1ebd8a05241eb7edc4ac)**|0.5.0|MIT
**[jsonfile](#1504ddbe5031429f6d90bb02373b4629ff5da9ef4e869d5015ff42f685817e74)**|6.1.0|MIT
**[kerberos](#e9b8ef28e3d246d5071f34b07b67580523cda7bd0d7d74dc2e422d79d30c238d)**|2.1.1|Apache-2.0
**[kerberos](#ac70d4903c6441fd96843a6ecb73f258ee27ef26b25290257564a11c10ecd17b)**|2.2.0|Apache-2.0
**[key-tree-store](#63e3bcb8e06ac6b9f7c153030ce57fad6e985a0cc7f0109d3fc6073192a932f8)**|1.3.0|MIT
**[keytar](#752f1130bbd6c5dc941bdb20fb39579c1d350252a112c58f2558b7c5f536d6f7)**|7.9.0|MIT
**[leaflet-defaulticon-compatibility](#7fba582082c899d764d8e4214d2f6f06cd043b2dce51598ec24ce299f5640a6e)**|0.1.1|BSD-2-Clause
Expand Down Expand Up @@ -476,8 +476,8 @@ Package|Version|License
**[napi-build-utils](#26912b5ff7632f262d64273f99cd1a869376c5c378960e24501585e35b31054a)**|1.0.2|MIT
**[negotiator](#e3856213d8f0a7d28cd4166e53ec7e2c019cb7becf4a8535097bac28d21e8579)**|0.6.3|MIT
**[netmask](#2bd5b8ff7fab9adace6c38d3fd32e7328484939fdd07836635b0155d0afc35b2)**|2.0.2|MIT
**[node-abi](#e95a83ce4ffe7621819fbbceed23c54f12e0e1066aad9e5b3093bbdc7c958e0b)**|3.68.0|MIT
**[node-addon-api](#af9f7588524ca4e68f4efe7b24aea46d9c8004263b1d7cf3b558f86d87a163e8)**|4.3.0|MIT
**[node-abi](#26b0c85ed4add770fa688d81ed25b3e4018a6114f488c70ab5b36b25cf4084d3)**|3.71.0|MIT
**[node-addon-api](#75c2a47526765afc024a6641ec7b1b37935dc672a211ebdd9773d74bc43a95b4)**|6.1.0|MIT
**[node-domexception](#3c25065fd2bc1b6b56856e30ac5b8f34ddae33ca87b225854f8d855b0ccabfbe)**|1.0.0|MIT
**[node-fetch](#364527ef1b51cc6ac34872b931049c9e25b5014f9b40e3898c84e1a830e21720)**|2.6.7|MIT
**[node-fetch](#23d7d5a419e9a25e6384dee4aa24f7162544418f0cdc2d92e94e2cf924507b8c)**|2.7.0|MIT
Expand Down Expand Up @@ -19215,8 +19215,8 @@ License files:



<a id="b8949aa8130b5ef5da1efc84f1a58e30028db62c230eb1da216dcfd7b263f55f"></a>
### [electron](https://www.npmjs.com/package/electron) (version 30.5.1)
<a id="ddfad0a406da8c661d832155ebc87c378ac67db5d3c70f33126149f0084c639b"></a>
### [electron](https://www.npmjs.com/package/electron) (version 32.2.2)
License tags: MIT

License files:
Expand Down Expand Up @@ -23138,8 +23138,8 @@ License files:



<a id="e9b8ef28e3d246d5071f34b07b67580523cda7bd0d7d74dc2e422d79d30c238d"></a>
### [kerberos](https://www.npmjs.com/package/kerberos) (version 2.1.1)
<a id="ac70d4903c6441fd96843a6ecb73f258ee27ef26b25290257564a11c10ecd17b"></a>
### [kerberos](https://www.npmjs.com/package/kerberos) (version 2.2.0)
License tags: Apache-2.0

License files:
Expand Down Expand Up @@ -28649,8 +28649,8 @@ License files:
License tags: MIT


<a id="e95a83ce4ffe7621819fbbceed23c54f12e0e1066aad9e5b3093bbdc7c958e0b"></a>
### [node-abi](https://www.npmjs.com/package/node-abi) (version 3.68.0)
<a id="26b0c85ed4add770fa688d81ed25b3e4018a6114f488c70ab5b36b25cf4084d3"></a>
### [node-abi](https://www.npmjs.com/package/node-abi) (version 3.71.0)
License tags: MIT

License files:
Expand Down Expand Up @@ -28680,8 +28680,8 @@ License files:



<a id="af9f7588524ca4e68f4efe7b24aea46d9c8004263b1d7cf3b558f86d87a163e8"></a>
### [node-addon-api](https://www.npmjs.com/package/node-addon-api) (version 4.3.0)
<a id="75c2a47526765afc024a6641ec7b1b37935dc672a211ebdd9773d74bc43a95b4"></a>
### [node-addon-api](https://www.npmjs.com/package/node-addon-api) (version 6.1.0)
License tags: MIT

License files:
Expand Down
Loading

0 comments on commit 2ef302d

Please sign in to comment.