Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into NODE-3921
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/connection_string.ts
  • Loading branch information
biniona-mongodb committed Oct 4, 2022
2 parents 5bcf4a7 + dc62bcb commit 75cb6cf
Show file tree
Hide file tree
Showing 499 changed files with 16,598 additions and 4,169 deletions.
12 changes: 9 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,9 @@
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": ["./tsconfig.json"]
"project": [
"./tsconfig.json"
]
},
"extends": [
"plugin:@typescript-eslint/recommended-requiring-type-checking"
Expand All @@ -212,9 +214,13 @@
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-unsafe-call": "off",

"@typescript-eslint/restrict-plus-operands": "off",
"@typescript-eslint/restrict-template-expressions": "off"
"@typescript-eslint/restrict-template-expressions": "off",
"no-return-await": "off",
"@typescript-eslint/return-await": [
"error",
"in-try-catch"
]
}
},
{
Expand Down
101 changes: 30 additions & 71 deletions .evergreen/config.in.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,81 +28,44 @@ functions:
params:
directory: "src"
shallow_clone: true # speed things up by limiting clone depth to 100

# Make an evergreen expansion file with dynamic values
- command: shell.exec
- command: subprocess.exec
params:
working_dir: "src"
script: |
# Get the current unique version of this checkout
if [ "${is_patch}" = "true" ]; then
CURRENT_VERSION=$(git describe)-patch-${version_id}
else
CURRENT_VERSION=latest
fi
export DRIVERS_TOOLS="$(pwd)/../drivers-tools"
export PROJECT_DIRECTORY="$(pwd)"
export MONGO_ORCHESTRATION_HOME="$DRIVERS_TOOLS/.evergreen/orchestration"
export MONGODB_BINARIES="$DRIVERS_TOOLS/mongodb/bin"
export UPLOAD_BUCKET="${project}"
# fix paths on windows
if [ "Windows_NT" = "$OS" ]; then
export DRIVERS_TOOLS=$(cygpath -m -a $DRIVERS_TOOLS)
export MONGO_ORCHESTRATION_HOME=$(cygpath -m -a $MONGO_ORCHESTRATION_HOME)
export MONGODB_BINARIES=$(cygpath -m -a $MONGODB_BINARIES)
export PROJECT_DIRECTORY=$(cygpath -m -a $PROJECT_DIRECTORY)
fi
cat <<EOT > expansion.yml
CURRENT_VERSION: "$CURRENT_VERSION"
DRIVERS_TOOLS: "$DRIVERS_TOOLS"
MONGO_ORCHESTRATION_HOME: "$MONGO_ORCHESTRATION_HOME"
MONGODB_BINARIES: "$MONGODB_BINARIES"
UPLOAD_BUCKET: "$UPLOAD_BUCKET"
PROJECT_DIRECTORY: "$PROJECT_DIRECTORY"
PREPARE_SHELL: |
set -o errexit
set -o xtrace
export DRIVERS_TOOLS="$DRIVERS_TOOLS"
export MONGO_ORCHESTRATION_HOME="$MONGO_ORCHESTRATION_HOME"
export MONGODB_BINARIES="$MONGODB_BINARIES"
export UPLOAD_BUCKET="$UPLOAD_BUCKET"
export PROJECT_DIRECTORY="$PROJECT_DIRECTORY"
export TMPDIR="$MONGO_ORCHESTRATION_HOME/db"
export PATH="$MONGODB_BINARIES:$PATH"
export PROJECT="${project}"
EOT
# See what we've done
cat expansion.yml
binary: bash
env:
is_patch: ${is_patch}
project: ${project}
args:
- .evergreen/prepare-shell.sh

# Load the expansion file to make an evergreen variable with the current unique version
- command: expansions.update
params:
file: src/expansion.yml

"prepare resources":
- command: shell.exec
params:
script: |
${PREPARE_SHELL}
git clone --depth 1 https://github.com/mongodb-labs/drivers-evergreen-tools.git $DRIVERS_TOOLS
echo "{ \"releases\": { \"default\": \"$MONGODB_BINARIES\" }}" > $MONGO_ORCHESTRATION_HOME/orchestration.config
"bootstrap mongo-orchestration":
- command: shell.exec
- command: subprocess.exec
params:
script: |
${PREPARE_SHELL}
MONGODB_VERSION=${VERSION} TOPOLOGY=${TOPOLOGY} \
AUTH=${AUTH} SSL=${SSL} \
ORCHESTRATION_FILE=${ORCHESTRATION_FILE} \
REQUIRE_API_VERSION=${REQUIRE_API_VERSION} \
LOAD_BALANCER=${LOAD_BALANCER} \
COMPRESSOR=${COMPRESSOR} \
bash ${DRIVERS_TOOLS}/.evergreen/run-orchestration.sh
binary: bash
add_expansions_to_env: true
env:
# The following is the settings for how we want to launch mongodb
MONGODB_VERSION: ${VERSION}
TOPOLOGY: ${TOPOLOGY}
AUTH: ${AUTH}
SSL: ${SSL}
ORCHESTRATION_FILE: ${ORCHESTRATION_FILE}
REQUIRE_API_VERSION: ${REQUIRE_API_VERSION}
LOAD_BALANCER: ${LOAD_BALANCER}
COMPRESSOR: ${COMPRESSOR}
# These are paths necessary for launching mongodb
DRIVERS_TOOLS: ${DRIVERS_TOOLS}
MONGODB_BINARIES: ${MONGODB_BINARIES}
args:
- src/.evergreen/run-orchestration.sh

# run-orchestration generates expansion file with the MONGODB_URI for the cluster
- command: expansions.update
params:
Expand Down Expand Up @@ -175,7 +138,7 @@ functions:
MONGODB_URI="${MONGODB_URI}" \
AUTH=${AUTH} SSL=${SSL} TEST_CSFLE=true \
MONGODB_API_VERSION="${MONGODB_API_VERSION}" \
NODE_VERSION=${NODE_VERSION} SKIP_DEPS=${SKIP_DEPS|1} NO_EXIT=${NO_EXIT|1} \
NODE_VERSION=${NODE_VERSION} SKIP_DEPS=${SKIP_DEPS|1} \
bash ${PROJECT_DIRECTORY}/.evergreen/run-tests.sh
"run serverless tests":
Expand Down Expand Up @@ -244,7 +207,6 @@ functions:
MULTI_MONGOS_LB_URI="${MULTI_MONGOS_LB_URI}" \
TOPOLOGY="${TOPOLOGY}" \
SKIP_DEPS=${SKIP_DEPS|1} \
NO_EXIT=${NO_EXIT|1} \
LOAD_BALANCER="${LOAD_BALANCER}" \
bash ${PROJECT_DIRECTORY}/.evergreen/run-tests.sh
Expand All @@ -265,7 +227,6 @@ functions:
TOPOLOGY="${TOPOLOGY}" \
COMPRESSOR="${COMPRESSOR}" \
SKIP_DEPS=${SKIP_DEPS|1} \
NO_EXIT=${NO_EXIT|1} \
bash ${PROJECT_DIRECTORY}/.evergreen/run-tests.sh
"run lint checks":
Expand Down Expand Up @@ -942,7 +903,7 @@ tasks:
commands:
- func: install dependencies
vars:
NODE_LTS_NAME: gallium
NODE_LTS_NAME: hydrogen
- func: bootstrap mongo-orchestration
vars:
VERSION: rapid
Expand All @@ -959,7 +920,6 @@ task_groups:
setup_group_timeout_secs: 1800 # 30 minutes
setup_group:
- func: "fetch source"
- func: "prepare resources"
- command: shell.exec
params:
shell: "bash"
Expand Down Expand Up @@ -991,7 +951,6 @@ task_groups:

pre:
- func: "fetch source"
- func: "prepare resources"
- func: "windows fix"
- func: "fix absolute paths"
- func: "make files executable"
Expand All @@ -1006,6 +965,6 @@ ignore:
buildvariants:
- name: performance-tests
display_name: Performance Test
run_on: ubuntu1804-large
run_on: rhel80-large
tasks:
- run-spec-benchmark-tests
Loading

0 comments on commit 75cb6cf

Please sign in to comment.