Skip to content

Commit 10123cd

Browse files
Merge remote-tracking branch 'origin/main' into beta-releases
2 parents eeccaf8 + 4ffe60d commit 10123cd

File tree

87 files changed

+4115
-3744
lines changed

Some content is hidden

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

87 files changed

+4115
-3744
lines changed

.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: 5 additions & 5 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}
@@ -589,11 +585,15 @@ functions:
589585
MONGODB_RUNNER_VERSION: ${mongodb_version|}
590586
E2E_TEST_GROUPS: ${e2e_test_groups}
591587
E2E_TEST_GROUP: ${e2e_test_group}
588+
ATLAS_LOCAL_VERSION: latest
592589
script: |
593590
set -e
594591
# Load environment variables
595592
eval $(.evergreen/print-compass-env.sh)
596593
594+
# Start atlas local to test Atlas Search
595+
source .evergreen/start-atlas-local.sh
596+
597597
echo "Running E2E tests while collecting coverage..."
598598
599599
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 [email protected]

.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 [email protected]

.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 [email protected]

.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 [email protected]
4040
run: npm install -g [email protected]

.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 [email protected]

0 commit comments

Comments
 (0)