Skip to content

Commit 7e89087

Browse files
Merge remote-tracking branch 'origin/beta-releases' into ga-releases
2 parents fa3ec8b + b57dc53 commit 7e89087

File tree

204 files changed

+7750
-6546
lines changed

Some content is hidden

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

204 files changed

+7750
-6546
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: 55 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
@@ -203,6 +203,15 @@ functions:
203203
# Install dependencies
204204
bash ".evergreen/retry-with-backoff.sh" .evergreen/npm_ci.sh
205205
206+
# Will fail if versions of direct dependencies listed in package-lock
207+
# are not matching versions defined in package.json file of any of the
208+
# workspace packages
209+
# This command is very noisy when running from root with --all, store
210+
# the output in a file that will be uploaded with rest of the logs
211+
LS_ALL_STDOUT_FILE="$(npm config get cache)/_logs/$(date -u +"%Y-%m-%dT%H_%M_%SZ")-npm-ls-all.log"
212+
echo "Validating dependencies with \`npm ls --all\`..."
213+
(npm ls --all > $LS_ALL_STDOUT_FILE && echo "No mismatched dependency versions") || echo "\nThe \`npm ls\` command failed with mismatched dependencies error. This usually means that the dependency versions listed in package.json are not matching dependencies resolved and recorded in package-lock.json. If you updated package.json files in your PR, inspect the error output and try to re-install offending dependncies to fix the package-lock file."
214+
206215
bootstrap:
207216
- command: shell.exec
208217
type: setup
@@ -294,7 +303,7 @@ functions:
294303
echo "Running tests in Electron runtime"
295304
296305
# Preparing native addons for electron runtime
297-
npm run --unsafe-perm electron-rebuild
306+
DEBUG=electron-rebuild* npm run --unsafe-perm electron-rebuild
298307
299308
npm run --unsafe-perm test-ci-electron -- --stream
300309
@@ -588,10 +597,9 @@ functions:
588597
DEBUG: ${debug|}
589598
MONGODB_VERSION: ${mongodb_version|}
590599
MONGODB_RUNNER_VERSION: ${mongodb_version|}
591-
E2E_TEST_GROUPS: ${e2e_test_groups}
592-
E2E_TEST_GROUP: ${e2e_test_group}
600+
COMPASS_E2E_TEST_GROUPS: ${e2e_test_groups}
601+
COMPASS_E2E_TEST_GROUP: ${e2e_test_group}
593602
ATLAS_LOCAL_VERSION: latest
594-
HADRON_DISTRIBUTION: compass
595603
script: |
596604
set -e
597605
# Load environment variables
@@ -620,8 +628,8 @@ functions:
620628
DEBUG: ${debug|}
621629
MONGODB_VERSION: ${mongodb_version|}
622630
MONGODB_RUNNER_VERSION: ${mongodb_version|}
623-
E2E_TEST_GROUPS: ${e2e_test_groups}
624-
E2E_TEST_GROUP: ${e2e_test_group}
631+
COMPASS_E2E_TEST_GROUPS: ${e2e_test_groups}
632+
COMPASS_E2E_TEST_GROUP: ${e2e_test_group}
625633
script: |
626634
set -e
627635
# Load environment variables
@@ -655,14 +663,50 @@ functions:
655663
DEBUG: ${debug|}
656664
MONGODB_VERSION: ${mongodb_version|}
657665
MONGODB_RUNNER_VERSION: ${mongodb_version|}
658-
BROWSER_NAME: ${browser_name}
659-
E2E_TEST_GROUPS: ${e2e_test_groups}
660-
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_CLOUD_CONFIG: 'qa'
687+
COMPASS_E2E_ATLAS_CLOUD_SANDBOX_USERNAME: ${e2e_tests_compass_web_atlas_username}
688+
COMPASS_E2E_ATLAS_CLOUD_SANDBOX_PASSWORD: ${e2e_tests_compass_web_atlas_password}
689+
COMPASS_E2E_ATLAS_CLOUD_SANDBOX_DBUSER_USERNAME: ${e2e_tests_compass_web_atlas_db_username}
690+
COMPASS_E2E_ATLAS_CLOUD_SANDBOX_DBUSER_PASSWORD: ${e2e_tests_compass_web_atlas_password}
691+
MCLI_PUBLIC_API_KEY: ${e2e_tests_mcli_public_api_key}
692+
MCLI_PRIVATE_API_KEY: ${e2e_tests_mcli_private_api_key}
693+
MCLI_ORG_ID: ${e2e_tests_mcli_org_id}
694+
MCLI_PROJECT_ID: ${e2e_tests_mcli_project_id}
695+
MCLI_OPS_MANAGER_URL: ${e2e_tests_mcli_ops_manager_url}
661696
script: |
662697
set -e
663698
# Load environment variables
664699
eval $(.evergreen/print-compass-env.sh)
665-
npm run --unsafe-perm --workspace compass-e2e-tests test-web
700+
# Create Atlas cluster for test project
701+
source .evergreen/start-atlas-cloud-cluster.sh
702+
# Run the tests
703+
echo "Starting e2e tests..."
704+
# We're only running a special subset of tests as provisioning atlas
705+
# clusters in CI is both pricey and flakey, so we want to limit the
706+
# coverage to reduce those factors (at least for now)
707+
npm run --unsafe-perm --workspace compass-e2e-tests test-ci -- -- web \
708+
--test-atlas-cloud-sandbox \
709+
--test-filter="atlas-cloud/**/*"
666710
667711
test-connectivity:
668712
- 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'
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/bin/bash
2+
3+
# Atlas limits the naming to something like /^[\w\d-]{,23}$/ (and will auto
4+
# truncate if it's too long) so we're very limited in terms of how unique this
5+
# name can be. Hopefully the epoch + part of git hash is enough for these to not
6+
# overlap when tests are running
7+
ATLAS_CLOUD_TEST_CLUSTER_NAME="e2e-$(date +"%s")-$(git rev-parse HEAD)"
8+
9+
function atlascli() {
10+
docker run \
11+
-e MCLI_PUBLIC_API_KEY \
12+
-e MCLI_PRIVATE_API_KEY \
13+
-e MCLI_ORG_ID \
14+
-e MCLI_PROJECT_ID \
15+
-e MCLI_OPS_MANAGER_URL \
16+
mongodb/atlas atlas $@
17+
}
18+
19+
cleanup() {
20+
echo "Scheduling Atlas deployment \`$ATLAS_CLOUD_TEST_CLUSTER_NAME\` for deletion..."
21+
atlascli clusters delete $ATLAS_CLOUD_TEST_CLUSTER_NAME --force
22+
}
23+
24+
trap cleanup EXIT
25+
26+
echo "Creating Atlas deployment \`$ATLAS_CLOUD_TEST_CLUSTER_NAME\` to test against..."
27+
atlascli clusters create $ATLAS_CLOUD_TEST_CLUSTER_NAME \
28+
--provider AWS \
29+
--region US_EAST_1 \
30+
--tier M10
31+
32+
echo "Waiting for the deployment to be provisioned..."
33+
atlascli clusters watch "$ATLAS_CLOUD_TEST_CLUSTER_NAME"
34+
35+
echo "Getting connection string for provisioned cluster..."
36+
ATLAS_CLOUD_TEST_CLUSTER_CONNECTION_STRING_JSON="$(atlascli clusters connectionStrings describe $ATLAS_CLOUD_TEST_CLUSTER_NAME -o json)"
37+
38+
export COMPASS_E2E_ATLAS_CLOUD_SANDBOX_DEFAULT_CONNECTIONS="{\"$ATLAS_CLOUD_TEST_CLUSTER_NAME\": $ATLAS_CLOUD_TEST_CLUSTER_CONNECTION_STRING_JSON}"
39+
echo "Cluster connections: $COMPASS_E2E_ATLAS_CLOUD_SANDBOX_DEFAULT_CONNECTIONS"

.github/workflows/bump-packages.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,6 @@ jobs:
5555
commit-message: 'chore(release): bump package versions'
5656
branch: ci/bump-packages
5757
title: 'chore(release): bump package versions'
58+
labels: no-title-validation
5859
body: |
5960
- Bump package versions

0 commit comments

Comments
 (0)