0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-21 12:39:08 +01:00

SERVER-95076 Add deterministic versions of several fuzzers to "query/tasks.yml" (#27336)

GitOrigin-RevId: 5da46df759cef1eb157bb315ba01118ff43db047
This commit is contained in:
Drew Paroski 2024-09-27 17:08:03 -04:00 committed by MongoDB Bot
parent 2a4a6c6a72
commit 7b56a6bebc
15 changed files with 314 additions and 9 deletions

View File

@ -0,0 +1,26 @@
##########################################################
# THIS IS A GENERATED FILE -- DO NOT MODIFY.
# IF YOU WISH TO MODIFY THIS SUITE, MODIFY THE CORRESPONDING MATRIX SUITE MAPPING FILE
# AND REGENERATE THE MATRIX SUITES.
#
# matrix suite mapping file: buildscripts/resmokeconfig/matrix_suites/mappings/aggregation_multiversion_fuzzer_deterministic_last_continuous.yml
# regenerate matrix suites: buildscripts/resmoke.py generate-matrix-suites && bazel run //:format
##########################################################
executor:
archive:
tests: true
config:
shell_options:
global_vars:
TestData:
clusterType: standalone
internalQueryAppendIdToSetWindowFieldsSort: true
internalQueryMaxAllowedDensifyDocs: 1000
traceExceptions: false
useRandomBinVersionsWithinReplicaSet: last-continuous
nodb: ""
matrix_suite: true
selector:
roots:
- jstestfuzz/out/*.js
test_kind: js_test

View File

@ -0,0 +1,26 @@
##########################################################
# THIS IS A GENERATED FILE -- DO NOT MODIFY.
# IF YOU WISH TO MODIFY THIS SUITE, MODIFY THE CORRESPONDING MATRIX SUITE MAPPING FILE
# AND REGENERATE THE MATRIX SUITES.
#
# matrix suite mapping file: buildscripts/resmokeconfig/matrix_suites/mappings/aggregation_multiversion_fuzzer_deterministic_last_lts.yml
# regenerate matrix suites: buildscripts/resmoke.py generate-matrix-suites && bazel run //:format
##########################################################
executor:
archive:
tests: true
config:
shell_options:
global_vars:
TestData:
clusterType: standalone
internalQueryAppendIdToSetWindowFieldsSort: true
internalQueryMaxAllowedDensifyDocs: 1000
traceExceptions: false
useRandomBinVersionsWithinReplicaSet: last-lts
nodb: ""
matrix_suite: true
selector:
roots:
- jstestfuzz/out/*.js
test_kind: js_test

View File

@ -0,0 +1,22 @@
##########################################################
# THIS IS A GENERATED FILE -- DO NOT MODIFY.
# IF YOU WISH TO MODIFY THIS SUITE, MODIFY THE CORRESPONDING MATRIX SUITE MAPPING FILE
# AND REGENERATE THE MATRIX SUITES.
#
# matrix suite mapping file: buildscripts/resmokeconfig/matrix_suites/mappings/update_fuzzer_replication_deterministic_last_continuous.yml
# regenerate matrix suites: buildscripts/resmoke.py generate-matrix-suites && bazel run //:format
##########################################################
executor:
archive:
tests: true
config:
shell_options:
global_vars:
TestData:
clusterType: replset
nodb: ""
matrix_suite: true
selector:
roots:
- jstestfuzz/out/*.js
test_kind: js_test

View File

@ -0,0 +1,22 @@
##########################################################
# THIS IS A GENERATED FILE -- DO NOT MODIFY.
# IF YOU WISH TO MODIFY THIS SUITE, MODIFY THE CORRESPONDING MATRIX SUITE MAPPING FILE
# AND REGENERATE THE MATRIX SUITES.
#
# matrix suite mapping file: buildscripts/resmokeconfig/matrix_suites/mappings/update_fuzzer_replication_deterministic_last_lts.yml
# regenerate matrix suites: buildscripts/resmoke.py generate-matrix-suites && bazel run //:format
##########################################################
executor:
archive:
tests: true
config:
shell_options:
global_vars:
TestData:
clusterType: replset
nodb: ""
matrix_suite: true
selector:
roots:
- jstestfuzz/out/*.js
test_kind: js_test

View File

@ -0,0 +1,3 @@
base_suite: generational_fuzzer
overrides:
- "multiversion.replica_sets_multiversion_testdata_last_continuous"

View File

@ -0,0 +1,3 @@
base_suite: generational_fuzzer
overrides:
- "multiversion.replica_sets_multiversion_testdata_last_lts"

View File

@ -0,0 +1 @@
base_suite: update_fuzzer_replication

View File

@ -0,0 +1 @@
base_suite: update_fuzzer_replication

View File

@ -242,6 +242,47 @@ tasks:
npm_command: agg-fuzzer
run_no_feature_flag_tests: "true"
## Like "aggregation_multiversion_fuzzer_gen", but it uses a pinned git revision for the
## "jstestfuzz" repo and it uses a fixed seed.
- <<: *jstestfuzz_template
name: aggregation_multiversion_fuzzer_deterministic_gen
tags:
[
"assigned_to_jira_team_server_query_execution",
"release_critical",
"fuzzer_deterministic",
"common",
"multiversion",
"incompatible_mac",
"incompatible_ppc",
"incompatible_s390x",
"incompatible_windows",
"incompatible_tsan",
"incompatible_aubsan",
"incompatible_debug_mode",
"require_npm",
"random_name",
"future_git_tag_incompatible",
]
commands:
- func: "initialize multiversion tasks"
vars:
aggregation_multiversion_fuzzer_deterministic_last_lts: last_lts
aggregation_multiversion_fuzzer_deterministic_last_continuous: last_continuous
- func: "generate resmoke tasks"
vars:
<<: *jstestfuzz_config_vars
# This task used a fixed git revision for the jstestfuzz repo. As changes are made
# to the mongo repo over time, the fixed jstestfuzz git rev used here will need to
# be updated every so often (once every few months).
num_files: 24
num_tasks: 2
npm_command: agg-fuzzer
suite: aggregation_multiversion_fuzzer
resmoke_args: "--mongodSetParameters='{logComponentVerbosity: {command: 2}}'"
jstestfuzz_vars: --metaSeed 1726779665485 --jstestfuzzGitRev 8ddd8f12cab0
run_no_feature_flag_tests: "true"
- <<: *task_template
name: aggregation_one_shard_sharded_collections
tags:
@ -360,6 +401,41 @@ tasks:
suite: generational_fuzzer
resmoke_args: "--mongodSetParameters='{logComponentVerbosity: {command: 2}}'"
## Like "aggregation_timeseries_fuzzer_gen", but it uses a pinned git revision for the
## "jstestfuzz" repo and it uses a fixed seed.
- <<: *jstestfuzz_template
name: aggregation_timeseries_fuzzer_deterministic_gen
tags:
[
"assigned_to_jira_team_server_query_execution",
"release_critical",
"fuzzer_deterministic",
"common",
"timeseries",
"incompatible_mac",
"incompatible_ppc",
"incompatible_s390x",
"incompatible_windows",
"incompatible_tsan",
"incompatible_aubsan",
"incompatible_debug_mode",
"require_npm",
"random_name",
]
commands:
- func: "generate resmoke tasks"
vars:
<<: *jstestfuzz_config_vars
# This task used a fixed git revision for the jstestfuzz repo. As changes are made
# to the mongo repo over time, the fixed jstestfuzz git rev used here will need to
# be updated every so often (once every few months).
num_files: 60
num_tasks: 2
npm_command: agg-fuzzer
suite: generational_fuzzer
resmoke_args: "--mongodSetParameters='{logComponentVerbosity: {command: 2}}'"
jstestfuzz_vars: --diffTestingMode timeseries --numPipelines=1000 --metaSeed 1726779665485 --jstestfuzzGitRev 8ddd8f12cab0
## Standalone fuzzer for checking block_processing correctness ##
- <<: *jstestfuzz_template
name: aggregation_blockprocessing_fuzzer_gen
@ -1115,6 +1191,46 @@ tasks:
resmoke_args: "--mongodSetParameters='{logComponentVerbosity: {command: 2}}'"
run_no_feature_flag_tests: "true"
## Like "update_fuzzer_replication_gen", but it uses a pinned git revision for the "jstestfuzz"
## repo and it uses a fixed seed.
- <<: *jstestfuzz_template
name: update_fuzzer_replication_deterministic_gen
tags:
[
"assigned_to_jira_team_server_query_execution",
"release_critical",
"fuzzer_deterministic",
"multiversion",
"incompatible_mac",
"incompatible_ppc",
"incompatible_s390x",
"incompatible_windows",
"incompatible_tsan",
"incompatible_aubsan",
"incompatible_debug_mode",
"require_npm",
"random_name",
"future_git_tag_incompatible",
]
commands:
- func: "initialize multiversion tasks"
vars:
update_fuzzer_replication_deterministic_last_lts: last_lts
update_fuzzer_replication_deterministic_last_continuous: last_continuous
- func: "generate resmoke tasks"
vars:
<<: *jstestfuzz_config_vars
# This task used a fixed git revision for the jstestfuzz repo. As changes are made
# to the mongo repo over time, the fixed jstestfuzz git rev used here will need to
# be updated every so often (once every few months).
num_files: 16
num_tasks: 2
npm_command: update-fuzzer
suite: update_fuzzer_replication
resmoke_args: "--mongodSetParameters='{logComponentVerbosity: {command: 2}}'"
jstestfuzz_vars: --metaSeed 1726779665485 --jstestfuzzGitRev 8ddd8f12cab0
run_no_feature_flag_tests: "true"
# jstestfuzz standalone update time-series generational fuzzer ##
- <<: *jstestfuzz_template
name: update_timeseries_fuzzer_gen
@ -1211,6 +1327,37 @@ tasks:
resmoke_args: "--mongodSetParameters='{logComponentVerbosity: {command: 2}}'"
npm_command: agg-fuzzer
## Like "aggregation_optimization_fuzzer_gen", but it uses a pinned git revision for the
## "jstestfuzz" repo and it uses a fixed seed.
- <<: *jstestfuzz_template
name: aggregation_optimization_fuzzer_deterministic_gen
tags:
[
"assigned_to_jira_team_server_query_optimization",
"release_critical",
"fuzzer_deterministic",
"optimization",
"incompatible_mac",
"incompatible_ppc",
"incompatible_s390x",
"incompatible_windows",
"incompatible_tsan",
"incompatible_aubsan",
"incompatible_debug_mode",
"require_npm",
"random_name",
]
commands:
- func: "generate resmoke tasks"
vars:
<<: *jstestfuzz_config_vars
num_files: 14
num_tasks: 2
npm_command: agg-fuzzer
suite: generational_fuzzer
resmoke_args: "--mongodSetParameters='{logComponentVerbosity: {command: 2}}'"
jstestfuzz_vars: --diffTestingMode optimization --metaSeed 1726779665485 --jstestfuzzGitRev 8ddd8f12cab0
- <<: *task_template
name: aggregation_repeat_queries_multiplan_single_solutions
tags: ["assigned_to_jira_team_server_query_optimization", "default"]

View File

@ -250,3 +250,4 @@ buildvariants:
- name: concurrency_gen
- name: concurrency_replication_gen
- name: concurrency_sharded_replication_gen
- name: .fuzzer_deterministic

View File

@ -131,8 +131,8 @@ buildvariants:
- name: .development_critical .requires_large_host !.requires_compile_variant !.incompatible_development_variant !.requires_all_feature_flags
distros:
- rhel8.8-medium
- name: .release_critical !.requires_large_host !.requires_compile_variant !.incompatible_development_variant !.requires_all_feature_flags
- name: .release_critical .requires_large_host !.requires_compile_variant !.incompatible_development_variant !.requires_all_feature_flags
- name: .release_critical !.requires_large_host !.requires_compile_variant !.incompatible_development_variant !.requires_all_feature_flags !.fuzzer_deterministic
- name: .release_critical .requires_large_host !.requires_compile_variant !.incompatible_development_variant !.requires_all_feature_flags !.fuzzer_deterministic
distros:
- rhel8.8-medium
- name: .default !.requires_large_host !.requires_compile_variant !.incompatible_development_variant !.requires_all_feature_flags

View File

@ -316,8 +316,8 @@ buildvariants:
- name: .development_critical .requires_large_host !.requires_compile_variant !.incompatible_development_variant !.incompatible_all_feature_flags
distros:
- rhel8.8-medium
- name: .release_critical !.requires_large_host !.requires_compile_variant !.incompatible_development_variant !.incompatible_all_feature_flags
- name: .release_critical .requires_large_host !.requires_compile_variant !.incompatible_development_variant !.incompatible_all_feature_flags
- name: .release_critical !.requires_large_host !.requires_compile_variant !.incompatible_development_variant !.incompatible_all_feature_flags !.fuzzer_deterministic
- name: .release_critical .requires_large_host !.requires_compile_variant !.incompatible_development_variant !.incompatible_all_feature_flags !.fuzzer_deterministic
distros:
- rhel8.8-medium
- name: .default !.requires_large_host !.requires_compile_variant !.incompatible_development_variant !.incompatible_all_feature_flags

View File

@ -320,8 +320,8 @@ buildvariants:
- name: .development_critical .requires_large_host !.requires_compile_variant !.incompatible_development_variant !.incompatible_community !.requires_all_feature_flags !.suggested_excluding_required__for_devprod_mitigation_only
distros:
- rhel8.8-medium
- name: .release_critical !.requires_large_host !.requires_compile_variant !.incompatible_development_variant !.incompatible_community !.requires_all_feature_flags !.suggested_excluding_required__for_devprod_mitigation_only
- name: .release_critical .requires_large_host !.requires_compile_variant !.incompatible_development_variant !.incompatible_community !.requires_all_feature_flags !.suggested_excluding_required__for_devprod_mitigation_only
- name: .release_critical !.requires_large_host !.requires_compile_variant !.incompatible_development_variant !.incompatible_community !.requires_all_feature_flags !.fuzzer_deterministic !.suggested_excluding_required__for_devprod_mitigation_only
- name: .release_critical .requires_large_host !.requires_compile_variant !.incompatible_development_variant !.incompatible_community !.requires_all_feature_flags !.fuzzer_deterministic !.suggested_excluding_required__for_devprod_mitigation_only
distros:
- rhel8.8-medium

View File

@ -311,8 +311,8 @@ buildvariants:
- name: .development_critical .requires_large_host !.incompatible_development_variant !.incompatible_community !.incompatible_windows !.requires_all_feature_flags
distros:
- windows-2022-large
- name: .release_critical !.requires_large_host !.incompatible_development_variant !.incompatible_community !.incompatible_windows !.requires_all_feature_flags
- name: .release_critical .requires_large_host !.incompatible_development_variant !.incompatible_community !.incompatible_windows !.requires_all_feature_flags
- name: .release_critical !.requires_large_host !.incompatible_development_variant !.incompatible_community !.incompatible_windows !.requires_all_feature_flags !.fuzzer_deterministic
- name: .release_critical .requires_large_host !.incompatible_development_variant !.incompatible_community !.incompatible_windows !.requires_all_feature_flags !.fuzzer_deterministic
distros:
- windows-2022-large

View File

@ -5,6 +5,59 @@ set -evo pipefail
cd src/jstestfuzz
# Store 'jstestfuzz_vars' into 'vars'. We will use 'vars' instead of 'jstestfuzz_vars' for
# the rest of this shell script.
vars="${jstestfuzz_vars}"
# If the "--jstestfuzzGitRev" option is present in 'vars', copy the option's value into
# 'jstestfuzz_gitrev' and remove it from 'vars', and then reset the jstestfuzz repo to the
# specified git revision.
echo "${vars}" | grep -q -- '--jstestfuzzGitRev[ \t]\+[A-Za-z0-9]\+' && RET=0 || RET=$?
if [ $RET -eq 0 ]; then
jstestfuzz_gitrev=$(echo "${vars}" | sed -e 's/.*--jstestfuzzGitRev[ \t]\+\([A-Za-z0-9]\+\).*/\1/')
vars=$(echo "${vars}" | sed -e 's/\(.*\)--jstestfuzzGitRev[ \t]\+[A-Za-z0-9]\+\(.*\)/\1\2/')
for i in {1..5}; do
git reset --hard "${jstestfuzz_gitrev}" && RET=0 && break || RET=$? && sleep 5
echo "Failed to reset jstestfuzz to git revision ${jstestfuzz_gitrev}, retrying..."
done
if [ $RET -ne 0 ]; then
echo "Failed to reset jstestfuzz to git revision ${jstestfuzz_gitrev}"
exit $RET
fi
fi
# If the "--metaSeed" option is present in 'vars', copy the option's value into 'meta_seed'
# and remove it from 'vars', and then generate a seed using 'meta_seed' and 'task_name' and
# pass this generated seed to "npm_run.sh" below.
generated_seed_flag=""
echo "${vars}" | grep -q -- '--metaSeed[ \t]\+[0-9]\+' && RET=0 || RET=$?
if [ $RET -eq 0 ]; then
# Throw an error if the "--seed" option and the "--metaSeed" option are both present.
echo "${vars}" | grep -q -- '--seed[ \t]\+[0-9]\+' && RET=0 || RET=$?
if [ $RET -eq 0 ]; then
echo "Cannot use the --seed option and the --metaSeed option together"
exit 1
fi
# Store the meta seed value into 'meta_seed' and remove the "--metaSeed" option from 'vars'.
meta_seed=$(echo "${vars}" | sed -e 's/.*--metaSeed[ \t]\+\([0-9]\+\).*/\1/')
vars=$(echo "${vars}" | sed -e 's/\(.*\)--metaSeed[ \t]\+[0-9]\+\(.*\)/\1\2/')
# If 'task_name' matches the pattern that we use for generated task names, extract the number
# from 'task_name' and generate a seed using this number and 'meta_seed' together. Otherwise,
# just use 'meta_seed' itself for the seed.
echo "${task_name}" | grep -q '_[0-9]\+\(-.*\)\?$' && RET=0 || RET=$?
if [ $RET -eq 0 ]; then
task_num=$(echo "${task_name}" | sed -e 's/.*_\([0-9]\+\)\(-.*\)\?$/\1/')
generated_seed=$((meta_seed + 971 * (task_num + 1)))
generated_seed_flag="--seed ${generated_seed}"
else
generated_seed_flag="--seed ${meta_seed}"
fi
fi
in_patch_build_flag=""
if [[ "${is_patch}" = "true" ]]; then
case "${npm_command}" in
@ -20,4 +73,4 @@ if [[ "${npm_command}" != "jstestfuzz" ]]; then
maybe_use_es_modules="--useEsModules"
fi
./src/scripts/npm_run.sh ${npm_command} -- ${jstestfuzz_vars} ${in_patch_build_flag} ${maybe_use_es_modules} --branch ${branch_name}
./src/scripts/npm_run.sh ${npm_command} -- ${vars} ${generated_seed_flag} ${in_patch_build_flag} ${maybe_use_es_modules} --branch ${branch_name}