Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(NODE-5908): support range v2 #4141

Merged
merged 8 commits into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions .evergreen/config.in.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ command_type: system
# That roughly accounts for variable system performance for various buildvariants
exec_timeout_secs: 2100

patch_aliases:
aditi-khare-mongoDB marked this conversation as resolved.
Show resolved Hide resolved
- alias: "nightly"
variant_tags: ["nightly"]
task_tags: [".*"]

# What to do when evergreen hits the timeout (`post:` tasks are run automatically)
timeout:
- command: subprocess.exec
Expand Down Expand Up @@ -272,6 +277,7 @@ functions:
- command: shell.exec
type: test
params:
shell: bash
working_dir: src
timeout_secs: 300
script: |
Expand Down Expand Up @@ -475,8 +481,6 @@ functions:
export AWS_CMK_ID='${AWS_CMK_ID}'
export AWS_ACCESS_KEY_ID='${AWS_ACCESS_KEY_ID}'
export AWS_SECRET_ACCESS_KEY='${AWS_SECRET_ACCESS_KEY}'
export CSFLE_GIT_REF='${CSFLE_GIT_REF}'
export CDRIVER_GIT_REF='${CDRIVER_GIT_REF}'
EOT
- command: shell.exec
type: test
Expand Down Expand Up @@ -914,8 +918,6 @@ functions:
export AWS_SECRET_ACCESS_KEY='${AWS_SECRET_ACCESS_KEY}'
export AWS_REGION='${AWS_REGION}'
export AWS_CMK_ID='${AWS_CMK_ID}'
export CSFLE_GIT_REF='${CSFLE_GIT_REF}'
export CDRIVER_GIT_REF='${CDRIVER_GIT_REF}'
EOT
- command: shell.exec
type: test
Expand Down Expand Up @@ -1074,6 +1076,18 @@ functions:
args:
- ${PROJECT_DIRECTORY}/.evergreen/run-x509-tests.sh

install mongodb-client-encryption:
- command: subprocess.exec
type: setup
params:
working_dir: "src"
env:
INSTALL_DIR: mongodb-client-encryption
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
binary: bash
args:
- ${PROJECT_DIRECTORY}/.evergreen/install-mongodb-client-encryption.sh

tasks:
- name: 'test-atlas-data-lake'
tags: ["datalake", "mongohouse"]
Expand Down
119 changes: 52 additions & 67 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
stepback: true
command_type: system
exec_timeout_secs: 2100
patch_aliases:
- alias: nightly
variant_tags:
- nightly
task_tags:
- .*
timeout:
- command: subprocess.exec
params:
Expand Down Expand Up @@ -241,6 +247,7 @@ functions:
- command: shell.exec
type: test
params:
shell: bash
working_dir: src
timeout_secs: 300
script: |
Expand Down Expand Up @@ -428,8 +435,6 @@ functions:
export AWS_CMK_ID='${AWS_CMK_ID}'
export AWS_ACCESS_KEY_ID='${AWS_ACCESS_KEY_ID}'
export AWS_SECRET_ACCESS_KEY='${AWS_SECRET_ACCESS_KEY}'
export CSFLE_GIT_REF='${CSFLE_GIT_REF}'
export CDRIVER_GIT_REF='${CDRIVER_GIT_REF}'
EOT
- command: shell.exec
type: test
Expand Down Expand Up @@ -886,8 +891,6 @@ functions:
export AWS_SECRET_ACCESS_KEY='${AWS_SECRET_ACCESS_KEY}'
export AWS_REGION='${AWS_REGION}'
export AWS_CMK_ID='${AWS_CMK_ID}'
export CSFLE_GIT_REF='${CSFLE_GIT_REF}'
export CDRIVER_GIT_REF='${CDRIVER_GIT_REF}'
EOT
- command: shell.exec
type: test
Expand Down Expand Up @@ -1035,6 +1038,17 @@ functions:
binary: bash
args:
- ${PROJECT_DIRECTORY}/.evergreen/run-x509-tests.sh
install mongodb-client-encryption:
- command: subprocess.exec
type: setup
params:
working_dir: src
env:
INSTALL_DIR: mongodb-client-encryption
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
binary: bash
args:
- ${PROJECT_DIRECTORY}/.evergreen/install-mongodb-client-encryption.sh
tasks:
- name: test-atlas-data-lake
tags:
Expand Down Expand Up @@ -3516,24 +3530,7 @@ tasks:
variant: '*'
status: '*'
patch_optional: true
- name: run-custom-csfle-tests-5.0-pinned-commit
tags:
- run-custom-dependency-tests
commands:
- command: expansions.update
type: setup
params:
updates:
- {key: NODE_LTS_VERSION, value: '16'}
- {key: NPM_VERSION, value: '9'}
- {key: VERSION, value: '5.0'}
- {key: TOPOLOGY, value: replica_set}
- {key: CSFLE_GIT_REF, value: 974a4614f8c1c3786e5e39fa63568d83f4f69ebd}
- func: install dependencies
- func: bootstrap mongo-orchestration
- func: bootstrap kms servers
- func: run custom csfle tests
- name: run-custom-csfle-tests-5.0-master
- name: run-custom-csfle-tests-5.0
tags:
- run-custom-dependency-tests
commands:
Expand All @@ -3545,29 +3542,12 @@ tasks:
- {key: NPM_VERSION, value: '9'}
- {key: VERSION, value: '5.0'}
- {key: TOPOLOGY, value: replica_set}
- {key: CSFLE_GIT_REF, value: master}
- func: install dependencies
- func: bootstrap mongo-orchestration
- func: bootstrap kms servers
- func: run custom csfle tests
- name: run-custom-csfle-tests-rapid-pinned-commit
tags:
- run-custom-dependency-tests
commands:
- command: expansions.update
type: setup
params:
updates:
- {key: NODE_LTS_VERSION, value: '16'}
- {key: NPM_VERSION, value: '9'}
- {key: VERSION, value: rapid}
- {key: TOPOLOGY, value: replica_set}
- {key: CSFLE_GIT_REF, value: 974a4614f8c1c3786e5e39fa63568d83f4f69ebd}
- func: install dependencies
- func: bootstrap mongo-orchestration
- func: bootstrap kms servers
- func: install mongodb-client-encryption
- func: run custom csfle tests
- name: run-custom-csfle-tests-rapid-master
- name: run-custom-csfle-tests-rapid
tags:
- run-custom-dependency-tests
commands:
Expand All @@ -3579,29 +3559,12 @@ tasks:
- {key: NPM_VERSION, value: '9'}
- {key: VERSION, value: rapid}
- {key: TOPOLOGY, value: replica_set}
- {key: CSFLE_GIT_REF, value: master}
- func: install dependencies
- func: bootstrap mongo-orchestration
- func: bootstrap kms servers
- func: run custom csfle tests
- name: run-custom-csfle-tests-latest-pinned-commit
tags:
- run-custom-dependency-tests
commands:
- command: expansions.update
type: setup
params:
updates:
- {key: NODE_LTS_VERSION, value: '16'}
- {key: NPM_VERSION, value: '9'}
- {key: VERSION, value: latest}
- {key: TOPOLOGY, value: replica_set}
- {key: CSFLE_GIT_REF, value: 974a4614f8c1c3786e5e39fa63568d83f4f69ebd}
- func: install dependencies
- func: bootstrap mongo-orchestration
- func: bootstrap kms servers
- func: install mongodb-client-encryption
- func: run custom csfle tests
- name: run-custom-csfle-tests-latest-master
- name: run-custom-csfle-tests-latest
tags:
- run-custom-dependency-tests
commands:
Expand All @@ -3613,10 +3576,10 @@ tasks:
- {key: NPM_VERSION, value: '9'}
- {key: VERSION, value: latest}
- {key: TOPOLOGY, value: replica_set}
- {key: CSFLE_GIT_REF, value: master}
- func: install dependencies
- func: bootstrap mongo-orchestration
- func: bootstrap kms servers
- func: install mongodb-client-encryption
- func: run custom csfle tests
- name: test-latest-driver-mongodb-client-encryption-6.0.0
tags:
Expand Down Expand Up @@ -4348,6 +4311,26 @@ tasks:
- func: bootstrap mongo-orchestration
- func: bootstrap kms servers
- func: run tests
- name: run-custom-csfle-tests-with-libmongocrypt-latest
tags:
- run-custom-dependency-tests
- nightly
commands:
- command: expansions.update
type: setup
params:
updates:
- {key: NODE_LTS_VERSION, value: '16'}
- {key: NPM_VERSION, value: '9'}
- {key: VERSION, value: '8.0'}
- {key: TOPOLOGY, value: replica_set}
- func: install dependencies
- func: bootstrap mongo-orchestration
- func: bootstrap kms servers
- func: install mongodb-client-encryption
vars:
LIBMONGOCRYPT_VERSION: latest
- func: run custom csfle tests
task_groups:
- name: serverless_task_group
setup_group_can_fail_task: true
Expand Down Expand Up @@ -5118,12 +5101,9 @@ buildvariants:
display_name: Custom Dependency Version Test
run_on: rhel80-large
tasks:
- run-custom-csfle-tests-5.0-pinned-commit
- run-custom-csfle-tests-5.0-master
- run-custom-csfle-tests-rapid-pinned-commit
- run-custom-csfle-tests-rapid-master
- run-custom-csfle-tests-latest-pinned-commit
- run-custom-csfle-tests-latest-master
- run-custom-csfle-tests-5.0
- run-custom-csfle-tests-rapid
- run-custom-csfle-tests-latest
- test-latest-driver-mongodb-client-encryption-6.0.0
- name: rhel8-test-serverless
display_name: Serverless Test
Expand Down Expand Up @@ -5217,3 +5197,8 @@ buildvariants:
run_on: rhel80-large
tasks:
- test_atlas_task_group_search_indexes
- name: nightly
display_name: Nightly Build
run_on: rhel80-large
tasks:
- .nightly
79 changes: 54 additions & 25 deletions .evergreen/generate_evergreen_tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -579,33 +579,54 @@ BUILD_VARIANTS.push({
tasks: ['test-atlas-data-lake']
});

const oneOffFuncAsTasks = [];
const NIGHTLY_TASKS = [
{
name: `run-custom-csfle-tests-with-libmongocrypt-latest`,
tags: ['run-custom-dependency-tests', 'nightly'],
commands: [
updateExpansions({
NODE_LTS_VERSION: LOWEST_LTS,
NPM_VERSION: 9,
VERSION: '8.0',
TOPOLOGY: 'replica_set',
}),
{ func: 'install dependencies' },
{ func: 'bootstrap mongo-orchestration' },
{ func: 'bootstrap kms servers' },
{
func: 'install mongodb-client-encryption',
vars: {
'LIBMONGOCRYPT_VERSION': 'latest'
}
},
{ func: 'run custom csfle tests' }
]
}
];

const FLE_PINNED_COMMIT = '974a4614f8c1c3786e5e39fa63568d83f4f69ebd';
aditi-khare-mongoDB marked this conversation as resolved.
Show resolved Hide resolved
const customDependencyTests = [];

for (const version of ['5.0', 'rapid', 'latest']) {
for (const ref of [FLE_PINNED_COMMIT, 'master']) {
oneOffFuncAsTasks.push({
name: `run-custom-csfle-tests-${version}-${ref === 'master' ? ref : 'pinned-commit'}`,
tags: ['run-custom-dependency-tests'],
commands: [
updateExpansions({
NODE_LTS_VERSION: LOWEST_LTS,
NPM_VERSION: 9,
VERSION: version,
TOPOLOGY: 'replica_set',
CSFLE_GIT_REF: ref
}),
{ func: 'install dependencies' },
{ func: 'bootstrap mongo-orchestration' },
{ func: 'bootstrap kms servers' },
{ func: 'run custom csfle tests' }
]
});
}
customDependencyTests.push({
name: `run-custom-csfle-tests-${version}`,
tags: ['run-custom-dependency-tests'],
commands: [
updateExpansions({
NODE_LTS_VERSION: LOWEST_LTS,
NPM_VERSION: 9,
VERSION: version,
TOPOLOGY: 'replica_set',
}),
{ func: 'install dependencies' },
{ func: 'bootstrap mongo-orchestration' },
{ func: 'bootstrap kms servers' },
{ func: 'install mongodb-client-encryption' },
{ func: 'run custom csfle tests' }
]
});
}

oneOffFuncAsTasks.push({
customDependencyTests.push({
name: `test-latest-driver-mongodb-client-encryption-6.0.0`,
tags: ['run-custom-dependency-tests'],
commands: [
Expand Down Expand Up @@ -641,13 +662,13 @@ const coverageTask = {
};

SINGLETON_TASKS.push(coverageTask);
SINGLETON_TASKS.push(...oneOffFuncAsTasks);
SINGLETON_TASKS.push(...customDependencyTests);

BUILD_VARIANTS.push({
name: 'rhel8-custom-dependency-tests',
display_name: 'Custom Dependency Version Test',
run_on: DEFAULT_OS,
tasks: oneOffFuncAsTasks.map(({ name }) => name)
tasks: customDependencyTests.map(({ name }) => name)
});

// special case for serverless testing
Expand Down Expand Up @@ -735,6 +756,13 @@ BUILD_VARIANTS.push({
tasks: ['test_atlas_task_group_search_indexes']
});

BUILD_VARIANTS.push({
name: 'nightly',
display_name: 'Nightly Build',
run_on: DEFAULT_OS,
tasks: ['.nightly']
})

// TODO(NODE-4575): unskip zstd and snappy on node 16
for (const variant of BUILD_VARIANTS.filter(
variant => variant.expansions && [16, 18, 20].includes(variant.expansions.NODE_LTS_VERSION)
Expand All @@ -758,7 +786,8 @@ fileData.tasks = (fileData.tasks || [])
.concat(SINGLETON_TASKS)
.concat(AUTH_DISABLED_TASKS)
.concat(AWS_LAMBDA_HANDLER_TASKS)
.concat(MONGOCRYPTD_CSFLE_TASKS);
.concat(MONGOCRYPTD_CSFLE_TASKS)
.concat(NIGHTLY_TASKS);
nbbeeken marked this conversation as resolved.
Show resolved Hide resolved

fileData.buildvariants = (fileData.buildvariants || []).concat(BUILD_VARIANTS);

Expand Down
Loading