Skip to content

Commit 087dc04

Browse files
Merge branch 'main' of github.com:mongodb-js/compass into COMPASS-8377
2 parents d685195 + d01d076 commit 087dc04

File tree

194 files changed

+7735
-6781
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

194 files changed

+7735
-6781
lines changed

.depalignrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
],
2727
"js-yaml": [
2828
"^3.13.1"
29+
],
30+
"yargs": [
31+
"^4.8.1"
2932
]
3033
}
3134
}

.evergreen/buildvariants-and-tasks.in.yml

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ const PACKAGE_BUILD_VARIANTS = [
2828
name: 'package-ubuntu',
2929
display_name: 'Package Ubuntu',
3030
31-
// # NOTE: We are packaging on Ubuntu 16.04 in order to use glibc 2.23
31+
// # NOTE: We are packaging on Ubuntu 18.04 in order to use glibc 2.27
3232
// # when compiling/re-building addons. This ensures compatibility with other
33-
// # debian platforms that have glibc 2.23 or newer.
34-
run_on: 'ubuntu1604-large',
33+
// # debian platforms that have glibc 2.27 or newer.
34+
run_on: 'ubuntu1804-large',
3535
silk_asset_group: 'compass-ubuntu',
3636
},
3737
{
@@ -275,6 +275,12 @@ buildvariants:
275275
<% } %>
276276
<% } %>
277277

278+
- name: test-web-sandbox-atlas-cloud
279+
display_name: Test Web Sandbox (w/ Atlas Cloud login)
280+
run_on: ubuntu2004-large
281+
tasks:
282+
- name: test-web-sandbox-atlas-cloud
283+
278284
- name: generate-vulnerability-report
279285
display_name: Vulnerability Report
280286
run_on: ubuntu2004-large
@@ -504,6 +510,21 @@ tasks:
504510
<% } %>
505511
<% } %>
506512

513+
- name: test-web-sandbox-atlas-cloud
514+
tags:
515+
- required-for-publish
516+
- run-on-pr
517+
- assigned_to_jira_team_compass_compass
518+
- foliage_check_task_only
519+
commands:
520+
- func: prepare
521+
- func: install
522+
- func: bootstrap
523+
- func: test-web-sandbox-atlas-cloud
524+
vars:
525+
compass_distribution: compass
526+
debug: 'compass-e2e-tests*,electron*,hadron*,mongo*'
527+
507528
- name: create_static_analysis_report
508529
tags: ['required-for-publish', 'run-on-pr']
509530
depends_on:

.evergreen/buildvariants-and-tasks.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ buildvariants:
3535
expansions:
3636
silk_asset_group: compass-ubuntu
3737
display_name: Package Ubuntu
38-
run_on: ubuntu1604-large
38+
run_on: ubuntu1804-large
3939
tasks:
4040
- name: package-compass
4141
- name: package-compass-isolated
@@ -257,6 +257,11 @@ buildvariants:
257257
- name: test-web-sandbox-firefox-1
258258
- name: test-web-sandbox-firefox-2
259259
- name: test-web-sandbox-firefox-3
260+
- name: test-web-sandbox-atlas-cloud
261+
display_name: Test Web Sandbox (w/ Atlas Cloud login)
262+
run_on: ubuntu2004-large
263+
tasks:
264+
- name: test-web-sandbox-atlas-cloud
260265
- name: generate-vulnerability-report
261266
display_name: Vulnerability Report
262267
run_on: ubuntu2004-large
@@ -1715,6 +1720,20 @@ tasks:
17151720
e2e_test_groups: 3
17161721
e2e_test_group: 3
17171722
debug: compass-e2e-tests*,electron*,hadron*,mongo*
1723+
- name: test-web-sandbox-atlas-cloud
1724+
tags:
1725+
- required-for-publish
1726+
- run-on-pr
1727+
- assigned_to_jira_team_compass_compass
1728+
- foliage_check_task_only
1729+
commands:
1730+
- func: prepare
1731+
- func: install
1732+
- func: bootstrap
1733+
- func: test-web-sandbox-atlas-cloud
1734+
vars:
1735+
compass_distribution: compass
1736+
debug: compass-e2e-tests*,electron*,hadron*,mongo*
17181737
- name: create_static_analysis_report
17191738
tags:
17201739
- required-for-publish

.evergreen/functions.yml

Lines changed: 43 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ post:
8686
target: src/all-e2e-logs.tgz
8787
source_dir: src/packages/compass-e2e-tests/.log
8888
include:
89-
- "**"
89+
- '**'
9090
- command: s3.put
9191
params:
9292
<<: *save-artifact-params-private
@@ -303,7 +303,7 @@ functions:
303303
echo "Running tests in Electron runtime"
304304
305305
# Preparing native addons for electron runtime
306-
npm run --unsafe-perm electron-rebuild
306+
DEBUG=electron-rebuild* npm run --unsafe-perm electron-rebuild
307307
308308
npm run --unsafe-perm test-ci-electron -- --stream
309309
@@ -597,10 +597,9 @@ functions:
597597
DEBUG: ${debug|}
598598
MONGODB_VERSION: ${mongodb_version|}
599599
MONGODB_RUNNER_VERSION: ${mongodb_version|}
600-
E2E_TEST_GROUPS: ${e2e_test_groups}
601-
E2E_TEST_GROUP: ${e2e_test_group}
600+
COMPASS_E2E_TEST_GROUPS: ${e2e_test_groups}
601+
COMPASS_E2E_TEST_GROUP: ${e2e_test_group}
602602
ATLAS_LOCAL_VERSION: latest
603-
HADRON_DISTRIBUTION: compass
604603
script: |
605604
set -e
606605
# Load environment variables
@@ -629,8 +628,8 @@ functions:
629628
DEBUG: ${debug|}
630629
MONGODB_VERSION: ${mongodb_version|}
631630
MONGODB_RUNNER_VERSION: ${mongodb_version|}
632-
E2E_TEST_GROUPS: ${e2e_test_groups}
633-
E2E_TEST_GROUP: ${e2e_test_group}
631+
COMPASS_E2E_TEST_GROUPS: ${e2e_test_groups}
632+
COMPASS_E2E_TEST_GROUP: ${e2e_test_group}
634633
script: |
635634
set -e
636635
# Load environment variables
@@ -664,14 +663,47 @@ functions:
664663
DEBUG: ${debug|}
665664
MONGODB_VERSION: ${mongodb_version|}
666665
MONGODB_RUNNER_VERSION: ${mongodb_version|}
667-
BROWSER_NAME: ${browser_name}
668-
E2E_TEST_GROUPS: ${e2e_test_groups}
669-
E2E_TEST_GROUP: ${e2e_test_group}
666+
COMPASS_E2E_BROWSER_NAME: ${browser_name}
667+
COMPASS_E2E_TEST_GROUPS: ${e2e_test_groups}
668+
COMPASS_E2E_TEST_GROUP: ${e2e_test_group}
669+
script: |
670+
set -e
671+
# Load environment variables
672+
eval $(.evergreen/print-compass-env.sh)
673+
npm run --unsafe-perm --workspace compass-e2e-tests test-ci web
674+
675+
676+
test-web-sandbox-atlas-cloud:
677+
- command: shell.exec
678+
# It can take a very long time for Atlas cluster to get deployed
679+
timeout_secs: 2400
680+
params:
681+
working_dir: src
682+
shell: bash
683+
env:
684+
<<: *compass-env
685+
DEBUG: ${debug|}
686+
COMPASS_E2E_ATLAS_CLOUD_SANDBOX_USERNAME: ${e2e_tests_compass_web_atlas_username}
687+
COMPASS_E2E_ATLAS_CLOUD_SANDBOX_PASSWORD: ${e2e_tests_compass_web_atlas_password}
688+
MCLI_PUBLIC_API_KEY: ${e2e_tests_mcli_public_api_key}
689+
MCLI_PRIVATE_API_KEY: ${e2e_tests_mcli_private_api_key}
690+
MCLI_ORG_ID: ${e2e_tests_mcli_org_id}
691+
MCLI_PROJECT_ID: ${e2e_tests_mcli_project_id}
692+
MCLI_OPS_MANAGER_URL: ${e2e_tests_mcli_ops_manager_url}
670693
script: |
671694
set -e
672695
# Load environment variables
673696
eval $(.evergreen/print-compass-env.sh)
674-
npm run --unsafe-perm --workspace compass-e2e-tests test-web
697+
# Create Atlas cluster for test project
698+
source .evergreen/start-atlas-cloud-cluster.sh
699+
# Run the tests
700+
echo "Starting e2e tests..."
701+
# We're only running a special subset of tests as provisioning atlas
702+
# clusters in CI is both pricey and flakey, so we want to limit the
703+
# coverage to reduce those factors (at least for now)
704+
npm run --unsafe-perm --workspace compass-e2e-tests test-ci -- -- web \
705+
--test-atlas-cloud-sandbox \
706+
--test-filter="atlas-cloud/**/*"
675707
676708
test-connectivity:
677709
- command: shell.exec

.evergreen/node-gyp-bug-workaround.sh

Lines changed: 0 additions & 53 deletions
This file was deleted.

.evergreen/preinstall.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@ if [ -n "$IS_WINDOWS" ]; then
3939
./node.exe node_modules/npm2/bin/npm-cli.js i -g npm@$NPM_VERSION
4040
rm -rf node_modules/npm2/
4141
chmod +x npm.cmd npm
42-
43-
cd ..
44-
.evergreen/node-gyp-bug-workaround.sh
4542
else
4643
if command -v ldd &> /dev/null && `ldd $(which bash) | grep 'libc.so' | awk '{print $3}'` | grep -Eq 'release version 2.(1|2[0-7])'; then
4744
echo "Installing unofficial nodejs compiled for glibc 2.17 v${NODE_JS_VERSION} for ${PLATFORM} on ${ARCH}..."

.evergreen/print-compass-env.js

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,10 @@ function printCompassEnv() {
6868
}
6969

7070
if (process.env.PLATFORM === 'linux') {
71-
// To build node modules on linux post electron 13 we need
72-
// a newer c++ compiler version, this adds it.
71+
// To build node modules on linux post electron 13 we need a newer c++
72+
// compiler version and at least python v3.9, this adds it.
7373
// https://jira.mongodb.org/browse/COMPASS-5150
74-
pathsToPrepend.unshift('/opt/mongodbtoolchain/v3/bin');
75-
76-
// Make sure that linux is using python 3.6 (node-gyp requirement)
77-
pathsToPrepend.unshift('/opt/python/3.6/bin');
74+
pathsToPrepend.unshift('/opt/mongodbtoolchain/v4/bin');
7875
}
7976

8077
PATH = maybePrependPaths(PATH, pathsToPrepend);
@@ -103,17 +100,19 @@ function printCompassEnv() {
103100
printVar('IS_RHEL', process.env.IS_RHEL);
104101
printVar('IS_UBUNTU', process.env.IS_UBUNTU);
105102
printVar('DEBUG', process.env.DEBUG);
106-
printVar('MONGODB_VERSION', process.env.MONGODB_VERSION || process.env.MONGODB_DEFAULT_VERSION);
103+
printVar(
104+
'MONGODB_VERSION',
105+
process.env.MONGODB_VERSION || process.env.MONGODB_DEFAULT_VERSION
106+
);
107107
printVar('DEV_VERSION_IDENTIFIER', process.env.DEV_VERSION_IDENTIFIER);
108108
printVar('EVERGREEN_REVISION', process.env.EVERGREEN_REVISION);
109-
printVar('EVERGREEN_REVISION_ORDER_ID', process.env.EVERGREEN_REVISION_ORDER_ID);
109+
printVar(
110+
'EVERGREEN_REVISION_ORDER_ID',
111+
process.env.EVERGREEN_REVISION_ORDER_ID
112+
);
110113

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

119118
printCompassEnv();

.evergreen/print-compass-env.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -e
44

5-
export MONGODB_DEFAULT_VERSION=6.0.x
5+
export MONGODB_DEFAULT_VERSION=7.0.x
66

77
if [[ $OSTYPE == "cygwin" ]]; then
88
export PLATFORM='win32'

0 commit comments

Comments
 (0)