-
Notifications
You must be signed in to change notification settings - Fork 190
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/beta-releases' into ga-releases
- Loading branch information
Showing
381 changed files
with
17,895 additions
and
10,248 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
#!/bin/bash | ||
|
||
# Check if ATLAS_LOCAL_VERSION is set | ||
if [ -z "$ATLAS_LOCAL_VERSION" ]; then | ||
echo "ATLAS_LOCAL_VERSION is not set. Skipping script." | ||
return | ||
fi | ||
|
||
# Container name | ||
CONTAINER_NAME=compass-e2e-tests-atlas-local | ||
|
||
docker rm -f $CONTAINER_NAME || true | ||
|
||
cleanup() { | ||
echo "Stopping and removing container..." | ||
docker stop $CONTAINER_NAME || true | ||
docker rm -f $CONTAINER_NAME || true | ||
} | ||
|
||
trap cleanup EXIT | ||
|
||
# Image name with version | ||
IMAGE_NAME="mongodb/mongodb-atlas-local:$ATLAS_LOCAL_VERSION" | ||
echo docker run --rm --name $CONTAINER_NAME -d -e DO_NOT_TRACK=1 -P "$IMAGE_NAME" | ||
|
||
# Start the Docker container | ||
docker run --rm --name $CONTAINER_NAME -d -e DO_NOT_TRACK=1 -P "$IMAGE_NAME" | ||
|
||
echo "Waiting for container to become healthy..." | ||
|
||
STATUS="" | ||
CONSECUTIVE_FAILED_ATTEMPTS=0 | ||
MAX_CONSECUTIVE_FAILED_ATTEMPTS=20 | ||
|
||
while true; do | ||
INSPECT_OUTPUT=$(docker inspect --format='{{.State.Health.Status}}' $CONTAINER_NAME 2>&1) | ||
if [[ $? -ne 0 ]]; then | ||
echo "Inspect Failed: ${INSPECT_OUTPUT}" | ||
STATUS="failed" | ||
else | ||
STATUS="$INSPECT_OUTPUT" | ||
fi | ||
|
||
echo "Status: $STATUS" | ||
|
||
if [[ "$STATUS" != "starting" && "$STATUS" != "failed" ]]; then | ||
break | ||
fi | ||
|
||
if [[ "$STATUS" == "failed" ]]; then | ||
CONSECUTIVE_FAILED_ATTEMPTS=$((CONSECUTIVE_FAILED_ATTEMPTS + 1)) | ||
else | ||
CONSECUTIVE_FAILED_ATTEMPTS=0 | ||
fi | ||
|
||
if [[ $CONSECUTIVE_FAILED_ATTEMPTS -ge $MAX_CONSECUTIVE_FAILED_ATTEMPTS ]]; then | ||
echo "Maximum number of consecutive failed attempts reached. Exiting." | ||
exit 1 | ||
fi | ||
|
||
sleep 2 | ||
done | ||
|
||
if [[ "$STATUS" != "healthy" ]]; then | ||
echo "Atlas Local is not healthy, exiting." | ||
exit 1 | ||
fi | ||
|
||
EXPOSED_PORT=$(docker inspect --format='{{ (index (index .NetworkSettings.Ports "27017/tcp") 0).HostPort }}' $CONTAINER_NAME) | ||
|
||
export ATLAS_LOCAL_URL="mongodb://127.0.0.1:$EXPOSED_PORT/test?directConnection=true" | ||
echo "ATLAS_LOCAL_URL set to $ATLAS_LOCAL_URL" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ jobs: | |
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.19.1 | ||
node-version: 20.16.0 | ||
cache: 'npm' | ||
|
||
- name: Install [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,7 @@ jobs: | |
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.19.1 | ||
node-version: 20.16.0 | ||
cache: 'npm' | ||
|
||
- name: Install [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ jobs: | |
- name: Setup Node.js Environment | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.19.1 | ||
node-version: 20.16.0 | ||
cache: 'npm' | ||
|
||
- name: Install [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,7 @@ jobs: | |
- name: "Use Node.js 14" | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.19.1 | ||
node-version: 20.16.0 | ||
|
||
- name: Install [email protected] | ||
run: npm install -g [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ jobs: | |
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.19.1 | ||
node-version: 20.16.0 | ||
cache: 'npm' | ||
|
||
- name: Install [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ jobs: | |
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.19.1 | ||
node-version: 20.16.0 | ||
cache: 'npm' | ||
|
||
- name: Install [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,7 @@ jobs: | |
git config --local user.name "github-actions[bot]" | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.19.1 | ||
node-version: 20.16.0 | ||
cache: 'npm' | ||
|
||
- name: Install [email protected] | ||
|
@@ -50,4 +50,4 @@ jobs: | |
branch: ci/update-electron | ||
title: 'chore: update electron' | ||
body: | | ||
- Update electron | ||
- Update electron |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,3 +88,4 @@ Mingjun Yin <[email protected]> | |
Ben Radcliffe <[email protected]> | ||
Betsy Button <[email protected]> | ||
Vivian Xiao <[email protected]> | ||
admin-token-bot <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.