Skip to content

Commit

Permalink
Merge branch 'main' into NODE-6747-deployed-lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
baileympearson authored Feb 10, 2025
2 parents 1d2d9c6 + 7bfce01 commit 13e557a
Show file tree
Hide file tree
Showing 173 changed files with 29 additions and 1,480 deletions.
36 changes: 10 additions & 26 deletions .evergreen/config.in.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ command_type: system
# Protect ourself against rogue test case, or curl gone wild, that runs forever
# Good rule of thumb: the averageish length a task takes, times 5
# That roughly accounts for variable system performance for various buildvariants
exec_timeout_secs: 2100
exec_timeout_secs: 7200

# What to do when evergreen hits the timeout (`post:` tasks are run automatically)
timeout:
Expand Down Expand Up @@ -474,7 +474,7 @@ functions:
AWS_CREDENTIAL_TYPE: regular
working_dir: "src"
binary: bash
args:
args:
- .evergreen/run-mongodb-aws-test.sh

"run aws auth test with assume role credentials":
Expand All @@ -489,7 +489,7 @@ functions:
AWS_CREDENTIAL_TYPE: assume-role
working_dir: "src"
binary: bash
args:
args:
- .evergreen/run-mongodb-aws-test.sh

"run aws auth test with aws EC2 credentials":
Expand Down Expand Up @@ -520,7 +520,7 @@ functions:
AWS_CREDENTIAL_TYPE: env-creds
working_dir: "src"
binary: bash
args:
args:
- .evergreen/run-mongodb-aws-test.sh

"run aws auth test with aws credentials and session token as environment variables":
Expand All @@ -535,7 +535,7 @@ functions:
AWS_CREDENTIAL_TYPE: session-creds
working_dir: "src"
binary: bash
args:
args:
- .evergreen/run-mongodb-aws-test.sh

"run aws auth test AssumeRoleWithWebIdentity with AWS_ROLE_SESSION_NAME set":
Expand All @@ -551,7 +551,7 @@ functions:
AWS_ROLE_SESSION_NAME: test
working_dir: "src"
binary: bash
args:
args:
- .evergreen/run-mongodb-aws-test.sh

"run aws auth test AssumeRoleWithWebIdentity with AWS_ROLE_SESSION_NAME unset":
Expand All @@ -566,7 +566,7 @@ functions:
AWS_CREDENTIAL_TYPE: web-identity
working_dir: "src"
binary: bash
args:
args:
- .evergreen/run-mongodb-aws-test.sh

"run aws ECS auth test":
Expand All @@ -582,9 +582,9 @@ functions:
AWS_CREDENTIAL_TYPE: web-identity
working_dir: "src"
binary: bash
args:
args:
- .evergreen/prepare-mongodb-aws-ecs-auth.sh

"run custom csfle tests":
- command: subprocess.exec
type: test
Expand Down Expand Up @@ -620,7 +620,7 @@ functions:
MONGODB_AWS_SDK: 'true'
working_dir: "src"
binary: bash
args:
args:
- .evergreen/run-lambda-aws-tests.sh

"upload test results":
Expand Down Expand Up @@ -708,22 +708,6 @@ functions:
args:
- ${PROJECT_DIRECTORY}/.evergreen/run-benchmarks.sh

# TODO(NODE-6729): Remove this task when the original tasks are using the new runner
"run new spec driver benchmarks":
- command: subprocess.exec
type: test
params:
working_dir: "src"
env:
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
MONGODB_URI: ${MONGODB_URI}
DRIVERS_TOOLS: ${DRIVERS_TOOLS}
MONGODB_CLIENT_OPTIONS: ${MONGODB_CLIENT_OPTIONS}
NEW_BENCH: "true"
binary: bash
args:
- ${PROJECT_DIRECTORY}/.evergreen/run-benchmarks.sh

"run x509 auth tests":
- command: subprocess.exec
type: test
Expand Down
55 changes: 11 additions & 44 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
stepback: true
command_type: system
exec_timeout_secs: 2100
exec_timeout_secs: 7200
timeout:
- command: subprocess.exec
params:
Expand Down Expand Up @@ -633,20 +633,6 @@ functions:
binary: bash
args:
- ${PROJECT_DIRECTORY}/.evergreen/run-benchmarks.sh
run new spec driver benchmarks:
- command: subprocess.exec
type: test
params:
working_dir: src
env:
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
MONGODB_URI: ${MONGODB_URI}
DRIVERS_TOOLS: ${DRIVERS_TOOLS}
MONGODB_CLIENT_OPTIONS: ${MONGODB_CLIENT_OPTIONS}
NEW_BENCH: 'true'
binary: bash
args:
- ${PROJECT_DIRECTORY}/.evergreen/run-benchmarks.sh
run x509 auth tests:
- command: subprocess.exec
type: test
Expand Down Expand Up @@ -2919,7 +2905,7 @@ tasks:
tags:
- run-spec-benchmark-tests
- performance
exec_timeout_secs: 3600
exec_timeout_secs: 7200
commands:
- command: expansions.update
type: setup
Expand All @@ -2935,12 +2921,12 @@ tasks:
- func: run spec driver benchmarks
- command: perf.send
params:
file: src/results.json
file: src/test/benchmarks/driver_bench/results.json
- name: run-spec-benchmark-tests-node-server-timeoutMS-120000
tags:
- run-spec-benchmark-tests
- performance
exec_timeout_secs: 3600
exec_timeout_secs: 7200
commands:
- command: expansions.update
type: setup
Expand All @@ -2956,12 +2942,12 @@ tasks:
- func: run spec driver benchmarks
- command: perf.send
params:
file: src/results.json
file: src/test/benchmarks/driver_bench/results.json
- name: run-spec-benchmark-tests-node-server-timeoutMS-0
tags:
- run-spec-benchmark-tests
- performance
exec_timeout_secs: 3600
exec_timeout_secs: 7200
commands:
- command: expansions.update
type: setup
Expand All @@ -2977,12 +2963,12 @@ tasks:
- func: run spec driver benchmarks
- command: perf.send
params:
file: src/results.json
file: src/test/benchmarks/driver_bench/results.json
- name: run-spec-benchmark-tests-node-server-monitorCommands-true
tags:
- run-spec-benchmark-tests
- performance
exec_timeout_secs: 3600
exec_timeout_secs: 7200
commands:
- command: expansions.update
type: setup
Expand All @@ -2998,12 +2984,12 @@ tasks:
- func: run spec driver benchmarks
- command: perf.send
params:
file: src/results.json
file: src/test/benchmarks/driver_bench/results.json
- name: run-spec-benchmark-tests-node-server-logging
tags:
- run-spec-benchmark-tests
- performance
exec_timeout_secs: 3600
exec_timeout_secs: 7200
commands:
- command: expansions.update
type: setup
Expand All @@ -3019,25 +3005,7 @@ tasks:
- func: run spec driver benchmarks
- command: perf.send
params:
file: src/results.json
- name: run-spec-benchmark-tests-node-server-new
tags:
- run-spec-benchmark-tests
- performance
exec_timeout_secs: 18000
commands:
- command: expansions.update
type: setup
params:
updates:
- {key: NODE_LTS_VERSION, value: v22.11.0}
- {key: VERSION, value: v6.0-perf}
- {key: TOPOLOGY, value: server}
- {key: AUTH, value: noauth}
- {key: MONGODB_CLIENT_OPTIONS, value: '{}'}
- func: install dependencies
- func: bootstrap mongo-orchestration
- func: run new spec driver benchmarks
file: src/test/benchmarks/driver_bench/results.json
- name: run-unit-tests-node-16
tags:
- unit-tests
Expand Down Expand Up @@ -4857,7 +4825,6 @@ buildvariants:
- run-spec-benchmark-tests-node-server-timeoutMS-0
- run-spec-benchmark-tests-node-server-monitorCommands-true
- run-spec-benchmark-tests-node-server-logging
- run-spec-benchmark-tests-node-server-new
- name: rhel8-custom-dependency-tests
display_name: Custom Dependency Version Test
run_on: rhel80-large
Expand Down
29 changes: 3 additions & 26 deletions .evergreen/generate_evergreen_tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ function addPerformanceTasks() {
const makePerfTask = (name, MONGODB_CLIENT_OPTIONS) => ({
name,
tags: ['run-spec-benchmark-tests', 'performance'],
exec_timeout_secs: 3600,
exec_timeout_secs: 7200,
commands: [
updateExpansions({
NODE_LTS_VERSION: 'v22.11.0',
Expand All @@ -744,33 +744,11 @@ function addPerformanceTasks() {
].map(func => ({ func })),
{
command: 'perf.send',
params: { file: 'src/results.json' }
params: { file: 'src/test/benchmarks/driver_bench/results.json' }
}
]
});

// TODO(NODE-6729): Remove this task when the original tasks are using the new runner
const makePerfTaskNEW = (name, MONGODB_CLIENT_OPTIONS) => ({
name,
tags: ['run-spec-benchmark-tests', 'performance'],
exec_timeout_secs: 18000,
commands: [
updateExpansions({
NODE_LTS_VERSION: 'v22.11.0',
VERSION: 'v6.0-perf',
TOPOLOGY: 'server',
AUTH: 'noauth',
MONGODB_CLIENT_OPTIONS: JSON.stringify(MONGODB_CLIENT_OPTIONS)
}),
...[
'install dependencies',
'bootstrap mongo-orchestration',
'run new spec driver benchmarks'
].map(func => ({ func }))
// No perf send! just testing
]
});

const tasks = [
makePerfTask('run-spec-benchmark-tests-node-server', {}),
makePerfTask('run-spec-benchmark-tests-node-server-timeoutMS-120000', { timeoutMS: 120000 }),
Expand All @@ -781,8 +759,7 @@ function addPerformanceTasks() {
makePerfTask('run-spec-benchmark-tests-node-server-logging', {
mongodbLogPath: 'stderr',
mongodbLogComponentSeverities: { default: 'trace' }
}),
makePerfTaskNEW('run-spec-benchmark-tests-node-server-new', {})
})
];

TASKS.push(...tasks);
Expand Down
7 changes: 0 additions & 7 deletions .evergreen/run-benchmarks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@ export MONGODB_CLIENT_OPTIONS=$MONGODB_CLIENT_OPTIONS

npm run build:ts

if [[ "${NEW_BENCH:-}" == "true" ]]; then
pushd test/benchmarks/driver_bench
npm start
popd
exit 0
fi

# If MONGODB_CLIENT_OPTIONS contains mongodbLogComponentSeverities redirect stderr to a file
if [[ $MONGODB_CLIENT_OPTIONS == *"mongodbLogComponentSeverities"* ]]; then
npm run check:bench 2> bench.log
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
"build:docs": "./etc/docs/build.ts",
"build:typedoc": "typedoc",
"build:nightly": "node ./.github/scripts/nightly.mjs",
"check:bench": "node test/benchmarks/driverBench",
"check:bench": "npm --prefix test/benchmarks/driver_bench start",
"check:coverage": "nyc npm run test:all",
"check:integration-coverage": "nyc npm run check:test",
"check:lambda": "mocha --config test/mocha_lambda.json test/integration/node-specific/examples/handler.test.js",
Expand Down
Loading

0 comments on commit 13e557a

Please sign in to comment.