Skip to content

Commit d93ca5f

Browse files
committed
Merge remote-tracking branch 'origin/main' into snyk-upgrade-01d5e7b3dd90bd95c785ffcbbb377e82
2 parents 0c96dd9 + 21ca06d commit d93ca5f

File tree

460 files changed

+20061
-13315
lines changed

Some content is hidden

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

460 files changed

+20061
-13315
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,7 @@ tasks:
352352
e2e_test_groups: <%= E2E_TEST_GROUPS.length %>
353353
e2e_test_group: <%= group.number %>
354354
debug: 'compass-e2e-tests*,electron*,hadron*,mongo*'
355+
mongodb_version: latest-enterprise
355356
<% } %>
356357

357358
- name: generate-vulnerability-report
@@ -472,7 +473,7 @@ tasks:
472473
compass_distribution: compass
473474
- func: test-packaged-app
474475
vars:
475-
mongodb_version: latest
476+
mongodb_version: latest-enterprise
476477
compass_distribution: compass
477478
e2e_test_groups: <%= E2E_TEST_GROUPS.length %>
478479
e2e_test_group: <%= group.number %>
@@ -494,7 +495,7 @@ tasks:
494495
compass_distribution: compass
495496
- func: test-web-sandbox
496497
vars:
497-
mongodb_version: latest
498+
mongodb_version: latest-enterprise
498499
browser_name: '<%= browser %>'
499500
compass_distribution: compass
500501
e2e_test_groups: <%= E2E_TEST_GROUPS.length %>

.evergreen/buildvariants-and-tasks.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@ tasks:
351351
e2e_test_groups: 3
352352
e2e_test_group: 1
353353
debug: compass-e2e-tests*,electron*,hadron*,mongo*
354+
mongodb_version: latest-enterprise
354355
- name: e2e-multiple-connections-2
355356
tags:
356357
- required-for-publish
@@ -364,6 +365,7 @@ tasks:
364365
e2e_test_groups: 3
365366
e2e_test_group: 2
366367
debug: compass-e2e-tests*,electron*,hadron*,mongo*
368+
mongodb_version: latest-enterprise
367369
- name: e2e-multiple-connections-3
368370
tags:
369371
- required-for-publish
@@ -377,6 +379,7 @@ tasks:
377379
e2e_test_groups: 3
378380
e2e_test_group: 3
379381
debug: compass-e2e-tests*,electron*,hadron*,mongo*
382+
mongodb_version: latest-enterprise
380383
- name: generate-vulnerability-report
381384
tags:
382385
- required-for-publish
@@ -1542,7 +1545,7 @@ tasks:
15421545
compass_distribution: compass
15431546
- func: test-packaged-app
15441547
vars:
1545-
mongodb_version: latest
1548+
mongodb_version: latest-enterprise
15461549
compass_distribution: compass
15471550
e2e_test_groups: 3
15481551
e2e_test_group: 1
@@ -1565,7 +1568,7 @@ tasks:
15651568
compass_distribution: compass
15661569
- func: test-packaged-app
15671570
vars:
1568-
mongodb_version: latest
1571+
mongodb_version: latest-enterprise
15691572
compass_distribution: compass
15701573
e2e_test_groups: 3
15711574
e2e_test_group: 2
@@ -1588,7 +1591,7 @@ tasks:
15881591
compass_distribution: compass
15891592
- func: test-packaged-app
15901593
vars:
1591-
mongodb_version: latest
1594+
mongodb_version: latest-enterprise
15921595
compass_distribution: compass
15931596
e2e_test_groups: 3
15941597
e2e_test_group: 3
@@ -1608,7 +1611,7 @@ tasks:
16081611
compass_distribution: compass
16091612
- func: test-web-sandbox
16101613
vars:
1611-
mongodb_version: latest
1614+
mongodb_version: latest-enterprise
16121615
browser_name: chrome
16131616
compass_distribution: compass
16141617
e2e_test_groups: 3
@@ -1629,7 +1632,7 @@ tasks:
16291632
compass_distribution: compass
16301633
- func: test-web-sandbox
16311634
vars:
1632-
mongodb_version: latest
1635+
mongodb_version: latest-enterprise
16331636
browser_name: chrome
16341637
compass_distribution: compass
16351638
e2e_test_groups: 3
@@ -1650,7 +1653,7 @@ tasks:
16501653
compass_distribution: compass
16511654
- func: test-web-sandbox
16521655
vars:
1653-
mongodb_version: latest
1656+
mongodb_version: latest-enterprise
16541657
browser_name: chrome
16551658
compass_distribution: compass
16561659
e2e_test_groups: 3
@@ -1671,7 +1674,7 @@ tasks:
16711674
compass_distribution: compass
16721675
- func: test-web-sandbox
16731676
vars:
1674-
mongodb_version: latest
1677+
mongodb_version: latest-enterprise
16751678
browser_name: firefox
16761679
compass_distribution: compass
16771680
e2e_test_groups: 3
@@ -1692,7 +1695,7 @@ tasks:
16921695
compass_distribution: compass
16931696
- func: test-web-sandbox
16941697
vars:
1695-
mongodb_version: latest
1698+
mongodb_version: latest-enterprise
16961699
browser_name: firefox
16971700
compass_distribution: compass
16981701
e2e_test_groups: 3
@@ -1713,7 +1716,7 @@ tasks:
17131716
compass_distribution: compass
17141717
- func: test-web-sandbox
17151718
vars:
1716-
mongodb_version: latest
1719+
mongodb_version: latest-enterprise
17171720
browser_name: firefox
17181721
compass_distribution: compass
17191722
e2e_test_groups: 3

.evergreen/compass_package.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,8 @@ if [[ "$OSTYPE" == "cygwin" ]]; then
77
net start MSIServer
88
fi
99

10-
# Ensure .sbom is always created with fresh data
11-
rm -rvf .sbom && mkdir -pv .sbom
12-
1310
echo "Creating signed release build..."
14-
npm run package-compass $COMPASS_DISTRIBUTION;
11+
npm run package-compass-nocompile $COMPASS_DISTRIBUTION
1512
npm run generate-first-party-deps-json
1613

1714
ls -la packages/compass/dist

.evergreen/connectivity-tests/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# "bullseye" is the debian distribution that ubuntu:20.04 is based on
2-
FROM node:18-bullseye
2+
ARG NODE_JS_VERSION=20
3+
FROM node:${NODE_JS_VERSION}-bullseye
34

45
COPY .evergreen/connectivity-tests/krb5.conf /etc/krb5.conf
56

.evergreen/connectivity-tests/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ MONOREPO_ROOT_DIR="$(cd $(dirname "$0")/../..; pwd)"
77
cd $MONOREPO_ROOT_DIR
88

99
echo "building connectivity tests image from ${PWD}"
10-
docker build -t devtools-connectivity-tests -f "./.evergreen/connectivity-tests/Dockerfile" .
10+
docker build -t devtools-connectivity-tests --build-arg "NODE_JS_VERSION=$NODE_JS_VERSION" -f "./.evergreen/connectivity-tests/Dockerfile" .
1111
echo "connectivity tests image built"
1212

1313
echo running connectivity tests image

.evergreen/functions.yml

Lines changed: 33 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,7 @@ variables:
4040
EVERGREEN_VERSION_ID: ${version_id}
4141
EVERGREEN_WORKDIR: ${workdir}
4242
EVERGREEN_CREATED_AT: ${created_at}
43-
# WARN: This version is behind our electron runtime, but updating it will
44-
# drop support for some older linux platforms, so we are keeping them out of
45-
# sync for now
46-
# TODO: https://jira.mongodb.org/browse/COMPASS-6915
47-
NODE_JS_VERSION: '18.19.1'
43+
NODE_JS_VERSION: '20.16.0'
4844
NPM_VERSION: '10.2.4'
4945
# secrets
5046
HADRON_METRICS_INTERCOM_APP_ID: ${metrics_intercom_app_id}
@@ -410,19 +406,15 @@ functions:
410406
DEBUG: ${debug}
411407
npm_config_loglevel: ${npm_loglevel}
412408
COMPASS_DISTRIBUTION: ${compass_distribution}
413-
SIGNING_SERVER_HOSTNAME: ${SIGNING_SERVER_HOSTNAME}
414-
SIGNING_SERVER_PRIVATE_KEY: ${SIGNING_SERVER_PRIVATE_KEY}
415-
SIGNING_SERVER_PRIVATE_KEY_CYGPATH: ${SIGNING_SERVER_PRIVATE_KEY_CYGPATH}
416-
SIGNING_SERVER_USERNAME: ${SIGNING_SERVER_USERNAME}
417-
SIGNING_SERVER_PORT: ${SIGNING_SERVER_PORT}
418-
GITHUB_PR_NUMBER: ${github_pr_number}
419-
PAPERTRAIL_KEY_ID: ${papertrail_key_id}
420-
PAPERTRAIL_SECRET_KEY: ${papertrail_secret_key}
421409
script: |
422410
set -e
411+
412+
# Ensure .sbom is always created with fresh data
413+
rm -rvf .sbom && mkdir -pv .sbom
414+
423415
# Load environment variables
424416
eval $(.evergreen/print-compass-env.sh)
425-
.evergreen/compass_package.sh
417+
cd packages/compass && npm run prepackage-compass
426418
- command: shell.exec
427419
params:
428420
working_dir: src
@@ -443,6 +435,29 @@ functions:
443435
set -e
444436
445437
.evergreen/create-sbom.sh
438+
- command: shell.exec
439+
params:
440+
working_dir: src
441+
shell: bash
442+
env:
443+
<<: *compass-env
444+
DEBUG: ${debug}
445+
npm_config_loglevel: ${npm_loglevel}
446+
COMPASS_DISTRIBUTION: ${compass_distribution}
447+
SIGNING_SERVER_HOSTNAME: ${SIGNING_SERVER_HOSTNAME}
448+
SIGNING_SERVER_PRIVATE_KEY: ${SIGNING_SERVER_PRIVATE_KEY}
449+
SIGNING_SERVER_PRIVATE_KEY_CYGPATH: ${SIGNING_SERVER_PRIVATE_KEY_CYGPATH}
450+
SIGNING_SERVER_USERNAME: ${SIGNING_SERVER_USERNAME}
451+
SIGNING_SERVER_PORT: ${SIGNING_SERVER_PORT}
452+
GITHUB_PR_NUMBER: ${github_pr_number}
453+
PAPERTRAIL_KEY_ID: ${papertrail_key_id}
454+
PAPERTRAIL_SECRET_KEY: ${papertrail_secret_key}
455+
COMPASS_WAS_COMPILED_AND_HAS_SBOM: '1'
456+
script: |
457+
set -e
458+
# Load environment variables
459+
eval $(.evergreen/print-compass-env.sh)
460+
.evergreen/compass_package.sh
446461
447462
get_first_party_dependency_list:
448463
- command: s3.get
@@ -570,11 +585,15 @@ functions:
570585
MONGODB_RUNNER_VERSION: ${mongodb_version|}
571586
E2E_TEST_GROUPS: ${e2e_test_groups}
572587
E2E_TEST_GROUP: ${e2e_test_group}
588+
ATLAS_LOCAL_VERSION: latest
573589
script: |
574590
set -e
575591
# Load environment variables
576592
eval $(.evergreen/print-compass-env.sh)
577593
594+
# Start atlas local to test Atlas Search
595+
source .evergreen/start-atlas-local.sh
596+
578597
echo "Running E2E tests while collecting coverage..."
579598
580599
npm run --unsafe-perm --workspace compass-e2e-tests test-ci

.evergreen/print-compass-env.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,13 @@ function printCompassEnv() {
107107
printVar('DEV_VERSION_IDENTIFIER', process.env.DEV_VERSION_IDENTIFIER);
108108
printVar('EVERGREEN_REVISION', process.env.EVERGREEN_REVISION);
109109
printVar('EVERGREEN_REVISION_ORDER_ID', process.env.EVERGREEN_REVISION_ORDER_ID);
110+
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+
}
110117
}
111118

112119
printCompassEnv();

.evergreen/start-atlas-local.sh

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
#!/bin/bash
2+
3+
# Check if ATLAS_LOCAL_VERSION is set
4+
if [ -z "$ATLAS_LOCAL_VERSION" ]; then
5+
echo "ATLAS_LOCAL_VERSION is not set. Skipping script."
6+
return
7+
fi
8+
9+
# Container name
10+
CONTAINER_NAME=compass-e2e-tests-atlas-local
11+
12+
docker rm -f $CONTAINER_NAME || true
13+
14+
cleanup() {
15+
echo "Stopping and removing container..."
16+
docker stop $CONTAINER_NAME || true
17+
docker rm -f $CONTAINER_NAME || true
18+
}
19+
20+
trap cleanup EXIT
21+
22+
# Image name with version
23+
IMAGE_NAME="mongodb/mongodb-atlas-local:$ATLAS_LOCAL_VERSION"
24+
echo docker run --rm --name $CONTAINER_NAME -d -e DO_NOT_TRACK=1 -P "$IMAGE_NAME"
25+
26+
# Start the Docker container
27+
docker run --rm --name $CONTAINER_NAME -d -e DO_NOT_TRACK=1 -P "$IMAGE_NAME"
28+
29+
echo "Waiting for container to become healthy..."
30+
31+
STATUS=""
32+
CONSECUTIVE_FAILED_ATTEMPTS=0
33+
MAX_CONSECUTIVE_FAILED_ATTEMPTS=20
34+
35+
while true; do
36+
INSPECT_OUTPUT=$(docker inspect --format='{{.State.Health.Status}}' $CONTAINER_NAME 2>&1)
37+
if [[ $? -ne 0 ]]; then
38+
echo "Inspect Failed: ${INSPECT_OUTPUT}"
39+
STATUS="failed"
40+
else
41+
STATUS="$INSPECT_OUTPUT"
42+
fi
43+
44+
echo "Status: $STATUS"
45+
46+
if [[ "$STATUS" != "starting" && "$STATUS" != "failed" ]]; then
47+
break
48+
fi
49+
50+
if [[ "$STATUS" == "failed" ]]; then
51+
CONSECUTIVE_FAILED_ATTEMPTS=$((CONSECUTIVE_FAILED_ATTEMPTS + 1))
52+
else
53+
CONSECUTIVE_FAILED_ATTEMPTS=0
54+
fi
55+
56+
if [[ $CONSECUTIVE_FAILED_ATTEMPTS -ge $MAX_CONSECUTIVE_FAILED_ATTEMPTS ]]; then
57+
echo "Maximum number of consecutive failed attempts reached. Exiting."
58+
exit 1
59+
fi
60+
61+
sleep 2
62+
done
63+
64+
if [[ "$STATUS" != "healthy" ]]; then
65+
echo "Atlas Local is not healthy, exiting."
66+
exit 1
67+
fi
68+
69+
EXPOSED_PORT=$(docker inspect --format='{{ (index (index .NetworkSettings.Ports "27017/tcp") 0).HostPort }}' $CONTAINER_NAME)
70+
71+
export ATLAS_LOCAL_URL="mongodb://127.0.0.1:$EXPOSED_PORT/test?directConnection=true"
72+
echo "ATLAS_LOCAL_URL set to $ATLAS_LOCAL_URL"

.github/workflows/authors-and-third-party-notices.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525

2626
- uses: actions/setup-node@v3
2727
with:
28-
node-version: 18.19.1
28+
node-version: 20.16.0
2929
cache: 'npm'
3030

3131
- name: Install npm@10.2.4

.github/workflows/bump-packages.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
2727
- uses: actions/setup-node@v3
2828
with:
29-
node-version: 18.19.1
29+
node-version: 20.16.0
3030
cache: 'npm'
3131

3232
- name: Install npm@10.2.4

.github/workflows/publish-compass.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Setup Node.js Environment
2323
uses: actions/setup-node@v3
2424
with:
25-
node-version: 18.19.1
25+
node-version: 20.16.0
2626
cache: 'npm'
2727

2828
- name: Install npm@10.2.4

.github/workflows/publish-packages.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- name: "Use Node.js 14"
3535
uses: actions/setup-node@v3
3636
with:
37-
node-version: 18.19.1
37+
node-version: 20.16.0
3838

3939
- name: Install npm@10.2.4
4040
run: npm install -g npm@10.2.4

.github/workflows/start-beta.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
3030
- uses: actions/setup-node@v3
3131
with:
32-
node-version: 18.19.1
32+
node-version: 20.16.0
3333
cache: 'npm'
3434

3535
- name: Install npm@10.2.4

.github/workflows/start-ga.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
3030
- uses: actions/setup-node@v3
3131
with:
32-
node-version: 18.19.1
32+
node-version: 20.16.0
3333
cache: 'npm'
3434

3535
- name: Install npm@10.2.4

0 commit comments

Comments
 (0)