Compare commits
223 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
56948a0181 | ||
|
|
e175711195 | ||
|
|
ff7d61461b | ||
|
|
359392c8fe | ||
|
|
b1d9295c89 | ||
|
|
5fac17f9be | ||
|
|
06b0374ac1 | ||
|
|
c95347834e | ||
|
|
fd2749a608 | ||
|
|
d8d06353df | ||
|
|
2c51119052 | ||
|
|
0f18c03ce4 | ||
|
|
e88edf5542 | ||
|
|
eb10134f26 | ||
|
|
7ce494b73b | ||
|
|
7d92ec0c4f | ||
|
|
d6e003ba95 | ||
|
|
6704c95b3a | ||
|
|
eb4361b305 | ||
|
|
82269b093d | ||
|
|
146a2e018b | ||
|
|
6985f8a38d | ||
|
|
81c7c40ac5 | ||
|
|
d1484a5f23 | ||
|
|
929b9eadbb | ||
|
|
dd51e3dbc3 | ||
|
|
1a59b960ea | ||
|
|
f4b1d3c5e7 | ||
|
|
e33a721ee0 | ||
|
|
7c100b2025 | ||
|
|
9fe1ad3feb | ||
|
|
1339ea1cb7 | ||
|
|
4b314de270 | ||
|
|
0cd223cafc | ||
|
|
4f10e5b8fd | ||
|
|
86aead28bb | ||
|
|
e685ee8f9a | ||
|
|
7755281ad2 | ||
|
|
8a7d0eaae2 | ||
|
|
1fe317acc7 | ||
|
|
42d407a714 | ||
|
|
f11871c1e2 | ||
|
|
f6067c17d0 | ||
|
|
3933880bc3 | ||
|
|
eb55125b8d | ||
|
|
4680956cc0 | ||
|
|
e117747131 | ||
|
|
42082dfdb2 | ||
|
|
59c8c6ca5e | ||
|
|
4120fda44e | ||
|
|
55a514ccc7 | ||
|
|
c21235b1e9 | ||
|
|
46c0129df7 | ||
|
|
212781dddd | ||
|
|
45daedd069 | ||
|
|
7258a517fd | ||
|
|
80690d8641 | ||
|
|
061d7f5bff | ||
|
|
707cc90d9c | ||
|
|
c0252c0030 | ||
|
|
b301df7c32 | ||
|
|
5f8e7802a8 | ||
|
|
bb0afb597e | ||
|
|
94572311d3 | ||
|
|
a332192a12 | ||
|
|
43524bbb3d | ||
|
|
f387ede496 | ||
|
|
87b932b174 | ||
|
|
e57d0b9f1a | ||
|
|
a24f8791f9 | ||
|
|
a1022e2465 | ||
|
|
effe0e8d63 | ||
|
|
430e7cfa31 | ||
|
|
217c5457fa | ||
|
|
7bff196d50 | ||
|
|
aae2971134 | ||
|
|
93d07ebf6d | ||
|
|
d81bcfcd4a | ||
|
|
10917675e4 | ||
|
|
b0f6a3f641 | ||
|
|
b5b948acbd | ||
|
|
dc03829c2f | ||
|
|
61a2e95b35 | ||
|
|
f30230307b | ||
|
|
d0ab228bcf | ||
|
|
8da709d3f6 | ||
|
|
576f3bfd14 | ||
|
|
517336c797 | ||
|
|
c9199f5661 | ||
|
|
ba0c01e0ca | ||
|
|
b15f6474d2 | ||
|
|
61c872f2e9 | ||
|
|
51f14bb054 | ||
|
|
a1cac54a17 | ||
|
|
3ff9bad79c | ||
|
|
36201bb1a3 | ||
|
|
e1fcd6d2a0 | ||
|
|
1bc847cc61 | ||
|
|
9d2fb3b045 | ||
|
|
eeba6d2f1d | ||
|
|
1c58fb3483 | ||
|
|
6677809b63 | ||
|
|
631aea9547 | ||
|
|
5e211cb328 | ||
|
|
ce3c6455e0 | ||
|
|
d6fa27a83c | ||
|
|
96557f3f2c | ||
|
|
00ee55d20e | ||
|
|
3332b64d58 | ||
|
|
4bdfd5ea9c | ||
|
|
df91fb07a0 | ||
|
|
8454f8df8f | ||
|
|
5f7817f5b7 | ||
|
|
e8bb2e60d1 | ||
|
|
a68ef5214e | ||
|
|
b8907e1b61 | ||
|
|
183e75f792 | ||
|
|
bf3b92cfa4 | ||
|
|
2524c79207 | ||
|
|
6f6510fde8 | ||
|
|
939758f395 | ||
|
|
e22b7bd7af | ||
|
|
ae3f3c8129 | ||
|
|
33323eaa74 | ||
|
|
5c3d2a6466 | ||
|
|
78cb4f7b65 | ||
|
|
c21777fa67 | ||
|
|
1873da68e9 | ||
|
|
43a3323f56 | ||
|
|
a1a115c45f | ||
|
|
e04078defc | ||
|
|
c4e3a20203 | ||
|
|
118caddaeb | ||
|
|
cb663cb4ac | ||
|
|
6759ef5796 | ||
|
|
99107139a5 | ||
|
|
39b086c4b2 | ||
|
|
f61a333bec | ||
|
|
46d18ff161 | ||
|
|
78db955017 | ||
|
|
b128ebef69 | ||
|
|
dc2a6edb81 | ||
|
|
d780a2c1ad | ||
|
|
583d0caf94 | ||
|
|
fb29ea2866 | ||
|
|
517c138d90 | ||
|
|
6644b81eba | ||
|
|
9e50dc23b2 | ||
|
|
f593271c21 | ||
|
|
8fa9c9df5c | ||
|
|
0986dcf85e | ||
|
|
d829d50fec | ||
|
|
d1c401d527 | ||
|
|
ec26f27ad8 | ||
|
|
b808a2e836 | ||
|
|
68e09e693e | ||
|
|
d14536ffd6 | ||
|
|
7ea97fefb5 | ||
|
|
4ef5e930b0 | ||
|
|
dad4c5cfee | ||
|
|
6c9f527aa8 | ||
|
|
95dcf4f945 | ||
|
|
70708d87af | ||
|
|
4f3972a7d9 | ||
|
|
f8b2d5d81c | ||
|
|
1712b00a0c | ||
|
|
b6ae2a973c | ||
|
|
5628968c1d | ||
|
|
7a3d810256 | ||
|
|
4480abb4b7 | ||
|
|
36239126d8 | ||
|
|
a101603600 | ||
|
|
a83b619ece | ||
|
|
49297146b4 | ||
|
|
d77c09cef3 | ||
|
|
7bdfcad375 | ||
|
|
7b1be26457 | ||
|
|
c90c98cb81 | ||
|
|
9893109145 | ||
|
|
d88007ec06 | ||
|
|
cce021b8b9 | ||
|
|
4784425667 | ||
|
|
17d52aa6ce | ||
|
|
6339743602 | ||
|
|
fe7a23455a | ||
|
|
1a99f32a89 | ||
|
|
dcce7eae35 | ||
|
|
59b475da3c | ||
|
|
b10034ac09 | ||
|
|
21bf2ad3b4 | ||
|
|
62211339c8 | ||
|
|
3df6f0e641 | ||
|
|
d356e75231 | ||
|
|
35534c8c9b | ||
|
|
374a892b48 | ||
|
|
5e492626cb | ||
|
|
a59697cc19 | ||
|
|
7d04ba9dbd | ||
|
|
75b289f693 | ||
|
|
85768672a6 | ||
|
|
33a77b2ebc | ||
|
|
b9011c8dba | ||
|
|
054deb01d1 | ||
|
|
efcb687118 | ||
|
|
0567c351eb | ||
|
|
5267a8ccd2 | ||
|
|
a572a4c8c9 | ||
|
|
0151b5403c | ||
|
|
4ae0bfda16 | ||
|
|
62526599c0 | ||
|
|
dae42999b5 | ||
|
|
8bcce4a3f6 | ||
|
|
9238c05d06 | ||
|
|
3dfc0a28b9 | ||
|
|
d2772021cc | ||
|
|
6b642a58fc | ||
|
|
4aece1b1b6 | ||
|
|
35874e7718 | ||
|
|
c93160a001 | ||
|
|
a95a63d1db | ||
|
|
67d150dca6 | ||
|
|
6aab435a60 | ||
|
|
d0488cf675 |
@ -1,6 +1,6 @@
|
||||
#  MongoDB README
|
||||
|
||||
Welcome to MongoDB!
|
||||
Welcome to MongoDB 7.1!
|
||||
|
||||
## Components
|
||||
|
||||
|
||||
@ -61,8 +61,8 @@ def generate_version_expansions():
|
||||
raise ValueError("Unable to parse version from stdin and no version.json provided")
|
||||
|
||||
if version_parts[0]:
|
||||
expansions["suffix"] = "latest"
|
||||
expansions["src_suffix"] = "latest"
|
||||
expansions["suffix"] = "v7.1-latest"
|
||||
expansions["src_suffix"] = "v7.1-latest"
|
||||
expansions["is_release"] = "false"
|
||||
else:
|
||||
expansions["suffix"] = version_line
|
||||
|
||||
@ -56,8 +56,6 @@ selector:
|
||||
- build/install/bin/sbe_expression_bm*
|
||||
# These benchmarks are being run as part of the benchmarks_abt.yml test suite.
|
||||
- build/install/bin/abt_translation_bm*
|
||||
# These benchmarks are being run as part of the benchmarks_streams.yml test suite.
|
||||
- build/install/bin/streams_operator_dag_bm*
|
||||
# These benchmarks are only run when modifying or upgrading the immutable library.
|
||||
- build/install/bin/immutable_absl_comparison_bm*
|
||||
- build/install/bin/immutable_std_comparison_bm*
|
||||
|
||||
@ -58,8 +58,6 @@ selector:
|
||||
- build/install/bin/sbe_expression_bm*
|
||||
# These benchmarks are being run as part of the benchmarks_abt.yml test suite.
|
||||
- build/install/bin/abt_translation_bm*
|
||||
# These benchmarks are being run as part of the benchmarks_streams.yml test suite.
|
||||
- build/install/bin/streams_operator_dag_bm*
|
||||
# These benchmarks are only run when modifying or upgrading the immutable library.
|
||||
- build/install/bin/immutable_absl_comparison_bm*
|
||||
- build/install/bin/immutable_std_comparison_bm*
|
||||
|
||||
@ -86,9 +86,6 @@ selector:
|
||||
# Time-series collections are not supported on mongos.
|
||||
- jstests/concurrency/fsm_workloads/create_timeseries_collection.js
|
||||
|
||||
# TODO Undenylist (SERVER-71819).
|
||||
- jstests/concurrency/fsm_workloads/schema_validator_with_expr_variables.js
|
||||
|
||||
exclude_with_any_tags:
|
||||
- does_not_support_causal_consistency
|
||||
# This suite uses secondary read preference, which isn't currently compatible with transactions.
|
||||
|
||||
@ -99,9 +99,6 @@ selector:
|
||||
# infrastructure. See SERVER-77039 for full details.
|
||||
- jstests/concurrency/fsm_workloads/map_reduce_drop.js
|
||||
|
||||
# TODO Undenylist (SERVER-71819).
|
||||
- jstests/concurrency/fsm_workloads/schema_validator_with_expr_variables.js
|
||||
|
||||
exclude_with_any_tags:
|
||||
- assumes_balancer_off
|
||||
- requires_replication
|
||||
|
||||
@ -95,9 +95,6 @@ selector:
|
||||
# Time-series collections are not supported on mongos.
|
||||
- jstests/concurrency/fsm_workloads/create_timeseries_collection.js
|
||||
|
||||
# TODO Undenylist (SERVER-71819).
|
||||
- jstests/concurrency/fsm_workloads/schema_validator_with_expr_variables.js
|
||||
|
||||
exclude_with_any_tags:
|
||||
- assumes_balancer_off
|
||||
- requires_replication
|
||||
|
||||
@ -22,6 +22,8 @@ selector:
|
||||
- uses_transactions
|
||||
# Exclude tests with the latest fcv.
|
||||
- requires_fcv_71
|
||||
# Exclude tests that are not compatible with upgrade/downgrade.
|
||||
- cannot_run_during_upgrade_downgrade
|
||||
|
||||
exclude_files:
|
||||
# The set_param1.js test attempts to compare the response from running the {getParameter: "*"}
|
||||
@ -63,11 +65,6 @@ selector:
|
||||
- src/mongo/db/modules/*/jstests/fle/fle_use_cases.js
|
||||
- src/mongo/db/modules/*/jstests/fle/fle_drivers_integration.js
|
||||
|
||||
# The test uses a resumeToken from previous calls so FCV change will make the token invalid and fail.
|
||||
- jstests/core/resume_query_from_non_existent_record.js
|
||||
- jstests/core/resume_query.js
|
||||
- jstests/core/find_with_resume_after_param.js
|
||||
|
||||
# Expected failure due to command count being not precise due to potential retry of index build.
|
||||
- jstests/core/operation_latency_histogram.js
|
||||
|
||||
|
||||
@ -101,11 +101,6 @@ selector:
|
||||
- src/mongo/db/modules/*/jstests/fle/fle_use_cases.js
|
||||
- src/mongo/db/modules/*/jstests/fle/fle_drivers_integration.js
|
||||
|
||||
# The test uses a resumeToken from previous calls so FCV change will make the token invalid and fail.
|
||||
- jstests/core/resume_query_from_non_existent_record.js
|
||||
- jstests/core/resume_query.js
|
||||
- jstests/core/find_with_resume_after_param.js
|
||||
|
||||
# Expected failure due to command count being not precise due to potential retry of index build.
|
||||
- jstests/core/operation_latency_histogram.js
|
||||
|
||||
@ -172,6 +167,8 @@ selector:
|
||||
- uses_transactions
|
||||
# Exclude tests with the latest fcv.
|
||||
- requires_fcv_71
|
||||
# Exclude tests that are not compatible with upgrade/downgrade.
|
||||
- cannot_run_during_upgrade_downgrade
|
||||
|
||||
executor:
|
||||
archive:
|
||||
|
||||
@ -71,11 +71,6 @@ selector:
|
||||
- src/mongo/db/modules/*/jstests/fle/fle_use_cases.js
|
||||
- src/mongo/db/modules/*/jstests/fle/fle_drivers_integration.js
|
||||
|
||||
# The test uses a resumeToken from previous calls so FCV change will make the token invalid and fail.
|
||||
- jstests/core/resume_query_from_non_existent_record.js
|
||||
- jstests/core/resume_query.js
|
||||
- jstests/core/find_with_resume_after_param.js
|
||||
|
||||
# Expected failure due to command count being not precise due to potential retry of index build.
|
||||
- jstests/core/operation_latency_histogram.js
|
||||
|
||||
@ -126,6 +121,8 @@ selector:
|
||||
- uses_transactions
|
||||
# Exclude tests with the latest fcv.
|
||||
- requires_fcv_71
|
||||
# Exclude tests that are not compatible with upgrade/downgrade.
|
||||
- cannot_run_during_upgrade_downgrade
|
||||
|
||||
executor:
|
||||
archive:
|
||||
|
||||
@ -19,9 +19,6 @@ selector:
|
||||
- jstests/replsets/emptycapped.js
|
||||
- jstests/replsets/localhostAuthBypass.js
|
||||
- jstests/replsets/rollback_auth.js
|
||||
- jstests/replsets/tenant_migration_concurrent_writes_on_donor.js
|
||||
- jstests/replsets/tenant_migration_external_cluster_validation.js
|
||||
- jstests/replsets/tenant_migration_recipient_shard_merge_copies_change_collections.js
|
||||
- jstests/replsets/user_management_wc.js
|
||||
- jstests/replsets/replsetinitiate_works_with_keyfile_profile_verbose_options.js
|
||||
# Also skip tests that require a Thread, because Threads don't inherit credentials.
|
||||
|
||||
17
buildscripts/resmokeconfig/suites/serverless_MTM.yml
Normal file
17
buildscripts/resmokeconfig/suites/serverless_MTM.yml
Normal file
@ -0,0 +1,17 @@
|
||||
test_kind: js_test
|
||||
|
||||
selector:
|
||||
roots:
|
||||
- jstests/serverless/tenant_migration*.js
|
||||
exclude_with_any_tags:
|
||||
- requires_shard_merge
|
||||
|
||||
executor:
|
||||
config:
|
||||
shell_options:
|
||||
nodb: ''
|
||||
global_vars:
|
||||
TestData:
|
||||
hashTestNamesForMultitenancy: true
|
||||
setParameters:
|
||||
featureFlagShardMerge: false
|
||||
@ -286,7 +286,7 @@ executor:
|
||||
# Tests in this suite only read from primaries and only one node is electable, so causal
|
||||
# consistency is not required to read your own writes.
|
||||
causalConsistency: false
|
||||
# TODO SERVER-68643 No longer needed when we only use shard merge protocol.
|
||||
# TODO SERVER-63517 No longer needed when we only use shard merge protocol.
|
||||
useLocalDBForDBCheck: true
|
||||
# Shard Merge does not support fastcount. When we call CheckTenantMigrationDBHash after
|
||||
# each migration we would potentially fail when enforcing using the fast count during that
|
||||
@ -332,7 +332,6 @@ executor:
|
||||
# only runs donorForgetMigration against the donor of each migration when it is safe to do
|
||||
# so. Therefore, the garbage collection delay doesn't need to be large.
|
||||
tenantMigrationGarbageCollectionDelayMS: 1
|
||||
ttlMonitorSleepSecs: 1
|
||||
minSnapshotHistoryWindowInSeconds: 30
|
||||
tlsMode: allowTLS
|
||||
tlsCAFile: jstests/libs/ca.pem
|
||||
|
||||
@ -65,7 +65,7 @@ executor:
|
||||
keyFile: *keyFile
|
||||
keyFileData: *keyFileData
|
||||
roleGraphInvalidationIsFatal: true
|
||||
# TODO SERVER-68643 No longer needed when we only use shard merge protocol.
|
||||
# TODO SERVER-63517 No longer needed when we only use shard merge protocol.
|
||||
useLocalDBForDBCheck: true
|
||||
# Shard Merge does not support fastcount. When we call CheckTenantMigrationDBHash after
|
||||
# each migration we would potentially fail when enforcing using the fast count during that
|
||||
@ -111,7 +111,6 @@ executor:
|
||||
# only runs donorForgetMigration against the donor of each migration when it is safe to do
|
||||
# so. Therefore, the garbage collection delay doesn't need to be large.
|
||||
tenantMigrationGarbageCollectionDelayMS: 1
|
||||
ttlMonitorSleepSecs: 1
|
||||
minSnapshotHistoryWindowInSeconds: 30
|
||||
tlsMode: allowTLS
|
||||
tlsCAFile: jstests/libs/ca.pem
|
||||
|
||||
@ -280,9 +280,12 @@ executor:
|
||||
keyFile: *keyFile
|
||||
keyFileData: *keyFileData
|
||||
roleGraphInvalidationIsFatal: true
|
||||
# TODO SERVER-68643 No longer needed when we only use shard merge protocol.
|
||||
skipEnforceFastCountOnValidate: true
|
||||
# TODO SERVER-63517 No longer needed when we only use shard merge protocol.
|
||||
useLocalDBForDBCheck: true
|
||||
# Shard Merge does not support fastcount. When we call CheckTenantMigrationDBHash after
|
||||
# each migration we would potentially fail when enforcing using the fast count during that
|
||||
# process.
|
||||
skipEnforceFastCountOnValidate: true
|
||||
networkErrorAndTxnOverrideConfig:
|
||||
wrapCRUDinTransactions: true
|
||||
sessionOptions:
|
||||
@ -329,7 +332,6 @@ executor:
|
||||
# only runs donorForgetMigration against the donor of each migration when it is safe to do
|
||||
# so. Therefore, the garbage collection delay doesn't need to be large.
|
||||
tenantMigrationGarbageCollectionDelayMS: 1
|
||||
ttlMonitorSleepSecs: 1
|
||||
minSnapshotHistoryWindowInSeconds: 30
|
||||
tlsMode: allowTLS
|
||||
tlsCAFile: jstests/libs/ca.pem
|
||||
|
||||
@ -248,6 +248,9 @@ selector:
|
||||
# Test runs command on a config shard and does not shutdown safely upon transitioning to a dedicated config server.
|
||||
- jstests/sharding/fsync_lock_unlock.js
|
||||
|
||||
# Expect the configureQueryAnalyzer command to execute without config server stepdown.
|
||||
- jstests/sharding/analyze_shard_key/configure_query_analyzer_persistence.js
|
||||
|
||||
exclude_with_any_tags:
|
||||
- does_not_support_stepdowns
|
||||
|
||||
|
||||
23
buildscripts/resmokeconfig/suites/ssl_linear.yml
Normal file
23
buildscripts/resmokeconfig/suites/ssl_linear.yml
Normal file
@ -0,0 +1,23 @@
|
||||
test_kind: js_test
|
||||
|
||||
# Similar to the `ssl` suite, but configured by evergreen to run sequentially, so that the
|
||||
# contents of the Windows system certificate store are only affected by one test at a time.
|
||||
selector:
|
||||
roots:
|
||||
- jstests/ssl_linear/*.js
|
||||
|
||||
# ssl tests start their own mongod's.
|
||||
executor:
|
||||
config:
|
||||
shell_options:
|
||||
nodb: ''
|
||||
ssl: ''
|
||||
sslAllowInvalidCertificates: ''
|
||||
sslCAFile: jstests/libs/ca.pem
|
||||
sslPEMKeyFile: jstests/libs/client.pem
|
||||
global_vars:
|
||||
TestData:
|
||||
setParameters:
|
||||
logComponentVerbosity: "{network:2}"
|
||||
setParametersMongos:
|
||||
logComponentVerbosity: "{network:2}"
|
||||
@ -105,6 +105,7 @@ DEFAULTS = {
|
||||
"shuffle": None,
|
||||
"stagger_jobs": None,
|
||||
"majority_read_concern": "on",
|
||||
"enable_enterprise_tests": None,
|
||||
"shell_seed": None,
|
||||
"storage_engine": "wiredTiger",
|
||||
"storage_engine_cache_size_gb": None,
|
||||
@ -621,7 +622,7 @@ USE_LEGACY_MULTIVERSION = True
|
||||
# Expansions file location
|
||||
# in CI, the expansions file is located in the ${workdir}, one dir up
|
||||
# from src, the checkout directory
|
||||
EXPANSIONS_FILE = "../expansions.yml" if 'CI' in os.environ else None
|
||||
EXPANSIONS_FILE = "../expansions.yml" if 'CI' in os.environ else "expansions.yml"
|
||||
|
||||
# Symbolizer secrets
|
||||
SYMBOLIZER_CLIENT_SECRET = None
|
||||
|
||||
@ -318,6 +318,7 @@ be invoked as either:
|
||||
_config.JOBS = config.pop("jobs")
|
||||
_config.LINEAR_CHAIN = config.pop("linear_chain") == "on"
|
||||
_config.MAJORITY_READ_CONCERN = config.pop("majority_read_concern") == "on"
|
||||
_config.ENABLE_ENTERPRISE_TESTS = config.pop("enable_enterprise_tests")
|
||||
_config.MIXED_BIN_VERSIONS = config.pop("mixed_bin_versions")
|
||||
if _config.MIXED_BIN_VERSIONS is not None:
|
||||
_config.MIXED_BIN_VERSIONS = _config.MIXED_BIN_VERSIONS.split("-")
|
||||
|
||||
@ -183,7 +183,8 @@ class TestRunner(Subcommand):
|
||||
def generate_multiversion_exclude_tags(self):
|
||||
"""Generate multiversion exclude tags file."""
|
||||
generate_multiversion_exclude_tags.generate_exclude_yaml(
|
||||
config.MULTIVERSION_BIN_VERSION, config.EXCLUDE_TAGS_FILE_PATH, self._resmoke_logger)
|
||||
config.MULTIVERSION_BIN_VERSION, config.EXCLUDE_TAGS_FILE_PATH, config.EXPANSIONS_FILE,
|
||||
self._resmoke_logger)
|
||||
|
||||
@staticmethod
|
||||
def _find_suites_by_test(suites: List[Suite]):
|
||||
@ -271,7 +272,7 @@ class TestRunner(Subcommand):
|
||||
print("Skipping local invocation because evergreen task id was not provided.")
|
||||
return
|
||||
|
||||
evg_conf = parse_evergreen_file("etc/evergreen.yml")
|
||||
evg_conf = parse_evergreen_file("etc/evergreen_nightly.yml")
|
||||
|
||||
suite = self._get_suites()[0]
|
||||
suite_name = config.ORIGIN_SUITE or suite.get_name()
|
||||
@ -1066,6 +1067,11 @@ class RunPlugin(PluginInterface):
|
||||
metavar="ON|OFF", help=("Enable or disable majority read concern support."
|
||||
" Defaults to %(default)s."))
|
||||
|
||||
mongodb_server_options.add_argument(
|
||||
"--enableEnterpriseTests", action="store", dest="enable_enterprise_tests", default="on",
|
||||
choices=("on", "off"), metavar="ON|OFF",
|
||||
help=("Enable or disable enterprise tests. Defaults to 'on'."))
|
||||
|
||||
mongodb_server_options.add_argument("--flowControl", action="store", dest="flow_control",
|
||||
choices=("on", "off"), metavar="ON|OFF",
|
||||
help=("Enable or disable flow control."))
|
||||
|
||||
@ -5,6 +5,8 @@ import re
|
||||
import tempfile
|
||||
from collections import defaultdict
|
||||
from subprocess import check_output
|
||||
from typing import Optional
|
||||
from github import GithubIntegration
|
||||
|
||||
import requests
|
||||
|
||||
@ -13,13 +15,35 @@ from buildscripts.resmokelib.config import MultiversionOptions
|
||||
from buildscripts.resmokelib.core.programs import get_path_env_var
|
||||
from buildscripts.resmokelib.utils import is_windows
|
||||
from buildscripts.util.fileops import read_yaml_file
|
||||
from buildscripts.util.read_config import read_config_file
|
||||
|
||||
BACKPORT_REQUIRED_TAG = "backport_required_multiversion"
|
||||
|
||||
# The directory in which BACKPORTS_REQUIRED_FILE resides.
|
||||
ETC_DIR = "etc"
|
||||
BACKPORTS_REQUIRED_FILE = "backports_required_for_multiversion_tests.yml"
|
||||
BACKPORTS_REQUIRED_BASE_URL = "https://raw.githubusercontent.com/mongodb/mongo"
|
||||
BACKPORTS_REQUIRED_BASE_URL = "https://raw.githubusercontent.com/10gen/mongo"
|
||||
|
||||
|
||||
def get_installation_access_token(app_id: int, private_key: str,
|
||||
installation_id: int) -> Optional[str]: # noqa: D406,D407,D413
|
||||
"""
|
||||
Obtain an installation access token using JWT.
|
||||
|
||||
Args:
|
||||
- app_id: The application ID for GitHub App.
|
||||
- private_key: The private key associated with the GitHub App.
|
||||
- installation_id: The installation ID of the GitHub App for a particular account.
|
||||
|
||||
Returns:
|
||||
- Optional[str]: The installation access token. Returns `None` if there's an error obtaining the token.
|
||||
"""
|
||||
integration = GithubIntegration(app_id, private_key)
|
||||
auth = integration.get_access_token(installation_id)
|
||||
if auth:
|
||||
return auth.token
|
||||
else:
|
||||
raise Exception("Error obtaining installation token")
|
||||
|
||||
|
||||
def get_backports_required_hash_for_shell_version(mongo_shell_path=None):
|
||||
@ -51,10 +75,24 @@ def get_backports_required_hash_for_shell_version(mongo_shell_path=None):
|
||||
f"Could not find a valid commit hash from the {mongo_shell_path} mongo binary.")
|
||||
|
||||
|
||||
def get_old_yaml(commit_hash):
|
||||
def get_old_yaml(commit_hash, expansions_file):
|
||||
"""Download BACKPORTS_REQUIRED_FILE from the old commit and return the yaml."""
|
||||
|
||||
if not os.path.exists(expansions_file):
|
||||
raise FileNotFoundError(f"The specified file does not exist: {expansions_file}")
|
||||
expansions = read_config_file(expansions_file)
|
||||
|
||||
# Obtain installation access tokens using app credentials
|
||||
access_token_10gen_mongo = get_installation_access_token(
|
||||
expansions["app_id_10gen_mongo"], expansions["private_key_10gen_mongo"],
|
||||
expansions["installation_id_10gen_mongo"])
|
||||
|
||||
response = requests.get(
|
||||
f'{BACKPORTS_REQUIRED_BASE_URL}/{commit_hash}/{ETC_DIR}/{BACKPORTS_REQUIRED_FILE}')
|
||||
f'{BACKPORTS_REQUIRED_BASE_URL}/{commit_hash}/{ETC_DIR}/{BACKPORTS_REQUIRED_FILE}',
|
||||
headers={
|
||||
'Authorization': f'token {access_token_10gen_mongo}',
|
||||
})
|
||||
|
||||
# If the response was successful, no exception will be raised.
|
||||
response.raise_for_status()
|
||||
|
||||
@ -68,7 +106,8 @@ def get_old_yaml(commit_hash):
|
||||
return backports_required_old
|
||||
|
||||
|
||||
def generate_exclude_yaml(old_bin_version: str, output: str, logger: logging.Logger) -> None:
|
||||
def generate_exclude_yaml(old_bin_version: str, output: str, expansions_file: str,
|
||||
logger: logging.Logger) -> None:
|
||||
"""
|
||||
Create a tag file associating multiversion tests to tags for exclusion.
|
||||
|
||||
@ -98,7 +137,7 @@ def generate_exclude_yaml(old_bin_version: str, output: str, logger: logging.Log
|
||||
|
||||
# Get the yaml contents from the old commit.
|
||||
logger.info(f"Downloading file from commit hash of old branch {old_version_commit_hash}")
|
||||
backports_required_old = get_old_yaml(old_version_commit_hash)
|
||||
backports_required_old = get_old_yaml(old_version_commit_hash, expansions_file)
|
||||
|
||||
def diff(list1, list2):
|
||||
return [elem for elem in (list1 or []) if elem not in (list2 or [])]
|
||||
|
||||
@ -19,6 +19,8 @@ from buildscripts.resmokelib import utils
|
||||
from buildscripts.resmokelib.utils import globstar
|
||||
from buildscripts.resmokelib.utils import jscomment
|
||||
|
||||
ENTERPRISE_TEST_DIR = os.path.normpath("src/mongo/db/modules/enterprise/jstests")
|
||||
|
||||
########################
|
||||
# Test file explorer #
|
||||
########################
|
||||
@ -228,6 +230,13 @@ class _TestList(object):
|
||||
format(path)))
|
||||
self._filtered.discard(path)
|
||||
|
||||
def filter_enterprise_tests(self):
|
||||
"""Exclude tests that start with the enterprise module directory from the test list."""
|
||||
self._filtered = {
|
||||
test
|
||||
for test in self._filtered if not os.path.normpath(test).startswith(ENTERPRISE_TEST_DIR)
|
||||
}
|
||||
|
||||
def match_tag_expression(self, tag_expression, get_tags):
|
||||
"""Filter the test list to only include tests that match the tag expression.
|
||||
|
||||
@ -467,6 +476,9 @@ class _Selector(object):
|
||||
# 5. Apply the include files last with force=True to take precedence over the tags.
|
||||
if self._tests_are_files and selector_config.include_files:
|
||||
test_list.include_files(selector_config.include_files, force=True)
|
||||
# 6: Apply the enterprise tests filter
|
||||
if self.get_enterprise_tests_status() == "off":
|
||||
test_list.filter_enterprise_tests()
|
||||
|
||||
return self.sort_tests(*test_list.get_tests())
|
||||
|
||||
@ -482,6 +494,11 @@ class _Selector(object):
|
||||
"""Retrieve the tags associated with the give test file."""
|
||||
return []
|
||||
|
||||
@staticmethod
|
||||
def get_enterprise_tests_status() -> str:
|
||||
"""Get the status of enterprise tests from the configuration."""
|
||||
return config.ENABLE_ENTERPRISE_TESTS
|
||||
|
||||
|
||||
class _JSTestSelectorConfig(_SelectorConfig):
|
||||
"""_SelectorConfig subclass for JavaScript tests."""
|
||||
|
||||
@ -13,6 +13,13 @@ class CheckMetadataConsistencyInBackground(jsfile.DataConsistencyHook):
|
||||
|
||||
IS_BACKGROUND = True
|
||||
|
||||
# The 'CheckMetadataConsistency' hook relies on the 'isMaster' command to asses if the fixture cluster is sharded.
|
||||
# Skip tests that set a failPoint to make the 'isMaster' command unconditionally fail.
|
||||
SKIP_TESTS = [
|
||||
"build/install/bin/executor_integration_test", "build/install/bin/rpc_integration_test",
|
||||
"build/install/bin/transport_integration_test"
|
||||
]
|
||||
|
||||
def __init__(self, hook_logger, fixture, shell_options=None):
|
||||
"""Initialize CheckMetadataConsistencyInBackground."""
|
||||
|
||||
@ -67,6 +74,10 @@ class CheckMetadataConsistencyInBackground(jsfile.DataConsistencyHook):
|
||||
test.logger, test, self, self._js_filename, shell_options)
|
||||
hook_test_case.configure(self.fixture)
|
||||
|
||||
if test.test_name in self.SKIP_TESTS:
|
||||
self.logger.info("Metadata consistency check explicitely disabled for {test.test_name}")
|
||||
return
|
||||
|
||||
self.logger.info("Resuming background metadata consistency checker thread")
|
||||
self._background_job.resume(hook_test_case, test_report)
|
||||
|
||||
@ -78,6 +89,9 @@ class CheckMetadataConsistencyInBackground(jsfile.DataConsistencyHook):
|
||||
if self._background_job is None:
|
||||
return
|
||||
|
||||
if test.test_name in self.SKIP_TESTS:
|
||||
return
|
||||
|
||||
self.logger.info("Pausing background metadata consistency checker thread")
|
||||
self._background_job.pause()
|
||||
|
||||
|
||||
@ -225,7 +225,6 @@ class _ShardMergeThread(threading.Thread): # pylint: disable=too-many-instance-
|
||||
|
||||
WAIT_SECS_RANGES = [[0.05, 0.1], [0.1, 0.5], [1, 5], [5, 15]]
|
||||
POLL_INTERVAL_SECS = 0.1
|
||||
WAIT_PENDING_IDENT_SECS = 0.3
|
||||
|
||||
NO_SUCH_MIGRATION_ERR_CODE = 327
|
||||
INTERNAL_ERR_CODE = 1
|
||||
@ -356,7 +355,7 @@ class _ShardMergeThread(threading.Thread): # pylint: disable=too-many-instance-
|
||||
|
||||
def _is_fail_point_abort_reason(self, abort_reason):
|
||||
return abort_reason["code"] == self.INTERNAL_ERR_CODE and abort_reason[
|
||||
"errmsg"] == "simulate a shard merge error"
|
||||
"errmsg"] == "simulate a tenant migration error"
|
||||
|
||||
def _create_migration_opts(self, donor_rs_index, recipient_rs_index):
|
||||
donor_rs = self._shard_merge_fixture.get_replset(donor_rs_index)
|
||||
@ -434,27 +433,6 @@ class _ShardMergeThread(threading.Thread): # pylint: disable=too-many-instance-
|
||||
migration_opts.migration_id, migration_opts.get_donor_name())
|
||||
raise
|
||||
|
||||
def _override_abort_failpoint_shard_merge(self, donor_primary): # noqa: D205,D400
|
||||
"""Override the abortTenantMigrationBeforeLeavingBlockingState failpoint so the shard merge
|
||||
does not abort since it is currently not supported. Only use this method for shard merge.
|
||||
"""
|
||||
while True:
|
||||
try:
|
||||
donor_primary_client = self._create_client(donor_primary)
|
||||
donor_primary_client.admin.command(
|
||||
bson.SON([("configureFailPoint",
|
||||
"pauseTenantMigrationBeforeLeavingBlockingState"), ("mode", "off")]))
|
||||
donor_primary_client.admin.command(
|
||||
bson.SON([("configureFailPoint",
|
||||
"abortTenantMigrationBeforeLeavingBlockingState"), ("mode", "off")]))
|
||||
return
|
||||
except (pymongo.errors.AutoReconnect, pymongo.errors.NotPrimaryError):
|
||||
self.logger.info(
|
||||
"Retrying connection to donor primary in order to disable abort failpoint for shard merge."
|
||||
)
|
||||
continue
|
||||
time.sleep(self.POLL_INTERVAL_SECS)
|
||||
|
||||
def _start_and_wait_for_migration(self, migration_opts): # noqa: D205,D400
|
||||
"""Run donorStartMigration to start a shard merge based on 'migration_opts', wait for
|
||||
the migration decision and return the last response for donorStartMigration.
|
||||
@ -469,18 +447,6 @@ class _ShardMergeThread(threading.Thread): # pylint: disable=too-many-instance-
|
||||
}
|
||||
|
||||
donor_primary = migration_opts.get_donor_primary()
|
||||
# TODO(SERVER-68643) We no longer need to override the failpoint once milestone 3 is done
|
||||
# for shard merge.
|
||||
self._override_abort_failpoint_shard_merge(donor_primary)
|
||||
# For shard merge protocol we need to wait for the ident to be removed before starting a
|
||||
# new migration with a shard merge otherwise, due to the two phase drop, the stored
|
||||
# files will be marked to be deleted but not deleted fast enough and we would end up
|
||||
# moving a file that still exists.
|
||||
while self._get_pending_drop_idents(migration_opts.recipient_rs_index) > 0:
|
||||
time.sleep(self.WAIT_PENDING_IDENT_SECS)
|
||||
# Some tests also do drops on collection which we need to wait on before doing a new migration
|
||||
while self._get_pending_drop_idents(migration_opts.donor_rs_index) > 0:
|
||||
time.sleep(self.WAIT_PENDING_IDENT_SECS)
|
||||
|
||||
self.logger.info(
|
||||
"Starting shard merge '%s' on donor primary on port %d of replica set '%s'.",
|
||||
@ -697,30 +663,3 @@ class _ShardMergeThread(threading.Thread): # pylint: disable=too-many-instance-
|
||||
" port %d of replica set '%s' to be garbage collection.", str(self._tenant_ids),
|
||||
primary.port, rs.replset_name)
|
||||
raise
|
||||
|
||||
def _get_pending_drop_idents(self, replica_set_index): # noqa: D205,D400
|
||||
"""Returns the number of pending idents to be dropped. This is necessary for the shard
|
||||
merge protocol since we need to wait for the idents to be dropped before starting a new
|
||||
shard merge.
|
||||
"""
|
||||
primary = self._shard_merge_fixture.get_replset(replica_set_index).get_primary()
|
||||
pending_drop_idents = None
|
||||
while True:
|
||||
try:
|
||||
client = self._create_client(primary)
|
||||
server_status = client.admin.command({"serverStatus": 1})
|
||||
pending_drop_idents = server_status["storageEngine"]["dropPendingIdents"]
|
||||
break
|
||||
except (pymongo.errors.AutoReconnect, pymongo.errors.NotPrimaryError,
|
||||
pymongo.errors.WriteConcernError) as err:
|
||||
self.logger.info(
|
||||
"Retrying getting dropPendingIdents against primary on port %d after error %s.",
|
||||
primary.port, str(err))
|
||||
continue
|
||||
except pymongo.errors.PyMongoError:
|
||||
self.logger.exception(
|
||||
"Error creating client waiting for pending drop idents on " +
|
||||
" primary on port %d.", primary.port)
|
||||
raise
|
||||
|
||||
return pending_drop_idents
|
||||
|
||||
@ -298,36 +298,30 @@ class Job(object):
|
||||
run_hooks_after_suite_span.set_status(
|
||||
StatusCode.ERROR if hooks_failed else StatusCode.OK)
|
||||
|
||||
@TRACER.start_as_current_span("job._run_hooks_before_tests")
|
||||
def _run_hooks_before_tests(self, test: TestCase, hook_failure_flag: Optional[threading.Event]):
|
||||
"""Run the before_test method on each of the hooks.
|
||||
|
||||
Swallows any TestFailure exceptions if set to continue on
|
||||
failure, and reraises any other exceptions.
|
||||
"""
|
||||
run_hooks_before_tests_span = trace.get_current_span()
|
||||
run_hooks_before_tests_span.set_attributes(attributes=test.get_test_otel_attributes())
|
||||
|
||||
try:
|
||||
for hook in self.hooks:
|
||||
self._run_hook(hook, hook.before_test, test, hook_failure_flag)
|
||||
|
||||
except errors.StopExecution:
|
||||
run_hooks_before_tests_span.set_status(StatusCode.ERROR)
|
||||
raise
|
||||
|
||||
except errors.ServerFailure:
|
||||
self.logger.exception("%s marked as a failure by a hook's before_test.",
|
||||
test.short_description())
|
||||
self._fail_test(test, sys.exc_info(), return_code=2)
|
||||
run_hooks_before_tests_span.set_status(StatusCode.ERROR)
|
||||
raise errors.StopExecution("A hook's before_test failed")
|
||||
|
||||
except errors.TestFailure:
|
||||
self.logger.exception("%s marked as a failure by a hook's before_test.",
|
||||
test.short_description())
|
||||
self._fail_test(test, sys.exc_info(), return_code=1)
|
||||
run_hooks_before_tests_span.set_status(StatusCode.ERROR)
|
||||
if self.suite_options.fail_fast:
|
||||
raise errors.StopExecution("A hook's before_test failed")
|
||||
|
||||
@ -336,12 +330,8 @@ class Job(object):
|
||||
self.report.startTest(test)
|
||||
self.report.addError(test, sys.exc_info())
|
||||
self.report.stopTest(test)
|
||||
run_hooks_before_tests_span.set_status(StatusCode.ERROR)
|
||||
raise
|
||||
|
||||
run_hooks_before_tests_span.set_status(StatusCode.OK)
|
||||
|
||||
@TRACER.start_as_current_span("job._run_hooks_after_tests")
|
||||
def _run_hooks_after_tests(self, test: TestCase, hook_failure_flag: Optional[threading.Event],
|
||||
background: bool = False):
|
||||
"""Run the after_test method on each of the hooks.
|
||||
@ -353,10 +343,6 @@ class Job(object):
|
||||
@param background: whether to run background hooks.
|
||||
"""
|
||||
|
||||
run_hooks_after_tests_span = trace.get_current_span()
|
||||
run_hooks_after_tests_span.set_attributes(attributes=test.get_test_otel_attributes())
|
||||
run_hooks_after_tests_span.set_attribute(TestCase.METRIC_NAMES.BACKGROUND, background)
|
||||
|
||||
suite_with_balancer = isinstance(
|
||||
self.fixture, shardedcluster.ShardedClusterFixture) and self.fixture.enable_balancer
|
||||
|
||||
@ -368,7 +354,6 @@ class Job(object):
|
||||
self.logger.exception("%s failed while stopping the balancer for end-test hooks",
|
||||
test.short_description())
|
||||
self.report.setFailure(test, return_code=2)
|
||||
run_hooks_after_tests_span.set_status(StatusCode.ERROR)
|
||||
if self.archival:
|
||||
result = TestResult(test=test, hook=None, success=False)
|
||||
self.archival.archive(self.logger, result, self.manager)
|
||||
@ -380,27 +365,23 @@ class Job(object):
|
||||
self._run_hook(hook, hook.after_test, test, hook_failure_flag)
|
||||
|
||||
except errors.StopExecution:
|
||||
run_hooks_after_tests_span.set_status(StatusCode.ERROR)
|
||||
raise
|
||||
|
||||
except errors.ServerFailure:
|
||||
self.logger.exception("%s marked as a failure by a hook's after_test.",
|
||||
test.short_description())
|
||||
self.report.setFailure(test, return_code=2)
|
||||
run_hooks_after_tests_span.set_status(StatusCode.ERROR)
|
||||
raise errors.StopExecution("A hook's after_test failed")
|
||||
|
||||
except errors.TestFailure:
|
||||
self.logger.exception("%s marked as a failure by a hook's after_test.",
|
||||
test.short_description())
|
||||
self.report.setFailure(test, return_code=1)
|
||||
run_hooks_after_tests_span.set_status(StatusCode.ERROR)
|
||||
if self.suite_options.fail_fast:
|
||||
raise errors.StopExecution("A hook's after_test failed")
|
||||
|
||||
except:
|
||||
self.report.setError(test, sys.exc_info())
|
||||
run_hooks_after_tests_span.set_status(StatusCode.ERROR)
|
||||
raise
|
||||
|
||||
if not background and suite_with_balancer:
|
||||
@ -412,7 +393,6 @@ class Job(object):
|
||||
"%s failed while re-starting the balancer after end-test hooks",
|
||||
test.short_description())
|
||||
self.report.setFailure(test, return_code=2)
|
||||
run_hooks_after_tests_span.set_status(StatusCode.ERROR)
|
||||
if self.archival:
|
||||
result = TestResult(test=test, hook=None, success=False)
|
||||
self.archival.archive(self.logger, result, self.manager)
|
||||
|
||||
87
buildscripts/sync_repo_with_copybara.py
Normal file
87
buildscripts/sync_repo_with_copybara.py
Normal file
@ -0,0 +1,87 @@
|
||||
import subprocess
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
||||
def run_command(command): # noqa: D406
|
||||
"""
|
||||
Execute a shell command and return its standard output (`stdout`).
|
||||
|
||||
Args:
|
||||
command (str): The shell command to be executed.
|
||||
|
||||
Returns:
|
||||
str: The standard output of the executed command.
|
||||
|
||||
Raises:
|
||||
subprocess.CalledProcessError: If the command execution fails.
|
||||
|
||||
"""
|
||||
try:
|
||||
return subprocess.run(command, shell=True, check=True, text=True,
|
||||
capture_output=True).stdout
|
||||
except subprocess.CalledProcessError as e:
|
||||
print(f"Error while executing: '{command}'.\n{e}\nStandard Error: {e.stderr}")
|
||||
raise
|
||||
|
||||
|
||||
def create_mongodb_bot_gitconfig():
|
||||
"""Create the mongodb-bot.gitconfig file with the desired content."""
|
||||
|
||||
content = """
|
||||
[user]
|
||||
name = MongoDB Bot
|
||||
email = mongo-bot@mongodb.com
|
||||
"""
|
||||
|
||||
gitconfig_path = os.path.expanduser("~/mongodb-bot.gitconfig")
|
||||
|
||||
with open(gitconfig_path, 'w') as file:
|
||||
file.write(content)
|
||||
|
||||
print("mongodb-bot.gitconfig file created.")
|
||||
|
||||
|
||||
def main():
|
||||
# Check if the copybara directory already exists
|
||||
if os.path.exists('copybara'):
|
||||
print("Copybara directory already exists.")
|
||||
else:
|
||||
run_command("git clone https://github.com/10gen/copybara.git")
|
||||
|
||||
# Navigate to the Copybara directory and build the Copybara Docker image
|
||||
run_command("cd copybara && docker build --rm -t copybara .")
|
||||
|
||||
# Create the mongodb-bot.gitconfig file as necessary.
|
||||
create_mongodb_bot_gitconfig()
|
||||
|
||||
# Set up the Docker command and execute it
|
||||
current_dir = os.getcwd()
|
||||
|
||||
docker_cmd = [
|
||||
"docker run", "-v ~/.ssh:/root/.ssh", "-v ~/mongodb-bot.gitconfig:/root/.gitconfig",
|
||||
f'-v "{current_dir}/copybara.staging.sky":/usr/src/app/copy.bara.sky',
|
||||
"-e COPYBARA_CONFIG='copy.bara.sky'", "-e COPYBARA_SUBCOMMAND='migrate'",
|
||||
"-e COPYBARA_OPTIONS='-v'", "copybara copybara"
|
||||
]
|
||||
|
||||
try:
|
||||
run_command(" ".join(docker_cmd))
|
||||
except subprocess.CalledProcessError as err:
|
||||
error_message = str(err.stderr)
|
||||
acceptable_error_messages = [
|
||||
# Indicates the two repositories are identical
|
||||
"No new changes to import for resolved ref",
|
||||
# Indicates differences exist but no changes affect the destination, for example: exclusion rules
|
||||
"Iterative workflow produced no changes in the destination for resolved ref",
|
||||
]
|
||||
|
||||
if any(acceptable_message in error_message
|
||||
for acceptable_message in acceptable_error_messages):
|
||||
return
|
||||
|
||||
raise
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@ -10,6 +10,7 @@ from buildscripts.resmokelib.run import generate_multiversion_exclude_tags as un
|
||||
from buildscripts.util.fileops import read_yaml_file
|
||||
|
||||
EXCLUDE_TAGS_FILE = "multiversion_exclude_tags.yml"
|
||||
EXPANSIONS_FILE = "expansions.yml"
|
||||
|
||||
|
||||
class TestGenerateExcludeYaml(unittest.TestCase):
|
||||
@ -39,6 +40,7 @@ class TestGenerateExcludeYaml(unittest.TestCase):
|
||||
|
||||
output = os.path.join(self._tmpdir.name, EXCLUDE_TAGS_FILE)
|
||||
under_test.generate_exclude_yaml(old_bin_version=old_bin_version, output=output,
|
||||
expansions_file=EXPANSIONS_FILE,
|
||||
logger=MagicMock())
|
||||
|
||||
mock_read_yaml.assert_called_once()
|
||||
|
||||
@ -66,6 +66,9 @@ COMMON_PUBLIC_PATTERN = r"""
|
||||
"""
|
||||
"""Common Public pattern format."""
|
||||
|
||||
COMMON_10GENREPO_COMMIT_QUEUE_PATTERN = r' ^\'(?P<repo>10gen/mongo)\'\s.*commit\squeue\smerge.*SERVER-[0-9]+'
|
||||
"""Common commit queue format."""
|
||||
|
||||
COMMON_LINT_PATTERN = r"(?P<lint>Fix\slint)"
|
||||
"""Common Lint pattern format."""
|
||||
|
||||
@ -119,7 +122,7 @@ def old_patch_description(pattern: str) -> str:
|
||||
|
||||
# NOTE: re.VERBOSE is for visibility / debugging. As such significant white space must be
|
||||
# escaped (e.g ' ' to \s).
|
||||
VALID_PATTERNS = [
|
||||
COMMON_PUBLIC_PATTERNS = [
|
||||
re.compile(
|
||||
new_patch_description(COMMON_PUBLIC_PATTERN),
|
||||
re.MULTILINE | re.DOTALL | re.VERBOSE,
|
||||
@ -128,6 +131,10 @@ VALID_PATTERNS = [
|
||||
old_patch_description(COMMON_PUBLIC_PATTERN),
|
||||
re.MULTILINE | re.DOTALL | re.VERBOSE,
|
||||
),
|
||||
]
|
||||
"""common public patterns."""
|
||||
|
||||
VALID_PATTERNS = [
|
||||
re.compile(
|
||||
new_patch_description(COMMON_LINT_PATTERN),
|
||||
re.MULTILINE | re.DOTALL | re.VERBOSE,
|
||||
@ -164,6 +171,12 @@ PRIVATE_PATTERNS = [
|
||||
old_patch_description(COMMON_PRIVATE_PATTERN),
|
||||
re.MULTILINE | re.DOTALL | re.VERBOSE,
|
||||
),
|
||||
re.compile(
|
||||
new_patch_description(COMMON_10GENREPO_COMMIT_QUEUE_PATTERN),
|
||||
re.MULTILINE | re.DOTALL | re.VERBOSE),
|
||||
re.compile(
|
||||
old_patch_description(COMMON_10GENREPO_COMMIT_QUEUE_PATTERN),
|
||||
re.MULTILINE | re.DOTALL | re.VERBOSE),
|
||||
]
|
||||
"""private patterns."""
|
||||
|
||||
@ -205,18 +218,22 @@ class CommitMessageValidationOrchestrator:
|
||||
:param project: Project commit is targeting.
|
||||
:return: True if the message is valid.
|
||||
"""
|
||||
for pattern in COMMON_PUBLIC_PATTERNS:
|
||||
match = pattern.match(message)
|
||||
if not match:
|
||||
continue
|
||||
if not self.validate_ticket(match.group("ticket"), project):
|
||||
print(
|
||||
ERROR_MSG.format(
|
||||
error_msg="Reference to a internal Jira Ticket",
|
||||
branch=project,
|
||||
commit_message=message,
|
||||
))
|
||||
return False
|
||||
return True
|
||||
|
||||
valid_matches = [valid_pattern.match(message) for valid_pattern in VALID_PATTERNS]
|
||||
if any(valid_matches):
|
||||
ticket_matches = [pattern.match(message) for pattern in VALID_PATTERNS[0:2]]
|
||||
for match in [ticket_match for ticket_match in ticket_matches if ticket_match]:
|
||||
if not self.validate_ticket(match.group("ticket"), project):
|
||||
print(
|
||||
ERROR_MSG.format(
|
||||
error_msg="Reference to a internal Jira Ticket",
|
||||
branch=project,
|
||||
commit_message=message,
|
||||
))
|
||||
return False
|
||||
return True
|
||||
elif any(private_pattern.match(message) for private_pattern in PRIVATE_PATTERNS):
|
||||
print(
|
||||
|
||||
28
copybara.staging.sky
Normal file
28
copybara.staging.sky
Normal file
@ -0,0 +1,28 @@
|
||||
# This configuration is for migrating code from one Git repository to another using Copybara.
|
||||
# It selectively copies content, excluding specific paths and preserving authorship.
|
||||
sourceUrl = "git@github.com:10gen/mongo.git"
|
||||
destinationUrl = "git@github.com:10gen/mongo-copybara.git"
|
||||
|
||||
core.workflow(
|
||||
name = "default",
|
||||
origin = git.origin(
|
||||
url = sourceUrl,
|
||||
ref = "v7.1",
|
||||
# VersionSelector
|
||||
),
|
||||
destination = git.destination(
|
||||
url = destinationUrl,
|
||||
fetch = "v7.1",
|
||||
push = "v7.1",
|
||||
),
|
||||
# Change path to the folder you want to publish publicly
|
||||
origin_files = glob(["**"], exclude=["src/mongo/db/modules/**"]),
|
||||
|
||||
authoring = authoring.pass_thru("MongoDB <mongodb@mongodb.com>"),
|
||||
|
||||
mode = "ITERATIVE",
|
||||
# Change the path here to the folder you want to publish publicly
|
||||
# transformations = [
|
||||
# core.move("path/to/folder/you/want/exported", ""),
|
||||
# ],
|
||||
)
|
||||
@ -23,7 +23,7 @@ tests][fail_point_test].
|
||||
|
||||
## Configuring and Waiting on Fail Points
|
||||
|
||||
Fail point configuration involves chosing a "mode" for activation (e.g., "alwaysOn") and optionally
|
||||
Fail point configuration involves choosing a "mode" for activation (e.g., "alwaysOn") and optionally
|
||||
providing additional data in the form of a BSON object. For the vast majority of cases, this is done
|
||||
by issuing a `configureFailPoint` command request. This is made easier in JavaScript using the
|
||||
`configureFailPoint` helper from [fail_point_util.js][fail_point_util]. Fail points can also be
|
||||
|
||||
@ -268,7 +268,7 @@ last-continuous:
|
||||
- test_file: jstests/sharding/resharding_temp_ns_routing_info_unsharded.js
|
||||
ticket: SERVER-68628
|
||||
- test_file: jstests/sharding/move_chunk_concurrent_cloning.js
|
||||
ticket: SERVER-68648
|
||||
ticket: SERVER-81201
|
||||
- test_file: jstests/sharding/move_chunk_interrupt_postimage.js
|
||||
ticket: SERVER-68728
|
||||
- test_file: jstests/sharding/resharding_critical_section_metrics.js
|
||||
@ -385,14 +385,10 @@ last-continuous:
|
||||
ticket: SERVER-77386
|
||||
- test_file: jstests/core/timeseries/timeseries_resume_after.js
|
||||
ticket: SERVER-77386
|
||||
- test_file: jstests/sharding/query/sharded_graph_lookup_execution.js
|
||||
ticket: SERVER-77427
|
||||
- test_file: jstests/sharding/query/sharded_lookup_execution.js
|
||||
ticket: SERVER-77427
|
||||
- test_file: jstests/sharding/multi_collection_transaction_placement_conflict_workaround.js
|
||||
ticket: SERVER-77506
|
||||
- test_file: jstests/sharding/fsync_lock_unlock.js
|
||||
ticket: SERVER-78149
|
||||
ticket: SERVER-73685
|
||||
- test_file: jstests/sharding/fsync_lock_ddl_lock.js
|
||||
ticket: SERVER-78157
|
||||
- test_file: jstests/sharding/fsync_lock_fails_with_in_progress_ddl_op.js
|
||||
@ -403,6 +399,8 @@ last-continuous:
|
||||
ticket: SERVER-78187
|
||||
- test_file: jstests/core/query/elemmatch/elemmatch_ne.js
|
||||
ticket: SERVER-78260
|
||||
- test_file: jstests/core/timeseries/timeseries_buckets_oplog_update.js
|
||||
ticket: SERVER-79912
|
||||
- test_file: jstests/sharding/analyze_shard_key/timeseries.js
|
||||
ticket: SERVER-78595
|
||||
- test_file: jstests/change_streams/oplog_rewrite/change_stream_nor_rewrite.js
|
||||
@ -419,10 +417,28 @@ last-continuous:
|
||||
ticket: SERVER-79136
|
||||
- test_file: jstests/sharding/reset_placement_history_snapshot_read.js
|
||||
ticket: SERVER-79357
|
||||
- test_file: jstests/sharding/index_and_collection_option_propagation.js
|
||||
ticket: SERVER-71819
|
||||
- test_file: jstests/replsets/tenant_migration_recreate_timeseries_collection.js
|
||||
ticket: SERVER-80301
|
||||
- test_file: jstests/replsets/stepdown_fassert_on_rstl_timeout.js
|
||||
ticket: SERVER-71520
|
||||
- test_file: jstests/core/timeseries/nondefault_collation.js
|
||||
ticket: SERVER-81013
|
||||
- test_file: jstests/core/timeseries/timeseries_delete_collation.js
|
||||
ticket: SERVER-81013
|
||||
- test_file: jstests/core/timeseries/timeseries_update_collation.js
|
||||
ticket: SERVER-81013
|
||||
- test_file: jstests/sharding/analyze_shard_key/ns_validation.js
|
||||
ticket: SERVER-81939
|
||||
- test_file: jstests/sharding/timeseries_insert_targeting_normalize_metadata.js
|
||||
ticket: SERVER-80203
|
||||
- test_file: jstests/sharding/flushRoutingTableCacheUpdates_enforced_on_collections.js
|
||||
ticket: SERVER-81985
|
||||
- test_file: jstests/sharding/move_chunk_basic.js
|
||||
ticket: SERVER-81201
|
||||
- test_file: jstests/sharding/block_chunk_migrations_without_hashed_shard_key_index.js
|
||||
ticket: SERVER-78530
|
||||
- test_file: jstests/sharding/delete_range_deletion_tasks_on_dropped_hashed_shard_key_index.js
|
||||
ticket: SERVER-78530
|
||||
suites: null
|
||||
last-lts:
|
||||
all:
|
||||
@ -737,7 +753,7 @@ last-lts:
|
||||
- test_file: jstests/sharding/resharding_temp_ns_routing_info_unsharded.js
|
||||
ticket: SERVER-68628
|
||||
- test_file: jstests/sharding/move_chunk_concurrent_cloning.js
|
||||
ticket: SERVER-68648
|
||||
ticket: SERVER-81201
|
||||
- test_file: jstests/sharding/move_chunk_interrupt_postimage.js
|
||||
ticket: SERVER-68728
|
||||
- test_file: jstests/replsets/tenant_migration_recipient_forget_migration.js
|
||||
@ -864,14 +880,10 @@ last-lts:
|
||||
ticket: SERVER-77386
|
||||
- test_file: jstests/core/timeseries/timeseries_resume_after.js
|
||||
ticket: SERVER-77386
|
||||
- test_file: jstests/sharding/query/sharded_graph_lookup_execution.js
|
||||
ticket: SERVER-77427
|
||||
- test_file: jstests/sharding/query/sharded_lookup_execution.js
|
||||
ticket: SERVER-77427
|
||||
- test_file: jstests/sharding/multi_collection_transaction_placement_conflict_workaround.js
|
||||
ticket: SERVER-77506
|
||||
- test_file: jstests/sharding/fsync_lock_unlock.js
|
||||
ticket: SERVER-78149
|
||||
ticket: SERVER-73685
|
||||
- test_file: jstests/sharding/fsync_lock_ddl_lock.js
|
||||
ticket: SERVER-78157
|
||||
- test_file: jstests/sharding/fsync_lock_fails_with_in_progress_ddl_op.js
|
||||
@ -906,10 +918,30 @@ last-lts:
|
||||
ticket: SERVER-79136
|
||||
- test_file: jstests/sharding/reset_placement_history_snapshot_read.js
|
||||
ticket: SERVER-79357
|
||||
- test_file: jstests/sharding/index_and_collection_option_propagation.js
|
||||
ticket: SERVER-71819
|
||||
- test_file: jstests/replsets/dbcheck_dropped_collection.js
|
||||
ticket: SERVER-79490
|
||||
- test_file: jstests/replsets/tenant_migration_recreate_timeseries_collection.js
|
||||
ticket: SERVER-80301
|
||||
- test_file: jstests/replsets/stepdown_fassert_on_rstl_timeout.js
|
||||
ticket: SERVER-71520
|
||||
- test_file: jstests/core/timeseries/timeseries_buckets_oplog_update.js
|
||||
ticket: SERVER-79912
|
||||
- test_file: jstests/core/timeseries/nondefault_collation.js
|
||||
ticket: SERVER-81013
|
||||
- test_file: jstests/core/timeseries/timeseries_delete_collation.js
|
||||
ticket: SERVER-81013
|
||||
- test_file: jstests/core/timeseries/timeseries_update_collation.js
|
||||
ticket: SERVER-81013
|
||||
- test_file: jstests/sharding/analyze_shard_key/ns_validation.js
|
||||
ticket: SERVER-81939
|
||||
- test_file: jstests/sharding/timeseries_insert_targeting_normalize_metadata.js
|
||||
ticket: SERVER-80203
|
||||
- test_file: jstests/sharding/flushRoutingTableCacheUpdates_enforced_on_collections.js
|
||||
ticket: SERVER-81985
|
||||
- test_file: jstests/sharding/move_chunk_basic.js
|
||||
ticket: SERVER-81201
|
||||
- test_file: jstests/sharding/block_chunk_migrations_without_hashed_shard_key_index.js
|
||||
ticket: SERVER-78530
|
||||
- test_file: jstests/sharding/delete_range_deletion_tasks_on_dropped_hashed_shard_key_index.js
|
||||
ticket: SERVER-78530
|
||||
suites: null
|
||||
|
||||
@ -695,7 +695,6 @@ buildvariants:
|
||||
test_flags: >-
|
||||
--runAllFeatureFlagTests
|
||||
--excludeWithAnyTags=incompatible_with_windows_tls
|
||||
--excludeWithAnyTags=incompatible_with_shard_merge
|
||||
external_auth_jobs_max: 1
|
||||
# Uncomment expansion and `burn_in_tasks_gen` task below and add resmoke task name to burn-in.
|
||||
# WARNING! Task splitting is not supported for burn-in tasks. Large unsplitted `_gen` tasks may
|
||||
@ -1167,8 +1166,6 @@ buildvariants:
|
||||
- name: server_selection_json_test_TG
|
||||
distros:
|
||||
- rhel80-xlarge
|
||||
- name: streams
|
||||
- name: streams_auth
|
||||
- name: vector_search
|
||||
- name: vector_search_auth
|
||||
- name: vector_search_ssl
|
||||
@ -1190,7 +1187,6 @@ buildvariants:
|
||||
# buildscripts/resmokeconfig/fully_disabled_feature_flags.yml
|
||||
test_flags: >-
|
||||
--runAllFeatureFlagTests
|
||||
--excludeWithAnyTags=incompatible_with_shard_merge
|
||||
# Uncomment expansion and `burn_in_tasks_gen` task below and add resmoke task name to burn-in.
|
||||
# WARNING! Task splitting is not supported for burn-in tasks. Large unsplitted `_gen` tasks may
|
||||
# run too long and hit execution timeouts.
|
||||
@ -1313,9 +1309,6 @@ buildvariants:
|
||||
- name: .updatefuzzer
|
||||
- name: secondary_reads_passthrough_gen
|
||||
- name: .shard_split
|
||||
- name: .shard_merge
|
||||
- name: streams
|
||||
- name: streams_auth
|
||||
- name: vector_search
|
||||
- name: vector_search_auth
|
||||
- name: vector_search_ssl
|
||||
@ -1458,7 +1451,6 @@ buildvariants:
|
||||
<<: *enterprise-rhel-80-64-bit-dynamic-all-feature-flags-expansions
|
||||
test_flags: >-
|
||||
--runAllFeatureFlagTests
|
||||
--excludeWithAnyTags=incompatible_with_shard_merge
|
||||
--excludeWithAnyTags=cqf_incompatible
|
||||
--mongosSetParameters="{featureFlagCommonQueryFramework: true, internalQueryFrameworkControl: 'tryBonsai'}"
|
||||
--mongodSetParameters="{featureFlagCommonQueryFramework: true, internalQueryFrameworkControl: 'tryBonsai'}"
|
||||
@ -1563,9 +1555,6 @@ buildvariants:
|
||||
- name: .updatefuzzer
|
||||
- name: secondary_reads_passthrough_gen
|
||||
- name: .shard_split
|
||||
- name: .shard_merge
|
||||
- name: streams
|
||||
- name: streams_auth
|
||||
- name: query_stats_passthrough
|
||||
- name: query_stats_passthrough_writeonly
|
||||
- name: query_stats_mongos_passthrough
|
||||
@ -1658,7 +1647,6 @@ buildvariants:
|
||||
# No feature flag tests since they aren't compatible with the older binaries.
|
||||
test_flags: >-
|
||||
--runNoFeatureFlagTests
|
||||
--excludeWithAnyTags=incompatible_with_shard_merge,
|
||||
|
||||
# This variant exists becuase this is the only way to test future multiversion tags
|
||||
# version_expansions_gen will pretend we are upgrading to "bv_future_git_tag"
|
||||
@ -1926,7 +1914,7 @@ buildvariants:
|
||||
exec_timeout_factor: 1.5
|
||||
test_flags: >-
|
||||
--runAllFeatureFlagTests
|
||||
--excludeWithAnyTags=incompatible_with_amazon_linux,incompatible_with_shard_merge,requires_external_data_source
|
||||
--excludeWithAnyTags=incompatible_with_amazon_linux,requires_external_data_source
|
||||
tasks:
|
||||
- name: analyze_shard_key_jscore_passthrough_gen
|
||||
- name: query_golden_classic
|
||||
@ -2007,7 +1995,6 @@ buildvariants:
|
||||
- amazon2-arm64-large
|
||||
- name: session_jscore_passthrough
|
||||
- name: .shard_split
|
||||
- name: .shard_merge
|
||||
- name: .sharding .jscore !.wo_snapshot !.multi_stmt
|
||||
- name: sharding_api_version_jscore_passthrough_gen
|
||||
- name: sharding_api_strict_passthrough_gen
|
||||
@ -2016,8 +2003,6 @@ buildvariants:
|
||||
- name: sharding_max_mirroring_opportunistic_secondary_targeting_ese_gcm_gen
|
||||
- name: sharded_collections_single_writes_without_shard_key_jscore_passthrough_gen
|
||||
- name: sharded_multi_stmt_txn_jscore_passthrough
|
||||
- name: streams
|
||||
- name: streams_auth
|
||||
- name: .updatefuzzer
|
||||
- name: vector_search
|
||||
- name: vector_search_auth
|
||||
@ -2059,7 +2044,6 @@ buildvariants:
|
||||
# buildscripts/resmokeconfig/fully_disabled_feature_flags.yml
|
||||
test_flags: >-
|
||||
--excludeWithAnyTags=requires_ocsp_stapling,requires_increased_memlock_limits
|
||||
--excludeWithAnyTags=incompatible_with_shard_merge
|
||||
--runAllFeatureFlagTests
|
||||
multiversion_platform: rhel80
|
||||
multiversion_edition: enterprise
|
||||
@ -2161,7 +2145,6 @@ buildvariants:
|
||||
# buildscripts/resmokeconfig/fully_disabled_feature_flags.yml
|
||||
test_flags: >-
|
||||
--excludeWithAnyTags=requires_ocsp_stapling
|
||||
--excludeWithAnyTags=incompatible_with_shard_merge
|
||||
--runAllFeatureFlagTests
|
||||
tasks:
|
||||
- name: jsCore
|
||||
@ -2179,7 +2162,6 @@ buildvariants:
|
||||
# buildscripts/resmokeconfig/fully_disabled_feature_flags.yml
|
||||
test_flags: >-
|
||||
--excludeWithAnyTags=requires_ocsp_stapling
|
||||
--excludeWithAnyTags=incompatible_with_shard_merge
|
||||
--runAllFeatureFlagTests
|
||||
tasks:
|
||||
- name: audit
|
||||
@ -2225,13 +2207,10 @@ buildvariants:
|
||||
- name: sasl
|
||||
- name: secondary_reads_passthrough_gen
|
||||
- name: session_jscore_passthrough
|
||||
- name: streams
|
||||
- name: streams_auth
|
||||
- name: .sharding .jscore !.wo_snapshot
|
||||
- name: .sharding .common !.csrs
|
||||
- name: .serverless
|
||||
- name: .shard_split
|
||||
- name: .shard_merge
|
||||
- name: query_stats_passthrough
|
||||
- name: query_stats_passthrough_writeonly
|
||||
- name: query_stats_mongos_passthrough
|
||||
@ -2383,8 +2362,6 @@ buildvariants:
|
||||
- name: server_selection_json_test_TG
|
||||
distros:
|
||||
- rhel80-xlarge
|
||||
- name: streams
|
||||
- name: streams_auth
|
||||
- name: vector_search
|
||||
- name: vector_search_auth
|
||||
- name: vector_search_ssl
|
||||
@ -2883,7 +2860,7 @@ buildvariants:
|
||||
<<: *linux_arm64_generic_expansions
|
||||
test_flags: >-
|
||||
--mongodSetParameters="{storageEngineConcurrencyAdjustmentAlgorithm: fixedConcurrentTransactions}"
|
||||
--excludeWithAnyTags=incompatible_with_amazon_linux,incompatible_with_shard_merge,requires_external_data_source
|
||||
--excludeWithAnyTags=incompatible_with_amazon_linux,requires_external_data_source
|
||||
scons_cache_scope: shared
|
||||
scons_cache_mode: all
|
||||
commit_queue_alternate_cache: amazon-linux2-arm64-compile
|
||||
@ -2974,8 +2951,6 @@ buildvariants:
|
||||
- name: sharding_max_mirroring_opportunistic_secondary_targeting_ese_gcm_gen
|
||||
- name: sharded_collections_single_writes_without_shard_key_jscore_passthrough_gen
|
||||
- name: sharded_multi_stmt_txn_jscore_passthrough
|
||||
- name: streams
|
||||
- name: streams_auth
|
||||
- name: .updatefuzzer
|
||||
- name: vector_search
|
||||
- name: vector_search_auth
|
||||
@ -3010,7 +2985,6 @@ buildvariants:
|
||||
test_flags: >-
|
||||
--runAllFeatureFlagTests
|
||||
--excludeWithAnyTags=resource_intensive
|
||||
--excludeWithAnyTags=incompatible_with_shard_merge
|
||||
|
||||
### Security Patch-Specific Build Variants ###
|
||||
- <<: *enterprise-rhel-80-64-bit-dynamic-all-feature-flags-template
|
||||
|
||||
@ -6,20 +6,579 @@ include:
|
||||
- filename: etc/evergreen_yml_components/variants/atlas.yml
|
||||
- filename: etc/evergreen_yml_components/variants/misc_release.yml
|
||||
### Comment out when using this file for a Rapid release branch. ###
|
||||
- filename: etc/evergreen_yml_components/variants/ibm.yml
|
||||
# - filename: etc/evergreen_yml_components/variants/ibm.yml
|
||||
### Uncomment when using this file for a LTS release branch. ###
|
||||
# - filename: etc/evergreen_yml_components/variants/in_memory.yml
|
||||
### Uncomment when using this file for a LTS or Rapid release branch. ###
|
||||
# - filename: etc/evergreen_yml_components/variants/sanitizer.yml
|
||||
- filename: etc/evergreen_yml_components/variants/sanitizer.yml
|
||||
### Uncomment when using this file for a LTS or Rapid release branch. ###
|
||||
# - filename: etc/evergreen_yml_components/variants/ninja.yml
|
||||
- filename: etc/evergreen_yml_components/variants/ninja.yml
|
||||
### Uncomment when using this file for a LTS or Rapid release branch. ###
|
||||
# - filename: etc/evergreen_yml_components/variants/classic_engine.yml
|
||||
- filename: etc/evergreen_yml_components/variants/classic_engine.yml
|
||||
### Uncomment when using this file for a LTS or Rapid release branch. ###
|
||||
# - filename: etc/evergreen_yml_components/variants/config_shard.yml
|
||||
- filename: etc/evergreen_yml_components/variants/config_shard.yml
|
||||
- filename: etc/evergreen_yml_components/variants/compile_static_analysis.yml
|
||||
|
||||
|
||||
parameters:
|
||||
- key: evergreen_config_file_path
|
||||
value: "etc/evergreen_nightly.yml"
|
||||
description: "path to this file"
|
||||
|
||||
|
||||
variables:
|
||||
- &linux_x86_dynamic_debug_compile_variant_dependency
|
||||
depends_on:
|
||||
- name: archive_dist_test_debug
|
||||
variant: &linux_x86_dynamic_debug_compile_variant_name linux-x86-dynamic-debug-compile-required
|
||||
- name: version_gen
|
||||
variant: generate-tasks-for-version
|
||||
# This is added because of EVG-18211.
|
||||
# Without this we are adding extra dependencies on evergreen and it is causing strain
|
||||
omit_generated_tasks: true
|
||||
- name: generate_buildid_to_debug_symbols_mapping
|
||||
variant: linux-x86-dynamic-debug-compile-required
|
||||
|
||||
- &windows_compile_variant_dependency
|
||||
depends_on:
|
||||
- name: archive_dist_test_debug
|
||||
variant: &windows_compile_variant_name windows-compile-required
|
||||
- name: version_gen
|
||||
variant: generate-tasks-for-version
|
||||
# This is added because of EVG-18211.
|
||||
# Without this we are adding extra dependencies on evergreen and it is causing strain
|
||||
omit_generated_tasks: true
|
||||
- name: generate_buildid_to_debug_symbols_mapping
|
||||
variant: windows-compile-required
|
||||
|
||||
- &amazon_linux2_arm64_compile_variant_dependency
|
||||
depends_on:
|
||||
- name: archive_dist_test_debug
|
||||
variant: &amazon_linux2_arm64_compile_variant_name amazon-linux2-arm64-compile
|
||||
- name: version_gen
|
||||
variant: generate-tasks-for-version
|
||||
# This is added because of EVG-18211.
|
||||
# Without this we are adding extra dependencies on evergreen and it is causing strain
|
||||
omit_generated_tasks: true
|
||||
- name: generate_buildid_to_debug_symbols_mapping
|
||||
variant: amazon-linux2-arm64-compile
|
||||
|
||||
# THIS WAS COPIED TO config_shard.yml - ANY MODIFICATIONS HERE SHOULD ALSO BE MADE IN THAT FILE.
|
||||
- &linux_x86_dynamic_compile_variant_dependency
|
||||
depends_on:
|
||||
- name: archive_dist_test_debug
|
||||
variant: &linux_x86_dynamic_compile_variant_name linux-x86-dynamic-compile
|
||||
- name: version_gen
|
||||
variant: generate-tasks-for-version
|
||||
# This is added because of EVG-18211.
|
||||
# Without this we are adding extra dependencies on evergreen and it is causing strain
|
||||
omit_generated_tasks: true
|
||||
- name: generate_buildid_to_debug_symbols_mapping
|
||||
variant: linux-x86-dynamic-compile
|
||||
|
||||
# THIS WAS COPIED TO config_shard.yml - ANY MODIFICATIONS HERE SHOULD ALSO BE MADE IN THAT FILE.
|
||||
- &linux_x86_generic_expansions
|
||||
multiversion_platform: rhel80
|
||||
multiversion_edition: enterprise
|
||||
repo_edition: enterprise
|
||||
large_distro_name: rhel80-medium
|
||||
num_scons_link_jobs_available: 0.99
|
||||
compile_variant: *linux_x86_dynamic_compile_variant_name
|
||||
|
||||
- &linux_debug_aubsan_compile_variant_dependency
|
||||
depends_on:
|
||||
- name: archive_dist_test_debug
|
||||
variant: &linux_debug_aubsan_compile_variant_name linux-debug-aubsan-compile-required
|
||||
- name: version_gen
|
||||
variant: generate-tasks-for-version
|
||||
# This is added because of EVG-18211.
|
||||
# Without this we are adding extra dependencies on evergreen and it is causing strain
|
||||
omit_generated_tasks: true
|
||||
- name: generate_buildid_to_debug_symbols_mapping
|
||||
variant: linux-debug-aubsan-compile-required
|
||||
|
||||
# If you add anything to san_options, make sure the appropriate changes are
|
||||
# also made to SConstruct.
|
||||
# and also to the san_options in compile_static_analysis.yml and sanitizer.yml
|
||||
- aubsan_options: &aubsan_options
|
||||
>-
|
||||
UBSAN_OPTIONS="print_stacktrace=1:external_symbolizer_path=/opt/mongodbtoolchain/v4/bin/llvm-symbolizer"
|
||||
LSAN_OPTIONS="suppressions=etc/lsan.suppressions:report_objects=1"
|
||||
ASAN_OPTIONS="detect_leaks=1:check_initialization_order=true:strict_init_order=true:abort_on_error=1:disable_coredump=0:handle_abort=1:strict_string_checks=true:detect_invalid_pointer_pairs=1:external_symbolizer_path=/opt/mongodbtoolchain/v4/bin/llvm-symbolizer"
|
||||
|
||||
- &linux_arm64_generic_expansions
|
||||
multiversion_platform: amazon2
|
||||
multiversion_edition: enterprise
|
||||
multiversion_architecture: aarch64
|
||||
packager_arch: aarch64
|
||||
packager_distro: amazon2
|
||||
repo_edition: enterprise
|
||||
large_distro_name: amazon2-arm64-large
|
||||
num_scons_link_jobs_available: 0.99
|
||||
compile_variant: *amazon_linux2_arm64_compile_variant_name
|
||||
|
||||
- &enterprise-amazon-linux2-arm64-all-feature-flags-template
|
||||
<<: *amazon_linux2_arm64_compile_variant_dependency
|
||||
name: &enterprise-amazon-linux2-arm64-all-feature-flags enterprise-amazon-linux2-arm64-all-feature-flags
|
||||
display_name: "! Amazon Linux 2 arm64 (all feature flags)"
|
||||
cron: "0 */4 * * *" # From the ${project_required_suggested_cron} parameter
|
||||
modules:
|
||||
- enterprise
|
||||
run_on:
|
||||
- amazon2-arm64-small
|
||||
stepback: true
|
||||
expansions: &enterprise-amazon-linux2-arm64-all-feature-flags-expansions
|
||||
<<: *linux_arm64_generic_expansions
|
||||
scons_cache_scope: shared
|
||||
scons_cache_mode: all
|
||||
has_packages: false
|
||||
jstestfuzz_num_generated_files: 40
|
||||
jstestfuzz_concurrent_num_files: 10
|
||||
target_resmoke_time: 10
|
||||
max_sub_suites: 5
|
||||
idle_timeout_factor: 1.5
|
||||
exec_timeout_factor: 1.5
|
||||
test_flags: >-
|
||||
--runAllFeatureFlagTests
|
||||
--excludeWithAnyTags=incompatible_with_amazon_linux,incompatible_with_shard_merge,requires_external_data_source
|
||||
tasks:
|
||||
- name: analyze_shard_key_jscore_passthrough_gen
|
||||
- name: query_golden_classic
|
||||
- name: lint_fuzzer_sanity_patch
|
||||
- name: test_api_version_compatibility
|
||||
- name: check_feature_flag_tags
|
||||
- name: check_for_todos
|
||||
- name: .aggfuzzer !.cqf_only
|
||||
- name: .aggregation
|
||||
- name: aggregation_repeat_queries
|
||||
- name: audit
|
||||
- name: .auth
|
||||
- name: buildscripts_test
|
||||
- name: .bulk_write
|
||||
- name: resmoke_end2end_tests
|
||||
- name: unittest_shell_hang_analyzer_gen
|
||||
- name: .causally_consistent !.sharding
|
||||
- name: .change_streams
|
||||
- name: .change_stream_fuzzer
|
||||
# TODO SERVER-57866: Remove the explicit mentions of change stream multitenant suites.
|
||||
- name: change_streams_multitenant_passthrough
|
||||
- name: change_streams_multitenant_sharded_collections_passthrough
|
||||
- name: .cqf
|
||||
- name: .misc_js
|
||||
- name: .clustered_collections
|
||||
- name: .concurrency !.large !.ubsan !.no_txns
|
||||
- name: .concurrency .large !.ubsan !.no_txns
|
||||
- name: .config_fuzzer !.large
|
||||
- name: .config_fuzzer .large
|
||||
distros:
|
||||
- amazon2-arm64-large
|
||||
- name: .config_fuzzer_stress
|
||||
distros:
|
||||
- amazon2-arm64-large
|
||||
- name: disk_wiredtiger
|
||||
- name: .encrypt
|
||||
- name: feature_flag_multiversion_gen
|
||||
- name: idl_tests
|
||||
- name: initial_sync_fuzzer_gen
|
||||
- name: .jscore .common
|
||||
- name: jsCore_column_store_indexes
|
||||
- name: jsCore_min_batch_repeat_queries_ese_gsm
|
||||
- name: jsCore_txns_large_txns_format
|
||||
- name: jsCore_wildcard_indexes
|
||||
- name: json_schema
|
||||
- name: .jstestfuzz !.flow_control # Flow control jstestfuzz take longer.
|
||||
- name: libunwind_tests
|
||||
- name: .multiversion_sanity_check
|
||||
- name: mqlrun
|
||||
- name: .multi_shard
|
||||
- name: multi_stmt_txn_jscore_passthrough_with_migration_gen
|
||||
- name: multiversion_gen
|
||||
- name: powercycle_smoke
|
||||
- name: .query_fuzzer
|
||||
- name: .random_multiversion_ds
|
||||
- name: .read_write_concern .large
|
||||
- name: .read_write_concern !.large
|
||||
- name: .replica_sets !.encrypt !.auth !.ignore_non_generated_replica_sets_jscore_passthrough
|
||||
- name: replica_sets_jscore_passthrough_gen
|
||||
- name: replica_sets_api_version_jscore_passthrough_gen
|
||||
- name: replica_sets_reconfig_jscore_passthrough_gen
|
||||
- name: replica_sets_reconfig_jscore_stepdown_passthrough_gen
|
||||
- name: replica_sets_reconfig_kill_primary_jscore_passthrough_gen
|
||||
- name: change_streams_pre_images_replica_sets_stepdown_primary_jscore_passthrough_gen
|
||||
- name: change_streams_pre_images_replica_sets_kill_secondary_jscore_passthrough_gen
|
||||
- name: retryable_writes_jscore_passthrough_gen
|
||||
- name: retryable_writes_jscore_stepdown_passthrough_gen
|
||||
- name: .read_only
|
||||
- name: .rollbackfuzzer
|
||||
- name: sasl
|
||||
- name: search
|
||||
- name: search_auth
|
||||
- name: search_pinned_connections_auth
|
||||
- name: search_ssl
|
||||
- name: secondary_reads_passthrough_gen
|
||||
- name: .serverless
|
||||
distros:
|
||||
- amazon2-arm64-large
|
||||
- name: session_jscore_passthrough
|
||||
- name: .shard_split
|
||||
- name: .shard_merge
|
||||
- name: .sharding .jscore !.wo_snapshot !.multi_stmt
|
||||
- name: sharding_api_version_jscore_passthrough_gen
|
||||
- name: sharding_api_strict_passthrough_gen
|
||||
- name: .sharding .txns
|
||||
- name: .sharding .common
|
||||
- name: sharding_max_mirroring_opportunistic_secondary_targeting_ese_gcm_gen
|
||||
- name: sharded_collections_single_writes_without_shard_key_jscore_passthrough_gen
|
||||
- name: sharded_multi_stmt_txn_jscore_passthrough
|
||||
- name: .updatefuzzer
|
||||
- name: vector_search
|
||||
- name: vector_search_auth
|
||||
- name: vector_search_ssl
|
||||
- name: query_stats_passthrough
|
||||
- name: query_stats_passthrough_writeonly
|
||||
- name: query_stats_mongos_passthrough
|
||||
|
||||
|
||||
buildvariants:
|
||||
- &linux-64-debug-required-template
|
||||
<<: *linux_x86_dynamic_debug_compile_variant_dependency
|
||||
name: &linux-64-debug-required linux-64-debug-required
|
||||
display_name: "! Linux x86 Shared Library DEBUG"
|
||||
cron: "0 */4 * * *" # From the ${project_required_suggested_cron} parameter
|
||||
run_on:
|
||||
- rhel80-medium
|
||||
expansions:
|
||||
resmoke_jobs_factor: 0.5 # Avoid starting too many mongod's
|
||||
test_flags: --excludeWithAnyTags=requires_http_client
|
||||
target_resmoke_time: 15
|
||||
max_sub_suites: 5
|
||||
large_distro_name: rhel80-medium
|
||||
compile_variant: *linux_x86_dynamic_debug_compile_variant_name
|
||||
tasks:
|
||||
- name: .aggregation !.encrypt !.feature_flag_guarded
|
||||
- name: .auth !.audit !.multiversion
|
||||
- name: sharding_auth_gen
|
||||
- name: .causally_consistent !.wo_snapshot
|
||||
- name: .change_streams
|
||||
- name: .clustered_collections
|
||||
- name: .misc_js
|
||||
- name: disk_wiredtiger
|
||||
- name: .jscore .common
|
||||
- name: jsCore_txns_large_txns_format
|
||||
- name: json_schema
|
||||
- name: query_golden_classic
|
||||
- name: libunwind_tests
|
||||
- name: .multi_shard
|
||||
- name: multi_stmt_txn_jscore_passthrough_with_migration_gen
|
||||
- name: .ocsp
|
||||
- name: .read_write_concern
|
||||
- name: .replica_sets !.encrypt !.ignore_non_generated_replica_sets_jscore_passthrough !.fcbis
|
||||
- name: replica_sets_jscore_passthrough_gen
|
||||
- name: replica_sets_reconfig_jscore_passthrough_gen
|
||||
- name: replica_sets_reconfig_jscore_stepdown_passthrough_gen
|
||||
- name: replica_sets_max_mirroring_large_txns_format_gen
|
||||
- name: .retry
|
||||
- name: .read_only
|
||||
- name: session_jscore_passthrough
|
||||
- name: sharded_multi_stmt_txn_jscore_passthrough
|
||||
- name: .sharding .jscore !.wo_snapshot
|
||||
- name: sharding_gen
|
||||
- name: sharding_max_mirroring_opportunistic_secondary_targeting_gen
|
||||
|
||||
- &enterprise-windows-template
|
||||
<<: *windows_compile_variant_dependency
|
||||
name: &enterprise-windows-required enterprise-windows-required
|
||||
display_name: "! Enterprise Windows"
|
||||
cron: "0 */4 * * *" # From the ${project_required_suggested_cron} parameter
|
||||
modules:
|
||||
- enterprise
|
||||
run_on:
|
||||
- windows-vsCurrent-small
|
||||
expansions: &windows_required_expansions
|
||||
compile_variant: *windows_compile_variant_name
|
||||
burn_in_tests_build_variant: enterprise-windows-required
|
||||
exe: ".exe"
|
||||
content_type: application/zip
|
||||
python: '/cygdrive/c/python/python39/python.exe'
|
||||
ext: zip
|
||||
multiversion_platform: windows
|
||||
multiversion_edition: enterprise
|
||||
jstestfuzz_num_generated_files: 35
|
||||
target_resmoke_time: 20
|
||||
max_sub_suites: 5
|
||||
large_distro_name: windows-vsCurrent-large
|
||||
push_path: windows
|
||||
push_bucket: downloads.10gen.com
|
||||
push_name: windows
|
||||
push_arch: x86_64-enterprise
|
||||
test_flags: --excludeWithAnyTags=incompatible_with_windows_tls
|
||||
external_auth_jobs_max: 1
|
||||
tasks:
|
||||
- name: audit
|
||||
- name: auth_audit_gen
|
||||
- name: causally_consistent_jscore_txns_passthrough
|
||||
distros:
|
||||
- windows-vsCurrent-large
|
||||
- name: .encrypt !.aggregation !.replica_sets !.sharding !.jscore
|
||||
- name: external_auth
|
||||
- name: external_auth_aws
|
||||
- name: external_auth_windows
|
||||
distros:
|
||||
- windows-2016-dc
|
||||
- name: .jscore .common !.sharding
|
||||
- name: jsCore_auth
|
||||
- name: jsCore_ese
|
||||
- name: jsCore_txns_large_txns_format
|
||||
- name: .jstestfuzz .common
|
||||
- name: mqlrun
|
||||
- name: noPassthrough_gen
|
||||
- name: noPassthroughWithMongod_gen
|
||||
- name: .replica_sets .common !.ignore_non_generated_replica_sets_jscore_passthrough
|
||||
- name: .replica_sets .multi_oplog !.ignore_non_generated_replica_sets_jscore_passthrough !.gcm
|
||||
- name: replica_sets_jscore_passthrough_gen
|
||||
distros:
|
||||
- windows-vsCurrent-large
|
||||
- name: sasl
|
||||
- name: .sharding .txns
|
||||
- name: sharding_auth_audit_gen
|
||||
- name: sharding_max_mirroring_opportunistic_secondary_targeting_ese_gen
|
||||
|
||||
- name: run-all-affected-jstests
|
||||
display_name: "! Run All Affected JStests"
|
||||
patch_only: true
|
||||
run_on:
|
||||
- rhel80-medium
|
||||
expansions:
|
||||
large_distro_name: rhel80-large
|
||||
burn_in_tag_include_all_required_and_suggested: true
|
||||
burn_in_tag_exclude_build_variants: >-
|
||||
macos-debug-suggested
|
||||
burn_in_tag_include_build_variants:
|
||||
burn_in_tag_compile_task_dependency: archive_dist_test_debug
|
||||
compile_variant: *amazon_linux2_arm64_compile_variant_name
|
||||
depends_on:
|
||||
- name: archive_dist_test_debug
|
||||
variant: *amazon_linux2_arm64_compile_variant_name
|
||||
- name: version_gen
|
||||
variant: generate-tasks-for-version
|
||||
# This is added because of EVG-18211.
|
||||
# Without this we are adding extra dependencies on evergreen and it is causing strain
|
||||
omit_generated_tasks: true
|
||||
- name: version_burn_in_gen
|
||||
variant: generate-tasks-for-version
|
||||
# This is added because of EVG-18211.
|
||||
# Without this we are adding extra dependencies on evergreen and it is causing strain
|
||||
omit_generated_tasks: true
|
||||
tasks:
|
||||
- name: burn_in_tags_gen
|
||||
|
||||
- &enterprise-rhel-80-64-bit-dynamic-template
|
||||
<<: *linux_x86_dynamic_compile_variant_dependency
|
||||
name: &enterprise-rhel-80-64-bit-dynamic enterprise-rhel-80-64-bit-dynamic
|
||||
display_name: "! Shared Library Enterprise RHEL 8.0"
|
||||
cron: "0 */4 * * *" # From the ${project_required_suggested_cron} parameter
|
||||
modules:
|
||||
- enterprise
|
||||
run_on:
|
||||
- rhel80-small
|
||||
# THIS WAS COPIED TO config_shard.yml - ANY MODIFICATIONS HERE SHOULD ALSO BE MADE IN THAT FILE.
|
||||
expansions: &enterprise-rhel-80-64-bit-dynamic-expansions
|
||||
<<: *linux_x86_generic_expansions
|
||||
scons_cache_scope: shared
|
||||
scons_cache_mode: all
|
||||
has_packages: false
|
||||
jstestfuzz_num_generated_files: 40
|
||||
jstestfuzz_concurrent_num_files: 10
|
||||
target_resmoke_time: 10
|
||||
max_sub_suites: 5
|
||||
idle_timeout_factor: 1.5
|
||||
exec_timeout_factor: 1.5
|
||||
large_distro_name: rhel80-medium
|
||||
depends_on:
|
||||
- name: archive_dist_test_debug
|
||||
variant: *linux_x86_dynamic_compile_variant_name
|
||||
- name: version_gen
|
||||
variant: generate-tasks-for-version
|
||||
# This is added because of EVG-18211.
|
||||
# Without this we are adding extra dependencies on evergreen and it is causing strain
|
||||
omit_generated_tasks: true
|
||||
tasks:
|
||||
- name: .aggfuzzer !.feature_flag_guarded
|
||||
- name: .aggregation !.feature_flag_guarded
|
||||
- name: aggregation_repeat_queries
|
||||
- name: analyze_shard_key_jscore_passthrough_gen
|
||||
- name: audit
|
||||
- name: .auth
|
||||
- name: unittest_shell_hang_analyzer_gen
|
||||
- name: .causally_consistent !.sharding
|
||||
- name: .change_streams
|
||||
- name: .change_stream_fuzzer
|
||||
- name: .misc_js
|
||||
- name: .concurrency !.large !.ubsan !.no_txns
|
||||
- name: .concurrency .large !.ubsan !.no_txns
|
||||
distros:
|
||||
- rhel80-medium
|
||||
- name: .config_fuzzer !.large
|
||||
- name: .config_fuzzer .large
|
||||
distros:
|
||||
- rhel80-medium
|
||||
- name: disk_wiredtiger
|
||||
- name: .encrypt
|
||||
- name: idl_tests
|
||||
- name: initial_sync_fuzzer_gen
|
||||
- name: fcv_upgrade_downgrade_replica_sets_jscore_passthrough_gen
|
||||
- name: fcv_upgrade_downgrade_sharding_jscore_passthrough_gen
|
||||
- name: fcv_upgrade_downgrade_sharded_collections_jscore_passthrough_gen
|
||||
- name: jsCore
|
||||
distros:
|
||||
- rhel80-xlarge
|
||||
- name: .jscore .common !jsCore
|
||||
- name: jsCore_min_batch_repeat_queries_ese_gsm
|
||||
- name: jsCore_txns_large_txns_format
|
||||
- name: json_schema
|
||||
- name: .jstestfuzz !.flow_control # Flow control jstestfuzz take longer.
|
||||
- name: libunwind_tests
|
||||
- name: mqlrun
|
||||
- name: .multi_shard
|
||||
- name: multi_stmt_txn_jscore_passthrough_with_migration_gen
|
||||
- name: multiversion_gen
|
||||
- name: .query_fuzzer
|
||||
- name: .random_multiversion_ds
|
||||
- name: .read_write_concern .large
|
||||
distros:
|
||||
- rhel80-medium
|
||||
- name: .read_write_concern !.large
|
||||
- name: .replica_sets !.encrypt !.auth
|
||||
distros:
|
||||
- rhel80-xlarge
|
||||
- name: replica_sets_api_version_jscore_passthrough_gen
|
||||
- name: replica_sets_reconfig_jscore_passthrough_gen
|
||||
- name: replica_sets_reconfig_jscore_stepdown_passthrough_gen
|
||||
distros:
|
||||
- rhel80-xlarge
|
||||
- name: replica_sets_reconfig_kill_primary_jscore_passthrough_gen
|
||||
distros:
|
||||
- rhel80-xlarge
|
||||
- name: change_streams_pre_images_replica_sets_stepdown_primary_jscore_passthrough_gen
|
||||
distros:
|
||||
- rhel80-xlarge
|
||||
- name: change_streams_pre_images_replica_sets_kill_secondary_jscore_passthrough_gen
|
||||
distros:
|
||||
- rhel80-xlarge
|
||||
- name: retryable_writes_jscore_passthrough_gen
|
||||
- name: retryable_writes_jscore_stepdown_passthrough_gen
|
||||
distros:
|
||||
- rhel80-medium
|
||||
- name: .read_only
|
||||
- name: .rollbackfuzzer
|
||||
- name: sasl
|
||||
- name: search
|
||||
- name: search_auth
|
||||
- name: search_pinned_connections_auth
|
||||
- name: search_ssl
|
||||
- name: session_jscore_passthrough
|
||||
- name: sharded_collections_single_writes_without_shard_key_jscore_passthrough_gen
|
||||
- name: .sharding .jscore !.wo_snapshot !.multi_stmt
|
||||
- name: sharding_api_version_jscore_passthrough_gen
|
||||
- name: sharding_api_strict_passthrough_gen
|
||||
- name: .sharding .txns
|
||||
- name: .sharding .common
|
||||
- name: .updatefuzzer
|
||||
- name: secondary_reads_passthrough_gen
|
||||
- name: .serverless
|
||||
distros:
|
||||
- rhel80-xlarge
|
||||
- name: vector_search
|
||||
- name: vector_search_auth
|
||||
- name: vector_search_ssl
|
||||
|
||||
- &rhel80-debug-aubsan-lite-template
|
||||
<<: *linux_debug_aubsan_compile_variant_dependency
|
||||
name: &rhel80-debug-aubsan-lite rhel80-debug-aubsan-lite
|
||||
display_name: "! Shared Library {A,UB}SAN Enterprise RHEL 8.0 DEBUG"
|
||||
cron: "0 */4 * * *" # From the ${project_required_suggested_cron} parameter
|
||||
modules:
|
||||
- enterprise
|
||||
run_on:
|
||||
- rhel80-build
|
||||
expansions: &aubsan-lite-required-expansions
|
||||
compile_variant: *linux_debug_aubsan_compile_variant_name
|
||||
lang_environment: LANG=C
|
||||
san_options: *aubsan_options
|
||||
test_flags: --excludeWithAnyTags=requires_ocsp_stapling,requires_increased_memlock_limits
|
||||
resmoke_jobs_factor: 0.3 # Avoid starting too many mongod's under {A,UB}SAN build.
|
||||
hang_analyzer_dump_core: false
|
||||
max_sub_suites: 3
|
||||
num_scons_link_jobs_available: 0.99
|
||||
large_distro_name: rhel80-build
|
||||
multiversion_platform: rhel80
|
||||
multiversion_edition: enterprise
|
||||
gcov_tool: /opt/mongodbtoolchain/v4/bin/gcov
|
||||
tasks:
|
||||
- name: jsCore
|
||||
- name: jsCore_txns
|
||||
|
||||
- <<: *enterprise-amazon-linux2-arm64-all-feature-flags-template
|
||||
name: &commit-queue commit-queue
|
||||
display_name: "~ Commit Queue"
|
||||
cron: "0 4 * * 0" # From the ${project_weekly_cron} parameter
|
||||
stepback: false
|
||||
expansions:
|
||||
<<: *linux_arm64_generic_expansions
|
||||
scons_cache_scope: shared
|
||||
scons_cache_mode: all
|
||||
commit_queue_alternate_cache: amazon-linux2-arm64-compile
|
||||
has_packages: false
|
||||
compile_flags: >-
|
||||
--ssl
|
||||
MONGO_DISTMOD=amazon2
|
||||
-j$(grep -c ^processor /proc/cpuinfo)
|
||||
--variables-files=etc/scons/mongodbtoolchain_stable_gcc.vars
|
||||
--link-model=dynamic
|
||||
crypt_task_compile_flags: >-
|
||||
SHLINKFLAGS_EXTRA="-Wl,-Bsymbolic
|
||||
-Wl,--no-gnu-unique"
|
||||
CCFLAGS="-fno-gnu-unique"
|
||||
clang_tidy_toolchain: v4
|
||||
num_scons_unit_cc_jobs_available: 0.75
|
||||
compile_variant: *commit-queue
|
||||
depends_on: []
|
||||
tasks:
|
||||
- name: compile_ninja_quick_TG
|
||||
- name: compile_test_parallel_core_stream_TG
|
||||
distros:
|
||||
- amazon2-arm64-xlarge-commitqueue
|
||||
- name: compile_test_parallel_unittest_stream_TG
|
||||
distros:
|
||||
- amazon2-arm64-xlarge-commitqueue
|
||||
- name: compile_test_parallel_dbtest_stream_TG
|
||||
distros:
|
||||
- amazon2-arm64-xlarge-commitqueue
|
||||
- name: jsCore
|
||||
distros:
|
||||
- amazon2-arm64-large
|
||||
- name: .lint
|
||||
- name: test_api_version_compatibility
|
||||
- name: validate_commit_message
|
||||
- name: lint_large_files_check
|
||||
- name: check_feature_flag_tags
|
||||
- name: compile_venv_deps_check
|
||||
- name: resmoke_validation_tests
|
||||
- name: version_gen_validation
|
||||
distros:
|
||||
- ubuntu2004-small
|
||||
|
||||
###########################################
|
||||
# Copybara buildvariants #
|
||||
###########################################
|
||||
|
||||
- name: ©bara-sync-between-repos copybara-sync-between-repos
|
||||
modules:
|
||||
- enterprise
|
||||
display_name: "* Copybara Sync Between Repos"
|
||||
cron: "0 4 * * *" # From the ${project_nightly_cron} parameter.
|
||||
run_on:
|
||||
- ubuntu2204-small
|
||||
stepback: false
|
||||
tasks:
|
||||
- name: sync_repo_with_copybara
|
||||
|
||||
@ -69,7 +69,7 @@ modules:
|
||||
- name: enterprise
|
||||
repo: git@github.com:10gen/mongo-enterprise-modules.git
|
||||
prefix: src/mongo/db/modules
|
||||
branch: master
|
||||
branch: v7.1
|
||||
|
||||
- name: wtdevelop
|
||||
repo: git@github.com:wiredtiger/wiredtiger.git
|
||||
@ -626,7 +626,7 @@ functions:
|
||||
"get buildnumber": &get_buildnumber
|
||||
command: keyval.inc
|
||||
params:
|
||||
key: "${build_variant}_master"
|
||||
key: "${build_variant}_v7.1"
|
||||
destination: "builder_num"
|
||||
|
||||
"run diskstats": &run_diskstats
|
||||
@ -1585,6 +1585,16 @@ functions:
|
||||
args:
|
||||
- "./src/evergreen/lint_fuzzer_sanity_all.sh"
|
||||
|
||||
"sync repo with copybara":
|
||||
- *f_expansions_write
|
||||
- command: subprocess.exec
|
||||
type: test
|
||||
params:
|
||||
binary: bash
|
||||
args:
|
||||
- "src/evergreen/run_python_script.sh"
|
||||
- "buildscripts/sync_repo_with_copybara.py"
|
||||
|
||||
# Used by generator
|
||||
"run jstestfuzz":
|
||||
- *f_expansions_write
|
||||
@ -3845,18 +3855,6 @@ tasks:
|
||||
resmoke_jobs_max: 1
|
||||
- func: "send benchmark results"
|
||||
|
||||
- <<: *benchmark_template
|
||||
name: benchmarks_streams
|
||||
tags: ["benchmarks"]
|
||||
commands:
|
||||
- func: "do benchmark setup"
|
||||
- func: "run tests"
|
||||
vars:
|
||||
suites: benchmarks_streams
|
||||
exec_timeout_secs: 18000 # 5 hour timeout.
|
||||
resmoke_jobs_max: 1
|
||||
- func: "send benchmark results"
|
||||
|
||||
- <<: *run_jepsen_template
|
||||
name: jepsen_register_findAndModify
|
||||
tags: ["jepsen"]
|
||||
@ -4928,6 +4926,18 @@ tasks:
|
||||
- func: "setup jstestfuzz"
|
||||
- func: "lint fuzzer sanity all"
|
||||
|
||||
|
||||
- name: sync_repo_with_copybara
|
||||
tags: []
|
||||
commands:
|
||||
- command: manifest.load
|
||||
- func: "git get project and add git tag"
|
||||
- *f_expansions_write
|
||||
- *kill_processes
|
||||
- *cleanup_environment
|
||||
- *set_up_venv
|
||||
- func: "sync repo with copybara"
|
||||
|
||||
## integration test suites ##
|
||||
|
||||
- <<: *task_template
|
||||
@ -6156,10 +6166,9 @@ tasks:
|
||||
use_large_distro: "true"
|
||||
fallback_num_sub_suites: 10
|
||||
|
||||
# TODO(SERVER-57896): Add "serverless" tag to shard merge passthrough when no longer feature flagged
|
||||
- <<: *gen_task_template
|
||||
name: shard_merge_jscore_passthrough_gen
|
||||
tags: ["shard_merge"]
|
||||
tags: ["serverless"]
|
||||
commands:
|
||||
- func: "generate resmoke tasks"
|
||||
vars:
|
||||
@ -6167,7 +6176,7 @@ tasks:
|
||||
|
||||
- <<: *gen_task_template
|
||||
name: shard_merge_causally_consistent_jscore_passthrough_gen
|
||||
tags: ["shard_merge"]
|
||||
tags: ["serverless"]
|
||||
commands:
|
||||
- func: "generate resmoke tasks"
|
||||
vars:
|
||||
@ -6218,10 +6227,9 @@ tasks:
|
||||
vars:
|
||||
use_large_distro: "true"
|
||||
|
||||
# TODO(SERVER-68643): Add "serverless" tag to shard merge passthrough when no longer feature flagged
|
||||
- <<: *gen_task_template
|
||||
name: shard_merge_multi_stmt_txn_jscore_passthrough_gen
|
||||
tags: ["shard_merge"]
|
||||
tags: ["serverless", "txn"]
|
||||
commands:
|
||||
- func: "generate resmoke tasks"
|
||||
vars:
|
||||
@ -6775,6 +6783,13 @@ tasks:
|
||||
- func: "do setup"
|
||||
- func: "run tests"
|
||||
|
||||
- <<: *task_template
|
||||
name: serverless_MTM
|
||||
tags: ["serverless"]
|
||||
commands:
|
||||
- func: "do setup"
|
||||
- func: "run tests"
|
||||
|
||||
- <<: *gen_task_template
|
||||
name: sharding_gen
|
||||
tags: ["sharding", "common"]
|
||||
@ -6921,6 +6936,15 @@ tasks:
|
||||
vars:
|
||||
suite: ssl_x509
|
||||
|
||||
- <<: *gen_task_template
|
||||
name: ssl_linear_gen
|
||||
tags: ["encrypt", "ssl", "patch_build"]
|
||||
commands:
|
||||
- func: "generate resmoke tasks"
|
||||
vars:
|
||||
suite: ssl_linear
|
||||
resmoke_jobs_max: 1
|
||||
|
||||
- <<: *gen_task_template
|
||||
name: fcv_upgrade_downgrade_replica_sets_jscore_passthrough_gen
|
||||
tags: ["jscore"]
|
||||
@ -7695,7 +7719,7 @@ tasks:
|
||||
shell: bash
|
||||
script: |
|
||||
set -oe
|
||||
podman login --username ${release_tools_container_registry_username} --password ${release_tools_container_registry_password} ${release_tools_container_registry}
|
||||
echo "${release_tools_container_registry_password}" | podman login --password-stdin --username ${release_tools_container_registry_username} ${release_tools_container_registry}
|
||||
- command: subprocess.exec
|
||||
params:
|
||||
binary: bash
|
||||
@ -7774,7 +7798,7 @@ tasks:
|
||||
shell: bash
|
||||
script: |
|
||||
set -oe
|
||||
podman login --username ${release_tools_container_registry_username} --password ${release_tools_container_registry_password} ${release_tools_container_registry}
|
||||
echo "${release_tools_container_registry_password}" | podman login --password-stdin --username ${release_tools_container_registry_username} ${release_tools_container_registry}
|
||||
|
||||
# signing windows artifacts
|
||||
- command: subprocess.exec
|
||||
@ -8330,7 +8354,7 @@ tasks:
|
||||
shell: bash
|
||||
script: |
|
||||
set -oe
|
||||
podman login --username ${release_tools_container_registry_username} --password ${release_tools_container_registry_password} ${release_tools_container_registry}
|
||||
echo "${release_tools_container_registry_password}" | podman login --password-stdin --username ${release_tools_container_registry_username} ${release_tools_container_registry}
|
||||
- command: subprocess.exec
|
||||
params:
|
||||
binary: bash
|
||||
@ -8511,20 +8535,6 @@ tasks:
|
||||
suite: cqf_experimental_no_passthrough
|
||||
use_large_distro: "true"
|
||||
|
||||
- <<: *task_template
|
||||
name: streams
|
||||
tags: []
|
||||
commands:
|
||||
- func: "do setup"
|
||||
- func: "run tests"
|
||||
|
||||
- <<: *task_template
|
||||
name: streams_auth
|
||||
tags: []
|
||||
commands:
|
||||
- func: "do setup"
|
||||
- func: "run tests"
|
||||
|
||||
- name: shared_scons_cache_pruning
|
||||
tags: []
|
||||
exec_timeout_secs: 7200 # 2 hour timeout for the task overall
|
||||
|
||||
@ -115,13 +115,6 @@ buildvariants:
|
||||
- name: .updatefuzzer
|
||||
- name: aggregation_repeat_queries
|
||||
- name: audit
|
||||
- name: burn_in_tags_gen
|
||||
depends_on:
|
||||
- name: version_burn_in_gen
|
||||
variant: generate-tasks-for-version
|
||||
omit_generated_tasks: true
|
||||
- name: archive_dist_test_debug
|
||||
variant: *linux_x86_dynamic_compile_variant_name
|
||||
- name: burn_in_tests_gen
|
||||
depends_on:
|
||||
- name: version_burn_in_gen
|
||||
@ -231,7 +224,6 @@ buildvariants:
|
||||
- name: jsCore_min_batch_repeat_queries_ese_gsm
|
||||
- name: jsCore_txns_large_txns_format
|
||||
- name: json_schema
|
||||
- name: .logical_session_cache
|
||||
- name: .multi_shard .common
|
||||
- name: .query_fuzzer
|
||||
- name: .read_write_concern
|
||||
@ -309,7 +301,6 @@ buildvariants:
|
||||
- name: jsCore_min_batch_repeat_queries_ese_gsm
|
||||
- name: jsCore_txns_large_txns_format
|
||||
- name: json_schema
|
||||
- name: .logical_session_cache .one_sec
|
||||
- name: .multi_shard .common
|
||||
- name: .read_write_concern
|
||||
- name: replica_sets_large_txns_format_jscore_passthrough
|
||||
|
||||
@ -87,21 +87,6 @@ buildvariants:
|
||||
distros:
|
||||
- rhel80-large
|
||||
|
||||
- <<: *generic_linux_compile_params
|
||||
name: &linux-x86-dynamic-compile-future-tag-multiversion linux-x86-dynamic-compile-future-tag-multiversion
|
||||
display_name: "Linux x86 Shared Library Compile (future git tag multiversion)"
|
||||
modules:
|
||||
- enterprise
|
||||
expansions:
|
||||
<<: *linux-x86-dynamic-compile-expansions
|
||||
bv_future_git_tag: r100.0.0-9999
|
||||
compile_variant: *linux-x86-dynamic-compile-future-tag-multiversion
|
||||
depends_on:
|
||||
- name: version_expansions_gen
|
||||
variant: enterprise-rhel-80-64-bit-future-git-tag-multiversion-version-gen
|
||||
tasks:
|
||||
- name: compile_test_serial_TG
|
||||
|
||||
- <<: *generic_linux_compile_params
|
||||
name: &linux-x86-dynamic-debug-compile-required linux-x86-dynamic-debug-compile-required # TODO: replace with Sanitizer.
|
||||
display_name: "! Linux x86 Shared Library DEBUG Compile"
|
||||
@ -123,17 +108,6 @@ buildvariants:
|
||||
- name: compile_test_parallel_dbtest_stream_TG
|
||||
- name: generate_buildid_to_debug_symbols_mapping
|
||||
|
||||
- <<: *generic_linux_compile_params
|
||||
name: &linux-x86-dynamic-debug-wtdevelop-compile linux-x86-dynamic-debug-wtdevelop-compile
|
||||
display_name: "~ Linux WiredTiger develop DEBUG Compile"
|
||||
activate: false
|
||||
modules:
|
||||
- wtdevelop
|
||||
expansions:
|
||||
<<: *linux_debug_compile_expansions
|
||||
use_wt_develop: true
|
||||
compile_variant: *linux-x86-dynamic-debug-wtdevelop-compile
|
||||
|
||||
- <<: *generic_linux_compile_params
|
||||
name: &linux-debug-aubsan-compile-required linux-debug-aubsan-compile-required
|
||||
display_name: "! Linux x86 Shared Library {A,UB}SAN Enterprise Compile"
|
||||
|
||||
@ -867,6 +867,31 @@ buildvariants:
|
||||
# - ubuntu2204-arm64-large
|
||||
- name: generate_buildid_to_debug_symbols_mapping
|
||||
|
||||
- name: enterprise-debian10-64
|
||||
display_name: Jepsen Tests on Enterprise Debian 10
|
||||
cron: "0 4 * * *" # From the ${project_nightly_cron} parameter.
|
||||
modules:
|
||||
- enterprise
|
||||
run_on:
|
||||
- debian10-test
|
||||
expansions:
|
||||
compile_flags: >-
|
||||
--ssl
|
||||
MONGO_DISTMOD=debian10
|
||||
-j$(grep -c ^processor /proc/cpuinfo)
|
||||
--variables-files=etc/scons/mongodbtoolchain_stable_gcc.vars
|
||||
--use-diagnostic-latches=off
|
||||
scons_cache_scope: shared
|
||||
large_distro_name: debian10-build
|
||||
compile_variant: enterprise-debian10-64
|
||||
tasks:
|
||||
- name: compile_and_archive_dist_test_TG
|
||||
distros:
|
||||
- debian10-build
|
||||
- name: .jepsen_docker
|
||||
distros:
|
||||
- debian10-large
|
||||
|
||||
- name: debian11
|
||||
display_name: Debian 11
|
||||
cron: "0 4 * * *" # From the ${project_nightly_cron} parameter.
|
||||
@ -2144,9 +2169,6 @@ buildvariants:
|
||||
- name: test_packages
|
||||
distros:
|
||||
- ubuntu2204-large
|
||||
- name: test_packages_release
|
||||
distros:
|
||||
- ubuntu2204-large
|
||||
- name: .publish
|
||||
- name: generate_buildid_to_debug_symbols_mapping
|
||||
|
||||
@ -2304,9 +2326,6 @@ buildvariants:
|
||||
- name: test_packages
|
||||
distros:
|
||||
- ubuntu2204-arm64-large
|
||||
- name: test_packages_release
|
||||
distros:
|
||||
- ubuntu2204-arm64-large
|
||||
- name: .publish
|
||||
- name: generate_buildid_to_debug_symbols_mapping
|
||||
|
||||
|
||||
@ -11,10 +11,10 @@ buildvariants:
|
||||
tasks:
|
||||
- name: compile_ninja_next_TG
|
||||
distros:
|
||||
- windows-vsCurrent-large
|
||||
- windows-vsCurrent-xlarge
|
||||
- name: compile_ninja_TG
|
||||
distros:
|
||||
- windows-vsCurrent-large
|
||||
- windows-vsCurrent-xlarge
|
||||
|
||||
- name: macos-enterprise-ninja
|
||||
display_name: "Ninja Build: macOS Enterprise"
|
||||
|
||||
2098
etc/system_perf.yml
2098
etc/system_perf.yml
File diff suppressed because it is too large
Load Diff
@ -3,6 +3,9 @@ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)"
|
||||
|
||||
cd src
|
||||
|
||||
echo "GRS_CONFIG_USER1_USERNAME=${garasign_gpg_username_70}" >> "signing-envfile"
|
||||
echo "GRS_CONFIG_USER1_PASSWORD=${garasign_gpg_password_70}" >> "signing-envfile"
|
||||
|
||||
set -o errexit
|
||||
set -o verbose
|
||||
|
||||
@ -23,8 +26,7 @@ gpg --yes -v --armor -o $crypt_file_name.sig --detach-sign $crypt_file_name
|
||||
EOF
|
||||
|
||||
podman run \
|
||||
-e GRS_CONFIG_USER1_USERNAME=${garasign_gpg_username_70} \
|
||||
-e GRS_CONFIG_USER1_PASSWORD=${garasign_gpg_password_70} \
|
||||
--env-file=signing-envfile \
|
||||
--rm \
|
||||
-v $(pwd):$(pwd) -w $(pwd) \
|
||||
${garasign_gpg_image} \
|
||||
|
||||
@ -1,11 +1,14 @@
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)"
|
||||
. "$DIR/prelude.sh"
|
||||
|
||||
cd src
|
||||
|
||||
echo "GRS_CONFIG_USER1_USERNAME=${garasign_gpg_username_70}" >> "signing-envfile"
|
||||
echo "GRS_CONFIG_USER1_PASSWORD=${garasign_gpg_password_70}" >> "signing-envfile"
|
||||
|
||||
set -o errexit
|
||||
set -o verbose
|
||||
|
||||
cd src
|
||||
|
||||
long_ext=${ext}
|
||||
if [ "$long_ext" == "tgz" ]; then
|
||||
long_ext="tar.gz"
|
||||
@ -55,8 +58,7 @@ sign mongodb-cryptd-$push_name-$push_arch-$suffix.$ext
|
||||
EOF
|
||||
|
||||
podman run \
|
||||
-e GRS_CONFIG_USER1_USERNAME=${garasign_gpg_username_70} \
|
||||
-e GRS_CONFIG_USER1_PASSWORD=${garasign_gpg_password_70} \
|
||||
--env-file=signing-envfile \
|
||||
--rm \
|
||||
-v $(pwd):$(pwd) -w $(pwd) \
|
||||
${garasign_gpg_image} \
|
||||
|
||||
@ -1,11 +1,14 @@
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)"
|
||||
. "$DIR/prelude.sh"
|
||||
|
||||
cd src
|
||||
|
||||
echo "GRS_CONFIG_USER1_USERNAME=${garasign_jsign_username}" >> "signing-envfile"
|
||||
echo "GRS_CONFIG_USER1_PASSWORD=${garasign_jsign_password}" >> "signing-envfile"
|
||||
|
||||
set -o errexit
|
||||
set -o verbose
|
||||
|
||||
cd src
|
||||
|
||||
msi_filename=mongodb-${push_name}-${push_arch}-${suffix}.msi
|
||||
/usr/bin/find build/ -type f | grep msi$ | xargs -I original_filename cp original_filename $msi_filename || true
|
||||
|
||||
@ -25,8 +28,7 @@ sign $msi_filename
|
||||
EOF
|
||||
|
||||
podman run \
|
||||
-e GRS_CONFIG_USER1_USERNAME=${garasign_jsign_username} \
|
||||
-e GRS_CONFIG_USER1_PASSWORD=${garasign_jsign_password} \
|
||||
--env-file=signing-envfile \
|
||||
--rm \
|
||||
-v $(pwd):$(pwd) -w $(pwd) \
|
||||
${garasign_jsign_image} \
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)"
|
||||
. "$DIR/prelude.sh"
|
||||
|
||||
set -o verbose
|
||||
|
||||
packagesfile=packages.tgz
|
||||
|
||||
curl https://s3.amazonaws.com/mciuploads/${project}/${build_variant}/${revision}/artifacts/${build_id}-packages.tgz >> $packagesfile
|
||||
|
||||
@ -9,5 +9,5 @@ function setup_db_contrib_tool {
|
||||
# We force reinstall here because when we download the previous venv the shebang
|
||||
# in pipx still points to the old machines python location.
|
||||
python -m pip --disable-pip-version-check install --force-reinstall --no-deps "pipx==1.2.0" || exit 1
|
||||
pipx install "db-contrib-tool==0.6.5" || exit 1
|
||||
pipx install "db-contrib-tool==0.6.7" || exit 1
|
||||
}
|
||||
|
||||
66
jstests/aggregation/is_count_like.js
Normal file
66
jstests/aggregation/is_count_like.js
Normal file
@ -0,0 +1,66 @@
|
||||
/**
|
||||
* Checks that caching a query with predicate X, followed by a similar query with X in a rooted $or
|
||||
* does not pass along the isCountLike attribute to the subquery. Previously we would always pass
|
||||
* isCountLike to the child, meaning we could retrieve an incorrect plan from the cache and tassert.
|
||||
*
|
||||
* @tags: [
|
||||
* # If all chunks are moved off of a shard, it can cause the plan cache to miss commands.
|
||||
* assumes_balancer_off,
|
||||
* does_not_support_stepdowns,
|
||||
* assumes_unsharded_collection,
|
||||
* # Plan cache state is node-local and will not get migrated alongside tenant data.
|
||||
* tenant_migration_incompatible,
|
||||
* ]
|
||||
*/
|
||||
const collName = "is_count_like";
|
||||
const coll = db[collName];
|
||||
coll.drop();
|
||||
|
||||
// Creating this index allows an isCountLike index plan to be turned into a COUNT_SCAN, reproducing
|
||||
// the issue.
|
||||
coll.createIndex({a: 1});
|
||||
coll.createIndex({b: 1});
|
||||
coll.createIndex({a: 1, b: 1});
|
||||
|
||||
coll.insert({a: 0, b: 0});
|
||||
|
||||
function testConsecutiveQueriesWork(firstQuery, secondQuery) {
|
||||
// Run each query enough to get them cached. Then swap the order, to make sure there are no
|
||||
// failures if the second query is cached first.
|
||||
coll.getPlanCache().clear();
|
||||
for (let i = 0; i < 5; i++) {
|
||||
firstQuery();
|
||||
}
|
||||
for (let i = 0; i < 5; i++) {
|
||||
secondQuery();
|
||||
}
|
||||
|
||||
coll.getPlanCache().clear();
|
||||
for (let i = 0; i < 5; i++) {
|
||||
secondQuery();
|
||||
}
|
||||
for (let i = 0; i < 5; i++) {
|
||||
firstQuery();
|
||||
}
|
||||
}
|
||||
|
||||
function testCountLikeStage(stage) {
|
||||
testConsecutiveQueriesWork(
|
||||
function() {
|
||||
coll.aggregate([{$match: {a: 0}}, stage]).toArray();
|
||||
},
|
||||
function() {
|
||||
coll.aggregate([{$match: {$or: [{a: 0}, {b: 0}]}}, stage]).toArray();
|
||||
});
|
||||
}
|
||||
|
||||
testConsecutiveQueriesWork(
|
||||
function() {
|
||||
coll.find({a: 0}).count();
|
||||
},
|
||||
function() {
|
||||
coll.find({$or: [{a: 0}, {b: 0}]}).count();
|
||||
});
|
||||
// Replacing root with {} and $count are both count-like as well.
|
||||
testCountLikeStage({$replaceRoot: {newRoot: {}}});
|
||||
testCountLikeStage({$count: "c"});
|
||||
@ -1,100 +0,0 @@
|
||||
"""
|
||||
#! /usr/bin/env python3
|
||||
Simulates a human authenticating to PingFederate on the Web, specifically with the
|
||||
device authorization grant flow.
|
||||
|
||||
Given a device authorization endpoint, a username, a user code and a file with necessary setup information, it
|
||||
will simulate automatically logging in as a human would.
|
||||
|
||||
"""
|
||||
import argparse
|
||||
import json
|
||||
|
||||
import geckodriver_autoinstaller
|
||||
from pathlib import Path
|
||||
from selenium import webdriver
|
||||
from selenium.webdriver.common.by import By
|
||||
from selenium.webdriver.firefox.options import Options
|
||||
from selenium.webdriver.support import expected_conditions as EC
|
||||
from selenium.webdriver.support.ui import WebDriverWait
|
||||
|
||||
def authenticate_ping(activation_endpoint, userCode, username, test_credentials):
|
||||
# Install GeckoDriver if needed.
|
||||
geckodriver_autoinstaller.install()
|
||||
|
||||
# Launch headless Firefox to the device authorization endpoint.
|
||||
firefox_options = Options()
|
||||
firefox_options.add_argument('-headless')
|
||||
driver = webdriver.Firefox(options=firefox_options)
|
||||
driver.get(activation_endpoint)
|
||||
|
||||
try:
|
||||
# Wait for the username, password and signon button to load.
|
||||
username_input_box = WebDriverWait(driver, 30).until(
|
||||
EC.presence_of_element_located((By.XPATH, "//input[@id='username']"))
|
||||
)
|
||||
password_input_box = WebDriverWait(driver, 30).until(
|
||||
EC.presence_of_element_located((By.XPATH, "//input[@id='password']"))
|
||||
)
|
||||
signon_button = WebDriverWait(driver, 30).until(
|
||||
EC.presence_of_element_located((By.XPATH, "//a[@id='signOnButton'][@title='Sign On']"))
|
||||
)
|
||||
|
||||
# Enter username.
|
||||
username_input_box.send_keys(username)
|
||||
# Enter password.
|
||||
password_input_box.send_keys(test_credentials[username])
|
||||
signon_button.click()
|
||||
|
||||
# Wait for the user code prompt and submit button to load.
|
||||
# User code will be added to the input box.
|
||||
user_code_input_box = WebDriverWait(driver, 30).until(
|
||||
EC.presence_of_element_located((By.XPATH, "//input[@id='user-code']"))
|
||||
)
|
||||
submit_button = WebDriverWait(driver, 30).until(
|
||||
EC.presence_of_element_located((By.XPATH, "//a[@title='Submit']"))
|
||||
)
|
||||
|
||||
# Enter usercode.
|
||||
user_code_input_box.send_keys(userCode)
|
||||
submit_button.click()
|
||||
|
||||
# Assert 'Allow' message.
|
||||
allow_button = WebDriverWait(driver, 30).until(
|
||||
EC.presence_of_element_located((By.XPATH, "//a[@title='Allow']"))
|
||||
)
|
||||
allow_button.click()
|
||||
|
||||
# Assert that the landing page contains the "The device is now authorized." text, indicating successful auth.
|
||||
landing_header = WebDriverWait(driver, 30).until(
|
||||
EC.presence_of_element_located((By.XPATH, "//div[@class='ping-messages']/div"))
|
||||
)
|
||||
|
||||
assert landing_header is not None and "The device is now authorized." in landing_header.text
|
||||
|
||||
except Exception as e:
|
||||
print("Error: ", e)
|
||||
print("Traceback: ", traceback.format_exc())
|
||||
print("HTML Source: ", driver.page_source)
|
||||
else:
|
||||
print('Success')
|
||||
finally:
|
||||
driver.quit()
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description='PingFederate Automated Authentication Simulator')
|
||||
|
||||
parser.add_argument('-e', '--activationEndpoint', type=str, help="Endpoint to start activation at")
|
||||
parser.add_argument('-c', '--userCode', type=str, help="Code to be added in the endpoint to authenticate")
|
||||
parser.add_argument('-u', '--username', type=str, help="Username to authenticate as")
|
||||
parser.add_argument('-s', '--setupFile', type=str, help="File containing information generated during test setup, relative to home directory")
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
with open(Path.home() / args.setupFile) as setup_file:
|
||||
setup_information = json.load(setup_file)
|
||||
assert args.username in setup_information
|
||||
authenticate_ping(args.activationEndpoint, args.userCode, args.username, setup_information)
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
@ -6704,24 +6704,24 @@ export const authCommandsLib = {
|
||||
]
|
||||
},
|
||||
{
|
||||
// Test that only clusterManager has permission to run $queryStats without transformation
|
||||
// Test that clusterMonitor has permission to run $queryStats without transformation
|
||||
testname: "testQueryStatsReadPrivilege",
|
||||
command: {aggregate: 1, pipeline: [{$queryStats: {}}], cursor: {}},
|
||||
skipSharded: false,
|
||||
skipTest: (conn) => {
|
||||
return !TestData.setParameters.featureFlagQueryStats && !TestData.setParameters.featureFlagQueryStatsFindCommand;
|
||||
},
|
||||
testcases: [{runOnDb: adminDbName, roles: roles_clusterManager}]
|
||||
testcases: [{runOnDb: adminDbName, roles: roles_monitoring}]
|
||||
},
|
||||
{
|
||||
// Test that only clusterManager has permission to run $queryStats with transformation
|
||||
// Test that clusterMonitor has permission to run $queryStats with transformation
|
||||
testname: "testQueryStatsReadTransformedPrivilege",
|
||||
command: {aggregate: 1, pipeline: [{$queryStats: {transformIdentifiers: {algorithm: "hmac-sha-256", hmacKey: BinData(8, "MjM0NTY3ODkxMDExMTIxMzE0MTUxNjE3MTgxOTIwMjE=")}}}], cursor: {}},
|
||||
skipSharded: false,
|
||||
skipTest: (conn) => {
|
||||
return !TestData.setParameters.featureFlagQueryStats && !TestData.setParameters.featureFlagQueryStatsFindCommand;
|
||||
},
|
||||
testcases: [{runOnDb: adminDbName, roles: roles_clusterManager}]
|
||||
testcases: [{runOnDb: adminDbName, roles: roles_monitoring}]
|
||||
},
|
||||
{
|
||||
testname: "top",
|
||||
|
||||
@ -43,7 +43,7 @@ function runAgg(db) {
|
||||
assert.commandWorked(coll.insertMany([engDoc, salesDoc]));
|
||||
|
||||
// This will match the documents where the intersection between the allowedRoles field and the
|
||||
// user"s roles is not empty, i.e. the user"s role allows them to see the document in the
|
||||
// user's roles is not empty, i.e. the user's role allows them to see the document in the
|
||||
// results. In this case, only the engDoc has the the "read" role that was assigned to the user,
|
||||
// so only the engDoc will appear in the results.
|
||||
let pipeline = [{
|
||||
@ -52,6 +52,31 @@ function runAgg(db) {
|
||||
}];
|
||||
let res = coll.aggregate(pipeline).toArray();
|
||||
assert.eq([engDoc], res);
|
||||
|
||||
// Insert a document that has the currently authenticated user's roles in the allowedRoles
|
||||
// field, and thus will match the following subpipeline.
|
||||
let readDoc = {_id: 2, allowedRoles: ["readWriteAnyDatabase", "read"]};
|
||||
assert.commandWorked(coll.insert(readDoc));
|
||||
const subpipeline = [{$match: {$expr: {$eq: ["$allowedRoles", "$$USER_ROLES.role"]}}}];
|
||||
|
||||
// Ensure that $$USER_ROLES can be present in a $lookup subpipeline.
|
||||
let findColl = db.getCollection(findCollName);
|
||||
const lookupPipeline = [
|
||||
{$lookup: {from: aggCollName, pipeline: subpipeline, as: "docThatMatchesRoles"}},
|
||||
{$project: {_id: 0, docThatMatchesRoles: 1}}
|
||||
];
|
||||
const lookupRes = findColl.aggregate(lookupPipeline).toArray();
|
||||
assert.eq(
|
||||
[{"docThatMatchesRoles": [{"_id": 2, "allowedRoles": ["readWriteAnyDatabase", "read"]}]}],
|
||||
lookupRes);
|
||||
|
||||
// Ensure that $$USER_ROLES can be present in a $unionWith subpipeline. The result set should
|
||||
// include the one document from findColl and the document from the unioned collection inserted
|
||||
// above where the allowedRoles field has the currently authenticated user's roles.
|
||||
const unionWithPipeline =
|
||||
[{$unionWith: {coll: aggCollName, pipeline: subpipeline}}, {$project: {_id: 0}}];
|
||||
const unionWithRes = findColl.aggregate(unionWithPipeline).toArray();
|
||||
assert.eq([{a: 1}, {allowedRoles: ["readWriteAnyDatabase", "read"]}], unionWithRes);
|
||||
}
|
||||
|
||||
function runTest(conn, shardingTest = null) {
|
||||
|
||||
@ -63,13 +63,16 @@ export var assertWithLevel = function(level) {
|
||||
}
|
||||
|
||||
function wrapAssertFn(fn, args) {
|
||||
let res;
|
||||
var doassertSaved = doassert;
|
||||
try {
|
||||
doassert = quietlyDoAssert;
|
||||
fn.apply(assert, args); // functions typically get called on 'assert'
|
||||
res = fn.apply(assert, args); // functions typically get called on 'assert'
|
||||
} finally {
|
||||
doassert = doassertSaved;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
var assertWithLevel = function() {
|
||||
@ -105,7 +108,7 @@ export var assertWithLevel = function(level) {
|
||||
return;
|
||||
}
|
||||
|
||||
wrapAssertFn(assert[fn], arguments);
|
||||
return wrapAssertFn(assert[fn], arguments);
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
@ -201,10 +201,10 @@ workerThread.fsm = async function(workloads, args, options) {
|
||||
const {workerThread} = await import("jstests/concurrency/fsm_libs/worker_thread.js");
|
||||
const {fsm} = await import("jstests/concurrency/fsm_libs/fsm.js");
|
||||
|
||||
return workerThread.main(workloads, args, function(configs) {
|
||||
return workerThread.main(workloads, args, async function(configs) {
|
||||
var workloads = Object.keys(configs);
|
||||
assert.eq(1, workloads.length);
|
||||
fsm.run(configs[workloads[0]]);
|
||||
await fsm.run(configs[workloads[0]]);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@ -226,7 +226,7 @@ export const workerThread = (function() {
|
||||
args.latch.await(); // wait for all threads to start
|
||||
|
||||
Random.setRandomSeed(args.seed);
|
||||
run(configs);
|
||||
await run(configs);
|
||||
return {ok: 1};
|
||||
} catch (e) {
|
||||
args.errorLatch.countDown();
|
||||
|
||||
@ -17,7 +17,9 @@ export function abortTransaction(sessionAwareDB, txnNumber) {
|
||||
ErrorCodes.TransactionCommitted,
|
||||
ErrorCodes.TransactionTooOld,
|
||||
ErrorCodes.Interrupted,
|
||||
ErrorCodes.LockTimeout
|
||||
ErrorCodes.LockTimeout,
|
||||
// TransactionRouter will error when trying to abort txns that have not been started
|
||||
8027900
|
||||
];
|
||||
const abortCmd = {
|
||||
abortTransaction: 1,
|
||||
@ -33,44 +35,40 @@ export function abortTransaction(sessionAwareDB, txnNumber) {
|
||||
/**
|
||||
* This function operates on the last iteration of each thread to abort any active transactions.
|
||||
*/
|
||||
export var {cleanupOnLastIteration} = (function() {
|
||||
function cleanupOnLastIteration(data, func) {
|
||||
let lastIteration = ++data.iteration >= data.iterations;
|
||||
let activeException = null;
|
||||
export function cleanupOnLastIteration(data, func) {
|
||||
let lastIteration = ++data.iteration >= data.iterations;
|
||||
let activeException = null;
|
||||
|
||||
try {
|
||||
func();
|
||||
} catch (e) {
|
||||
lastIteration = true;
|
||||
activeException = e;
|
||||
try {
|
||||
func();
|
||||
} catch (e) {
|
||||
lastIteration = true;
|
||||
activeException = e;
|
||||
|
||||
throw e;
|
||||
} finally {
|
||||
if (lastIteration) {
|
||||
// Abort the latest transactions for this session as some may have been skipped due
|
||||
// to incrementing data.txnNumber. Go in increasing order, so as to avoid bumping
|
||||
// the txnNumber on the server past that of an in-progress transaction. See
|
||||
// SERVER-36847.
|
||||
for (let i = 0; i <= data.txnNumber; i++) {
|
||||
try {
|
||||
let res = abortTransaction(data.sessionDb, i);
|
||||
if (res.ok === 1) {
|
||||
break;
|
||||
}
|
||||
} catch (exceptionDuringAbort) {
|
||||
if (activeException !== null) {
|
||||
print('Exception occurred: in finally block while another exception ' +
|
||||
'is active: ' + tojson(activeException));
|
||||
print('Original exception stack trace: ' + activeException.stack);
|
||||
}
|
||||
|
||||
/* eslint-disable-next-line */
|
||||
throw exceptionDuringAbort;
|
||||
throw e;
|
||||
} finally {
|
||||
if (lastIteration) {
|
||||
// Abort the latest transactions for this session as some may have been skipped due
|
||||
// to incrementing data.txnNumber. Go in increasing order, so as to avoid bumping
|
||||
// the txnNumber on the server past that of an in-progress transaction. See
|
||||
// SERVER-36847.
|
||||
for (let i = 0; i <= data.txnNumber; i++) {
|
||||
try {
|
||||
let res = abortTransaction(data.sessionDb, i);
|
||||
if (res.ok === 1) {
|
||||
break;
|
||||
}
|
||||
} catch (exceptionDuringAbort) {
|
||||
if (activeException !== null) {
|
||||
print('Exception occurred: in finally block while another exception ' +
|
||||
'is active: ' + tojson(activeException));
|
||||
print('Original exception stack trace: ' + activeException.stack);
|
||||
}
|
||||
|
||||
/* eslint-disable-next-line */
|
||||
throw exceptionDuringAbort;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return {cleanupOnLastIteration};
|
||||
})();
|
||||
}
|
||||
|
||||
@ -78,7 +78,8 @@ export const $config = (function() {
|
||||
|
||||
return {
|
||||
threadCount: 10,
|
||||
iterations: 100,
|
||||
// TODO(SERVER-81235): Reset to `iterations: 100` after resolving build failure
|
||||
iterations: 0,
|
||||
states: states,
|
||||
startState: 'query',
|
||||
transitions: transitions,
|
||||
|
||||
@ -35,7 +35,8 @@ const kBaseConfig = {
|
||||
|
||||
export const $config = extendWorkload(kBaseConfig, function($config, $super) {
|
||||
$config.threadCount = 10;
|
||||
$config.iterations = 500;
|
||||
// TODO(SERVER-81234): Reset to `iterations: 500` after resolving build failure
|
||||
$config.iterations = 0;
|
||||
|
||||
// The sample rate range for query sampling.
|
||||
$config.data.minSamplesPerSecond = 1000;
|
||||
@ -920,6 +921,11 @@ export const $config = extendWorkload(kBaseConfig, function($config, $super) {
|
||||
};
|
||||
|
||||
$config.teardown = function teardown(db, collName, cluster) {
|
||||
// TODO(SERVER-81234): Remove early return after resolving build failure
|
||||
if ($config.iterations === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (cluster.isSharded) {
|
||||
cluster.executeOnMongosNodes((adminDb) => {
|
||||
configureFailPoint(adminDb, "queryAnalysisSamplerFilterByComment", {}, "off");
|
||||
@ -1292,6 +1298,7 @@ export const $config = extendWorkload(kBaseConfig, function($config, $super) {
|
||||
listSampledQueries: {
|
||||
analyzeShardKey: 0.2,
|
||||
enableQuerySampling: 0.1,
|
||||
find: 0.1,
|
||||
aggregate: 0.1,
|
||||
count: 0.1,
|
||||
distinct: 0.1,
|
||||
|
||||
@ -10,10 +10,14 @@
|
||||
import {assertAlways} from "jstests/concurrency/fsm_libs/assert.js";
|
||||
import {isEphemeral} from "jstests/concurrency/fsm_workload_helpers/server_types.js";
|
||||
|
||||
// WiredTiger eviction is slow on Windows debug variants and can cause timeouts when taking a
|
||||
// checkpoint through compaction.
|
||||
const buildInfo = getBuildInfo();
|
||||
const skipTest = buildInfo.debug && buildInfo.buildEnvironment.target_os == "windows";
|
||||
// TODO(SERVER-81114): re-enable the buildInfo checks below when the cache eviction issue is
|
||||
// resolved.
|
||||
const skipTest = true;
|
||||
|
||||
// WiredTiger eviction is slow on Windows debug variants and can cause timeouts when
|
||||
// taking a checkpoint through compaction.
|
||||
// const buildInfo = getBuildInfo();
|
||||
// const skipTest = buildInfo.debug && buildInfo.buildEnvironment.target_os == "windows";
|
||||
|
||||
export const $config = (function() {
|
||||
var states = (function() {
|
||||
|
||||
@ -0,0 +1,102 @@
|
||||
/**
|
||||
* create_capped_collection_visibility_snapshot.js
|
||||
*
|
||||
* Repeatedly creates a capped collection, while concurrent readers try to establish a capped
|
||||
* visibility snapshot.
|
||||
*
|
||||
* @tags: [
|
||||
* requires_capped,
|
||||
* # This test works on a capped collection, which do not support sharding.
|
||||
* assumes_unsharded_collection,
|
||||
* ]
|
||||
*/
|
||||
import {assertAlways} from "jstests/concurrency/fsm_libs/assert.js";
|
||||
|
||||
export const $config = (function() {
|
||||
const data = {
|
||||
// Use the workload name as a prefix for the collection name,
|
||||
// since the workload name is assumed to be unique.
|
||||
prefix: 'create_capped_collection_visibility_snapshot',
|
||||
collectionCount: 2,
|
||||
};
|
||||
|
||||
const states = (function() {
|
||||
const options = {
|
||||
capped: true,
|
||||
size: 8192 // multiple of 256; larger than 4096 default
|
||||
};
|
||||
|
||||
function randomCollectionName(prefix, collCount) {
|
||||
return prefix + Random.randInt(collCount);
|
||||
}
|
||||
|
||||
function create(db, collName) {
|
||||
const localDb = db.getSiblingDB("local");
|
||||
const myCollName = randomCollectionName(this.prefix, this.collectionCount);
|
||||
localDb.runCommand({drop: myCollName});
|
||||
localDb.createCollection(myCollName, options);
|
||||
localDb[myCollName].insert({x: 1});
|
||||
}
|
||||
|
||||
function findOne(db, collName) {
|
||||
const localDb = db.getSiblingDB("local");
|
||||
const myCollName = randomCollectionName(this.prefix, this.collectionCount);
|
||||
for (let i = 0; i < 10; ++i) {
|
||||
let res = localDb.runCommand({find: myCollName, filter: {}});
|
||||
assertAlways.commandWorked(res);
|
||||
}
|
||||
}
|
||||
|
||||
function getMore(db, collName) {
|
||||
const localDb = db.getSiblingDB("local");
|
||||
const myCollName = randomCollectionName(this.prefix, this.collectionCount);
|
||||
for (let i = 0; i < 10; ++i) {
|
||||
let res = localDb.runCommand(
|
||||
{find: myCollName, filter: {}, tailable: true, batchSize: 0});
|
||||
assertAlways.commandWorked(res);
|
||||
assertAlways.commandWorkedOrFailedWithCode(
|
||||
localDb.runCommand({getMore: res.cursor.id, collection: myCollName}),
|
||||
[ErrorCodes.QueryPlanKilled, ErrorCodes.CursorNotFound]);
|
||||
}
|
||||
}
|
||||
|
||||
return {create: create, findOne: findOne, getMore: getMore};
|
||||
})();
|
||||
|
||||
let internalQueryExecYieldIterationsDefault;
|
||||
|
||||
function setup(db, collName, cluster) {
|
||||
// We temporarily reduce the query yield iterations to force yield/restore on getMore.
|
||||
cluster.executeOnMongodNodes((db) => {
|
||||
const res = db.adminCommand({setParameter: 1, internalQueryExecYieldIterations: 1});
|
||||
assert.commandWorked(res);
|
||||
internalQueryExecYieldIterationsDefault = res.was;
|
||||
});
|
||||
}
|
||||
|
||||
function teardown(db, collName, cluster) {
|
||||
cluster.executeOnMongodNodes((db) => {
|
||||
const res = db.adminCommand({
|
||||
setParameter: 1,
|
||||
internalQueryExecYieldIterations: internalQueryExecYieldIterationsDefault
|
||||
});
|
||||
assert.commandWorked(res);
|
||||
});
|
||||
}
|
||||
|
||||
const transition = {create: 1, findOne: 4, getMore: 4};
|
||||
|
||||
const transitions = {create: transition, findOne: transition, getMore: transition};
|
||||
|
||||
return {
|
||||
threadCount: 20,
|
||||
// TODO(SERVER-81258): Return to `iterations: 100` after build failure is resolved
|
||||
iterations: 0,
|
||||
data: data,
|
||||
startState: 'create',
|
||||
states: states,
|
||||
transitions: transitions,
|
||||
setup: setup,
|
||||
teardown: teardown,
|
||||
};
|
||||
})();
|
||||
@ -198,11 +198,12 @@ export const $config = (function() {
|
||||
const exceptionCode = e.code;
|
||||
if (exceptionCode == ErrorCodes.ConflictingOperationInProgress ||
|
||||
exceptionCode == ErrorCodes.ReshardCollectionInProgress ||
|
||||
exceptionCode == ErrorCodes.NamespaceNotSharded) {
|
||||
exceptionCode == ErrorCodes.NamespaceNotSharded ||
|
||||
exceptionCode == ErrorCodes.NamespaceNotFound) {
|
||||
// It is fine for a resharding operation to throw ConflictingOperationInProgress
|
||||
// if a concurrent resharding with the same collection is ongoing.
|
||||
// It is also fine for a resharding operation to throw NamespaceNotSharded,
|
||||
// because a drop state could've happend recently.
|
||||
// It is also fine for a resharding operation to throw NamespaceNotSharded or
|
||||
// NamespaceNotFound because a drop state could've happend recently.
|
||||
return;
|
||||
}
|
||||
throw e;
|
||||
@ -312,7 +313,8 @@ export const $config = (function() {
|
||||
|
||||
return {
|
||||
threadCount: 12,
|
||||
iterations: 64,
|
||||
// TODO(SERVER-81237): Reset to `iterations: 64` after resolving build failure
|
||||
iterations: 0,
|
||||
startState: 'init',
|
||||
states: states,
|
||||
transitions: uniformDistTransitions(states),
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
* # Time-series findAndModify does not support retryable writes.
|
||||
* requires_non_retryable_writes,
|
||||
* does_not_support_transactions,
|
||||
* requires_fcv_71,
|
||||
* featureFlagTimeseriesUpdatesSupport,
|
||||
* ]
|
||||
*/
|
||||
import {assertAlways} from "jstests/concurrency/fsm_libs/assert.js";
|
||||
@ -49,5 +49,8 @@ export const $config = extendWorkload($baseConfig, function($config, $super) {
|
||||
moveChunk: {insert: 1, doFindAndRemove: 1, moveChunk: 0},
|
||||
};
|
||||
|
||||
// TODO(SERVER-81239): Remove next line after resolving build failure
|
||||
$config.iterations = 0;
|
||||
|
||||
return $config;
|
||||
});
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
* requires_timeseries,
|
||||
* # Time-series findAndModify does not support retryable writes.
|
||||
* requires_non_retryable_writes,
|
||||
* requires_fcv_71,
|
||||
* featureFlagTimeseriesUpdatesSupport,
|
||||
* ]
|
||||
*/
|
||||
|
||||
@ -50,5 +50,8 @@ export const $config = extendWorkload($baseConfig, function($config, $super) {
|
||||
insert: {findAndRemove: 0.4, deleteBucket: 0.2, insert: 0.4}
|
||||
};
|
||||
|
||||
// TODO(SERVER-81240): Remove next line after resolving build failure
|
||||
$config.iterations = 0;
|
||||
|
||||
return $config;
|
||||
});
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
* requires_fcv_71,
|
||||
* requires_sharding,
|
||||
* uses_transactions,
|
||||
* assumes_balancer_off,
|
||||
* ]
|
||||
*/
|
||||
import "jstests/libs/parallelTester.js";
|
||||
@ -18,6 +19,8 @@ import {
|
||||
|
||||
export const $config = extendWorkload($baseConfig, function($config, $super) {
|
||||
$config.startState = "init";
|
||||
$config.iterations = 25;
|
||||
$config.threadCount = 5;
|
||||
|
||||
// Use a CountDownLatch as if it were a std::atomic<long long> shared between all of the
|
||||
// threads. The collection name is suffixed with the current this.latch.getCount() value
|
||||
@ -106,38 +109,36 @@ export const $config = extendWorkload($baseConfig, function($config, $super) {
|
||||
};
|
||||
|
||||
$config.transitions = {
|
||||
init:
|
||||
{refineCollectionShardKey: 0.25, updateOne: 0.25, deleteOne: 0.25, findAndModify: 0.25},
|
||||
init: {updateOne: 0.33, deleteOne: 0.33, findAndModify: 0.34},
|
||||
updateOne: {
|
||||
refineCollectionShardKey: 0.2,
|
||||
updateOne: 0.2,
|
||||
deleteOne: 0.2,
|
||||
findAndModify: 0.2,
|
||||
flushRouterConfig: 0.2
|
||||
refineCollectionShardKey: 0.05,
|
||||
updateOne: 0.3,
|
||||
deleteOne: 0.3,
|
||||
findAndModify: 0.3,
|
||||
flushRouterConfig: 0.05
|
||||
},
|
||||
deleteOne: {
|
||||
refineCollectionShardKey: 0.2,
|
||||
updateOne: 0.2,
|
||||
deleteOne: 0.2,
|
||||
findAndModify: 0.2,
|
||||
flushRouterConfig: 0.2
|
||||
refineCollectionShardKey: 0.05,
|
||||
updateOne: 0.3,
|
||||
deleteOne: 0.3,
|
||||
findAndModify: 0.3,
|
||||
flushRouterConfig: 0.05
|
||||
},
|
||||
findAndModify: {
|
||||
refineCollectionShardKey: 0.2,
|
||||
updateOne: 0.2,
|
||||
deleteOne: 0.2,
|
||||
findAndModify: 0.2,
|
||||
flushRouterConfig: 0.2
|
||||
refineCollectionShardKey: 0.05,
|
||||
updateOne: 0.3,
|
||||
deleteOne: 0.3,
|
||||
findAndModify: 0.3,
|
||||
flushRouterConfig: 0.05
|
||||
},
|
||||
refineCollectionShardKey: {
|
||||
refineCollectionShardKey: 0.2,
|
||||
updateOne: 0.2,
|
||||
deleteOne: 0.2,
|
||||
findAndModify: 0.2,
|
||||
flushRouterConfig: 0.2
|
||||
refineCollectionShardKey: 0.05,
|
||||
updateOne: 0.3,
|
||||
deleteOne: 0.3,
|
||||
findAndModify: 0.3,
|
||||
flushRouterConfig: 0.05
|
||||
},
|
||||
flushRouterConfig:
|
||||
{refineCollectionShardKey: 0.25, updateOne: 0.25, deleteOne: 0.25, findAndModify: 0.25},
|
||||
flushRouterConfig: {updateOne: 0.33, deleteOne: 0.33, findAndModify: 0.34},
|
||||
};
|
||||
|
||||
return $config;
|
||||
|
||||
23
jstests/concurrency/worker_thread_test.js
Normal file
23
jstests/concurrency/worker_thread_test.js
Normal file
@ -0,0 +1,23 @@
|
||||
import {workerThread} from "jstests/concurrency/fsm_libs/worker_thread.js";
|
||||
|
||||
async function shouldForwardErrorsFromAsyncRunCallback(conn) {
|
||||
const args = {
|
||||
host: conn.host,
|
||||
dbName: 'test',
|
||||
tid: 'thread0',
|
||||
clusterOptions: {sharded: false, replication: false},
|
||||
latch: new CountDownLatch(1),
|
||||
errorLatch: new CountDownLatch(1)
|
||||
};
|
||||
|
||||
const res = await workerThread.main([], args, async function() {
|
||||
throw new Error('Thrown intentionally');
|
||||
});
|
||||
assert.eq(res.err,
|
||||
'Error: Thrown intentionally',
|
||||
'should forward errors thrown in async run callback');
|
||||
}
|
||||
|
||||
const conn = MongoRunner.runMongod();
|
||||
await shouldForwardErrorsFromAsyncRunCallback(conn);
|
||||
MongoRunner.stopMongod(conn);
|
||||
@ -4,6 +4,7 @@
|
||||
* @tags: [
|
||||
* # Queries on mongoS may not request or provide a resume token.
|
||||
* assumes_against_mongod_not_mongos,
|
||||
* cannot_run_during_upgrade_downgrade,
|
||||
* ]
|
||||
*/
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@ function waitUntilOpCountIs(opFilter, num) {
|
||||
assert.soon(() => {
|
||||
let ops = db.getSiblingDB('admin')
|
||||
.aggregate([
|
||||
{$currentOp: {}},
|
||||
{$currentOp: {allUsers: true, idleConnections: true}},
|
||||
{$match: opFilter},
|
||||
])
|
||||
.toArray();
|
||||
|
||||
45
jstests/core/query/sort_project_plans.js
Normal file
45
jstests/core/query/sort_project_plans.js
Normal file
@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Test that query plans involving sort and project are correct.
|
||||
*/
|
||||
(function() {
|
||||
const coll = db.sort_project_queries;
|
||||
coll.drop();
|
||||
|
||||
assert.commandWorked(coll.insert({_id: 0, a: 1, b: 2, foo: 1001, bar: 2001}));
|
||||
assert.commandWorked(coll.insert({_id: 1, a: 1, b: 22, foo: 1002, bar: 2002}));
|
||||
|
||||
function runOneDocTest(pipeline, expectedResult) {
|
||||
let res = coll.aggregate(pipeline).toArray();
|
||||
assert.eq(res.length, 1);
|
||||
assert.docEq(res[0], expectedResult);
|
||||
}
|
||||
|
||||
// Inclusion projection preserving relevant fields after sort.
|
||||
{
|
||||
let pipe = [
|
||||
{$sort: {b: 1}},
|
||||
{$project: {a: 1, foo: 1}},
|
||||
{$group: {_id: '$a', maxFoo: {$max: "$foo"}}}
|
||||
];
|
||||
runOneDocTest(pipe, {_id: 1, maxFoo: 1002});
|
||||
}
|
||||
|
||||
// Inclusion projection removing a relevant field after sort.
|
||||
{
|
||||
let pipe = [{$sort: {b: 1}}, {$project: {a: 1}}, {$group: {_id: '$a', maxFoo: {$max: "$foo"}}}];
|
||||
runOneDocTest(pipe, {_id: 1, maxFoo: null});
|
||||
}
|
||||
|
||||
// Exclusion projection removing irrelevant field after sort.
|
||||
{
|
||||
let pipe = [{$sort: {b: 1}}, {$project: {z: 0}}, {$group: {_id: '$a', maxFoo: {$max: "$foo"}}}];
|
||||
runOneDocTest(pipe, {_id: 1, maxFoo: 1002});
|
||||
}
|
||||
|
||||
// Exclusion projection removing a subsequently referenced field after sort.
|
||||
{
|
||||
let pipe =
|
||||
[{$sort: {b: 1}}, {$project: {foo: 0}}, {$group: {_id: '$a', maxFoo: {$max: "$foo"}}}];
|
||||
runOneDocTest(pipe, {_id: 1, maxFoo: null});
|
||||
}
|
||||
})();
|
||||
@ -9,6 +9,7 @@
|
||||
* requires_getmore,
|
||||
* requires_persistence,
|
||||
* no_selinux,
|
||||
* cannot_run_during_upgrade_downgrade,
|
||||
* ]
|
||||
*/
|
||||
|
||||
|
||||
@ -12,6 +12,7 @@
|
||||
* multiversion_incompatible,
|
||||
* requires_non_retryable_writes,
|
||||
* tenant_migration_incompatible,
|
||||
* cannot_run_during_upgrade_downgrade,
|
||||
* ]
|
||||
*/
|
||||
|
||||
|
||||
@ -2,9 +2,10 @@
|
||||
* Tests correctness of time-series bucket granularity configuration.
|
||||
*
|
||||
* @tags: [
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
|
||||
* # writes splitting between two primaries, and thus different buckets.
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
|
||||
* # migrations may result in writes splitting between two primaries, and thus different buckets.
|
||||
* does_not_support_stepdowns,
|
||||
* tenant_migration_incompatible,
|
||||
* # We need a timeseries collection.
|
||||
* requires_timeseries,
|
||||
* # This test calls "find" with a filter on "_id" whose value is a namespace string. We cannot
|
||||
|
||||
@ -2,9 +2,10 @@
|
||||
* Tests correctness of time-series bucket granularity configuration.
|
||||
*
|
||||
* @tags: [
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
|
||||
* # writes splitting between two primaries, and thus different buckets.
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
|
||||
* # migrations may result in writes splitting between two primaries, and thus different buckets.
|
||||
* does_not_support_stepdowns,
|
||||
* tenant_migration_incompatible,
|
||||
* # We need a timeseries collection.
|
||||
* requires_timeseries,
|
||||
* ]
|
||||
@ -124,4 +125,4 @@
|
||||
buckets = bucketsColl.find().toArray();
|
||||
assert.eq(2, buckets.length);
|
||||
assert.eq(buckets[1].control.min.t, ISODate("2021-06-24T00:00:00.000Z"));
|
||||
})();
|
||||
})();
|
||||
|
||||
@ -3,9 +3,11 @@
|
||||
* unpacking all buckets, while ensuring no incorrect results are created
|
||||
|
||||
* @tags: [
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
|
||||
* # writes splitting between two primaries, and thus different buckets.
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
|
||||
* # migrations may result in writes splitting between two primaries, and thus different
|
||||
* # buckets.
|
||||
* does_not_support_stepdowns,
|
||||
* tenant_migration_incompatible,
|
||||
* # We need a timeseries collection.
|
||||
* requires_timeseries,
|
||||
* # Explain of a resolved view must be executed by mongos.
|
||||
|
||||
@ -8,8 +8,9 @@
|
||||
* # This complicates aggregation extraction.
|
||||
* do_not_wrap_aggregations_in_facets,
|
||||
* # Refusing to run a test that issues an aggregation command with explain because it may
|
||||
* # return incomplete results if interrupted by a stepdown.
|
||||
* # return incomplete results if interrupted by a stepdown/tenant migration.
|
||||
* does_not_support_stepdowns,
|
||||
* tenant_migration_incompatible,
|
||||
* # We need a timeseries collection.
|
||||
* requires_timeseries,
|
||||
* ]
|
||||
|
||||
@ -93,6 +93,36 @@ const insensitive = {
|
||||
assert.eq(1, res2.itcount(), res2.toArray()); // should match only "5"
|
||||
}());
|
||||
|
||||
(function testFind_OnlyQueryHasCollation() {
|
||||
coll.drop();
|
||||
|
||||
assert.commandWorked(
|
||||
db.createCollection(coll.getName(), {timeseries: {timeField: 'time', metaField: 'meta'}}));
|
||||
|
||||
// This should generate a bucket with control.min.value = 'C' and control.max.value = 'c'.
|
||||
assert.commandWorked(coll.insert({time: ISODate(), meta: 42, value: "C"}));
|
||||
assert.commandWorked(coll.insert({time: ISODate(), meta: 42, value: "b"}));
|
||||
assert.commandWorked(coll.insert({time: ISODate(), meta: 42, value: "c"}));
|
||||
|
||||
// A query with default collation would use the bucket's min/max and find the two matches.
|
||||
const resWithNoCollation = coll.find({value: {$lt: "c"}});
|
||||
assert.eq(2,
|
||||
resWithNoCollation.itcount(),
|
||||
resWithNoCollation.toArray()); // should match "C" and "b".
|
||||
|
||||
// If a query with 'insensitive' collation used the bucket's min/max it would miss the bucket.
|
||||
// Check, that it doesn't.
|
||||
const resWithCollation_find = coll.find({value: {$lt: "c"}}).collation(insensitive);
|
||||
assert.eq(1,
|
||||
resWithCollation_find.itcount(),
|
||||
resWithCollation_find.toArray()); // should match only "b".
|
||||
|
||||
// Run the same test with aggregate command.
|
||||
const resWithCollation_agg =
|
||||
coll.aggregate([{$match: {value: {$lt: "c"}}}], {collation: insensitive}).toArray();
|
||||
assert.eq(1, resWithCollation_agg.length, resWithCollation_agg);
|
||||
}());
|
||||
|
||||
(function testAgg_GroupByMetaField() {
|
||||
coll.drop();
|
||||
|
||||
|
||||
@ -2,9 +2,10 @@
|
||||
* Tests basic index creation and operations on a time-series bucket collection.
|
||||
*
|
||||
* @tags: [
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
|
||||
* # writes splitting between two primaries, and thus different buckets.
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
|
||||
* # migrations may result in writes splitting between two primaries, and thus different buckets.
|
||||
* does_not_support_stepdowns,
|
||||
* tenant_migration_incompatible,
|
||||
* # We need a timeseries collection.
|
||||
* requires_timeseries,
|
||||
* ]
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Tests maximum number of measurements held in each bucket in a time-series buckets collection.
|
||||
* @tags: [
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
|
||||
* # writes splitting between two primaries, and thus different buckets.
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
|
||||
* # migrations may result in writes splitting between two primaries, and thus different buckets.
|
||||
* does_not_support_stepdowns,
|
||||
* tenant_migration_incompatible,
|
||||
* requires_collstats,
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
/**
|
||||
* Tests maximum time-range of measurements held in each bucket in a time-series buckets collection.
|
||||
* @tags: [
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
|
||||
* # writes splitting between two primaries, and thus different buckets.
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns/tenant migration
|
||||
* # may result in writes splitting between two primaries, and thus different buckets.
|
||||
* does_not_support_stepdowns,
|
||||
* tenant_migration_incompatible,
|
||||
* # We need a timeseries collection.
|
||||
* requires_timeseries,
|
||||
* # We assume that all nodes in a mixed-mode replica set are using compressed inserts to a
|
||||
|
||||
@ -3,9 +3,10 @@
|
||||
* collection.
|
||||
*
|
||||
* @tags: [
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
|
||||
* # writes splitting between two primaries, and thus different buckets.
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
|
||||
* # migrations may result in writes splitting between two primaries, and thus different buckets.
|
||||
* does_not_support_stepdowns,
|
||||
* tenant_migration_incompatible,
|
||||
* # We need a timeseries collection.
|
||||
* requires_timeseries,
|
||||
* ]
|
||||
@ -65,4 +66,4 @@ TimeseriesTest.run((insert) => {
|
||||
buckets = bucketsColl.find().toArray();
|
||||
assert.eq(buckets.length, 1, 'Expected one bucket but found ' + tojson(buckets));
|
||||
assert.neq(buckets[0]._id, bucketId);
|
||||
});
|
||||
});
|
||||
|
||||
@ -3,9 +3,10 @@
|
||||
* interesting boundaries.
|
||||
*
|
||||
* @tags: [
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
|
||||
* # writes splitting between two primaries, and thus different buckets.
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
|
||||
* # migrations may result in writes splitting between two primaries, and thus different buckets.
|
||||
* does_not_support_stepdowns,
|
||||
* tenant_migration_incompatible,
|
||||
* # Bucketing behavior with timestamp offsets greater than 32 bits was fixed in 6.1
|
||||
* requires_fcv_61,
|
||||
* # We need a timeseries collection.
|
||||
@ -81,4 +82,4 @@
|
||||
assert.commandWorked(coll.insert({m: 2, t: ISODate("2105-06-24T06:28:16Z")}));
|
||||
assert.commandWorked(coll.insert({m: 2, t: ISODate("1969-05-18T00:00:00.000Z")}));
|
||||
assert.eq(2, bucketsColl.find().itcount());
|
||||
})();
|
||||
})();
|
||||
|
||||
@ -2,9 +2,10 @@
|
||||
* Tests that time-series collections respect collations for metadata and min/max.
|
||||
*
|
||||
* @tags: [
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
|
||||
* # writes splitting between two primaries, and thus different buckets.
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
|
||||
* # migrations may result in writes splitting between two primaries, and thus different buckets.
|
||||
* does_not_support_stepdowns,
|
||||
* tenant_migration_incompatible,
|
||||
* # We need a timeseries collection.
|
||||
* requires_timeseries,
|
||||
* ]
|
||||
@ -89,4 +90,4 @@ TimeseriesTest.run((insert) => {
|
||||
assert.eq(buckets[2].control.min.y, null);
|
||||
assert.eq(buckets[2].control.max.x, null);
|
||||
assert.eq(buckets[2].control.max.y, null);
|
||||
});
|
||||
});
|
||||
|
||||
@ -136,32 +136,23 @@ function runTest({
|
||||
});
|
||||
})();
|
||||
|
||||
// Since the query collation does not match the collection collation, there should be no predicates
|
||||
// on control fields. The predicates on meta field are okay because buckets are grouped based on
|
||||
// real values, ignoring their collation.
|
||||
(function testQueryLevelCollation() {
|
||||
// Residual filter.
|
||||
runTest({
|
||||
deleteFilter: {str: "Hello"},
|
||||
queryCollation: caseSensitive,
|
||||
nDeleted: 0,
|
||||
expectedBucketQuery: {
|
||||
$and: [
|
||||
closedBucketFilter,
|
||||
{"control.max.str": {$_internalExprGte: "Hello"}},
|
||||
{"control.min.str": {$_internalExprLte: "Hello"}}
|
||||
]
|
||||
},
|
||||
expectedBucketQuery: closedBucketFilter,
|
||||
expectedDeleteStage: "TS_MODIFY"
|
||||
});
|
||||
runTest({
|
||||
deleteFilter: {str: "Hello"},
|
||||
queryCollation: caseInsensitive,
|
||||
nDeleted: 6,
|
||||
expectedBucketQuery: {
|
||||
$and: [
|
||||
closedBucketFilter,
|
||||
{"control.max.str": {$_internalExprGte: "Hello"}},
|
||||
{"control.min.str": {$_internalExprLte: "Hello"}}
|
||||
]
|
||||
},
|
||||
expectedBucketQuery: closedBucketFilter,
|
||||
expectedDeleteStage: "TS_MODIFY"
|
||||
});
|
||||
|
||||
|
||||
@ -7,9 +7,10 @@
|
||||
* assumes_read_preference_unchanged,
|
||||
* # Fail points in this test do not exist on mongos.
|
||||
* assumes_against_mongod_not_mongos,
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
|
||||
* # writes splitting between two primaries, and thus different buckets.
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
|
||||
* # migrations may result in writes splitting between two primaries, and thus different buckets.
|
||||
* does_not_support_stepdowns,
|
||||
* tenant_migration_incompatible,
|
||||
* # We need a timeseries collection.
|
||||
* requires_timeseries,
|
||||
* # Uses parallel shell to wait on fail point
|
||||
|
||||
@ -3,9 +3,10 @@
|
||||
* bucket document by targeting them with their meta field value.
|
||||
*
|
||||
* @tags: [
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
|
||||
* # writes splitting between two primaries, and thus different buckets.
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
|
||||
* # migrations may result in writes splitting between two primaries, and thus different buckets.
|
||||
* does_not_support_stepdowns,
|
||||
* tenant_migration_incompatible,
|
||||
* # We need a timeseries collection.
|
||||
* requires_timeseries,
|
||||
* ]
|
||||
|
||||
@ -10,9 +10,10 @@
|
||||
* assumes_read_concern_unchanged,
|
||||
* # This test only synchronizes deletes on the primary.
|
||||
* assumes_read_preference_unchanged,
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
|
||||
* # writes splitting between two primaries, and thus different buckets.
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
|
||||
* # migrations may result in writes splitting between two primaries, and thus different buckets.
|
||||
* does_not_support_stepdowns,
|
||||
* tenant_migration_incompatible,
|
||||
* # We need a timeseries collection.
|
||||
* requires_timeseries,
|
||||
* # Uses parallel shell to wait on fail point
|
||||
|
||||
@ -8,6 +8,8 @@
|
||||
* requires_fcv_71,
|
||||
* # To avoid burn-in tests in in-memory build variants
|
||||
* requires_persistence,
|
||||
* # TODO SERVER-66393 Remove this tag.
|
||||
* featureFlagTimeseriesUpdatesSupport,
|
||||
* # TODO SERVER-78683: Remove this tag.
|
||||
* # Internal transaction api might not handle stepdowns correctly and time-series retryable
|
||||
* # updates use internal transaction api.
|
||||
|
||||
@ -4,9 +4,10 @@
|
||||
* @tags: [
|
||||
* # Explain of a resolved view must be executed by mongos.
|
||||
* directly_against_shardsvrs_incompatible,
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
|
||||
* # writes splitting between two primaries, and thus different buckets.
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
|
||||
* # migrations may result in writes splitting between two primaries, and thus different buckets.
|
||||
* does_not_support_stepdowns,
|
||||
* tenant_migration_incompatible,
|
||||
* # Requires pipeline optimization to run in order to produce expected explain output
|
||||
* requires_pipeline_optimization,
|
||||
* # We need a timeseries collection.
|
||||
@ -134,4 +135,4 @@ runTest(
|
||||
// We test arrays wrapping objects and objects wrapping arrays as different ways of achieving
|
||||
// multiple bounds on 'a.b'.
|
||||
runTest([{a: {b: [3, 4]}}, {a: [{b: 1}, {b: 2}]}], {"a.b": {$lt: 2}}, [{a: [{b: 1}, {b: 2}]}]);
|
||||
runTest([{a: {b: [3, 4]}}, {a: [{b: 1}, {b: 2}]}], {"a.b": {$gte: 3}}, [{a: {b: [3, 4]}}]);
|
||||
runTest([{a: {b: [3, 4]}}, {a: [{b: 1}, {b: 2}]}], {"a.b": {$gte: 3}}, [{a: {b: [3, 4]}}]);
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @tags: [
|
||||
* # We need a timeseries collection.
|
||||
* requires_timeseries,
|
||||
* requires_fcv_71,
|
||||
* featureFlagTimeseriesUpdatesSupport,
|
||||
* # TODO SERVER-76583 Remove the following two tags.
|
||||
* does_not_support_retryable_writes,
|
||||
* requires_non_retryable_writes,
|
||||
|
||||
@ -8,9 +8,10 @@
|
||||
* assumes_unsharded_collection,
|
||||
* # Explain of a resolved view must be executed by mongos.
|
||||
* directly_against_shardsvrs_incompatible,
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
|
||||
* # writes splitting between two primaries, and thus different buckets.
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
|
||||
* # migrations may result in writes splitting between two primaries, and thus different buckets.
|
||||
* does_not_support_stepdowns,
|
||||
* tenant_migration_incompatible,
|
||||
* # We need a timeseries collection.
|
||||
* requires_timeseries,
|
||||
* ]
|
||||
|
||||
@ -2,9 +2,10 @@
|
||||
* Tests index creation, index drops, list indexes, hide/unhide index on a time-series collection.
|
||||
*
|
||||
* @tags: [
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
|
||||
* # writes splitting between two primaries, and thus different buckets.
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
|
||||
* # migrations may result in writes splitting between two primaries, and thus different buckets.
|
||||
* does_not_support_stepdowns,
|
||||
* tenant_migration_incompatible,
|
||||
* # We need a timeseries collection.
|
||||
* requires_timeseries,
|
||||
* ]
|
||||
|
||||
@ -2,9 +2,10 @@
|
||||
* Tests collation with time-series collections.
|
||||
*
|
||||
* @tags: [
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
|
||||
* # writes splitting between two primaries, and thus different buckets.
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
|
||||
* # migrations may result in writes splitting between two primaries, and thus different buckets.
|
||||
* does_not_support_stepdowns,
|
||||
* tenant_migration_incompatible,
|
||||
* # We need a timeseries collection.
|
||||
* requires_timeseries,
|
||||
* ]
|
||||
@ -96,4 +97,4 @@ TimeseriesTest.run((insert) => {
|
||||
assert.eq(false,
|
||||
indexSpecsString[0].collation.numericOrdering,
|
||||
'Invalid index spec for index_string: ' + tojson(indexSpecsString[0]));
|
||||
});
|
||||
});
|
||||
|
||||
@ -6,9 +6,10 @@
|
||||
* # $indexStats stage. The former operation must be routed to the primary in a replica set,
|
||||
* # whereas the latter may be routed to a secondary.
|
||||
* assumes_read_preference_unchanged,
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
|
||||
* # writes splitting between two primaries, and thus different buckets.
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
|
||||
* # migrations may result in writes splitting between two primaries, and thus different buckets.
|
||||
* does_not_support_stepdowns,
|
||||
* tenant_migration_incompatible,
|
||||
* # We need a timeseries collection.
|
||||
* requires_timeseries,
|
||||
* ]
|
||||
|
||||
@ -2,9 +2,10 @@
|
||||
* Tests the creation of partial, TTL indexes on a time-series collection.
|
||||
*
|
||||
* @tags: [
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
|
||||
* # writes splitting between two primaries, and thus different buckets.
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
|
||||
* # migrations may result in writes splitting between two primaries, and thus different buckets.
|
||||
* does_not_support_stepdowns,
|
||||
* tenant_migration_incompatible,
|
||||
* # We need a timeseries collection.
|
||||
* requires_timeseries,
|
||||
* ]
|
||||
@ -145,4 +146,4 @@ const resetTsColl = function(extraOptions = {}) {
|
||||
assert.commandFailedWithCode(coll.createIndex(timeAndDataSpec, filterOnMeta),
|
||||
ErrorCodes.CannotCreateIndex);
|
||||
}
|
||||
}());
|
||||
}());
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
/**
|
||||
* Tests running the delete command on a time-series collection closes the in-memory bucket.
|
||||
* @tags: [
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
|
||||
* # writes splitting between two primaries, and thus different buckets.
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
|
||||
* # migrations may result in writes splitting between two primaries, and thus different buckets.
|
||||
* does_not_support_stepdowns,
|
||||
* tenant_migration_incompatible,
|
||||
* # We need a timeseries collection.
|
||||
* requires_timeseries,
|
||||
* ]
|
||||
|
||||
@ -3,9 +3,10 @@
|
||||
* were updated.
|
||||
*
|
||||
* @tags: [
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
|
||||
* # writes splitting between two primaries, and thus different buckets.
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
|
||||
* # migrations may result in writes splitting between two primaries, and thus different buckets.
|
||||
* does_not_support_stepdowns,
|
||||
* tenant_migration_incompatible,
|
||||
* # Test explicitly relies on multi-updates.
|
||||
* requires_multi_updates,
|
||||
* # We need a timeseries collection.
|
||||
|
||||
@ -5,9 +5,10 @@
|
||||
* bucket into a time-series collection.
|
||||
*
|
||||
* @tags: [
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
|
||||
* # writes splitting between two primaries, and thus different buckets.
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
|
||||
* # migrations may result in writes splitting between two primaries, and thus different buckets.
|
||||
* does_not_support_stepdowns,
|
||||
* tenant_migration_incompatible,
|
||||
* # We need a timeseries collection.
|
||||
* requires_timeseries,
|
||||
* # We assume that all nodes in a mixed-mode replica set are using compressed inserts to
|
||||
@ -99,4 +100,4 @@ const bucketColl = db.getCollection(bucketCollName);
|
||||
}
|
||||
|
||||
jsTestLog("Exiting targetNewBucketAndCheckCompressed.");
|
||||
})();
|
||||
})();
|
||||
|
||||
@ -3,9 +3,10 @@
|
||||
* control.min and control.max fields.
|
||||
*
|
||||
* @tags: [
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
|
||||
* # writes splitting between two primaries, and thus different buckets.
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
|
||||
* # migrations may result in writes splitting between two primaries, and thus different buckets.
|
||||
* does_not_support_stepdowns,
|
||||
* tenant_migration_incompatible,
|
||||
* # Test examines collection stats.
|
||||
* requires_collstats,
|
||||
* # Large measurement handling changed in binVersion 6.1.
|
||||
@ -70,4 +71,4 @@ for (let i = 0; i < numMeasurements; i++) {
|
||||
batch.push(doc);
|
||||
}
|
||||
assert.commandWorked(coll.insertMany(batch), {ordered: false});
|
||||
checkAverageBucketSize();
|
||||
checkAverageBucketSize();
|
||||
|
||||
@ -2,9 +2,10 @@
|
||||
* Test that time-series bucket collections work as expected with $lookup.
|
||||
*
|
||||
* @tags: [
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
|
||||
* # writes splitting between two primaries, and thus different buckets.
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
|
||||
* # migrations may result in writes splitting between two primaries, and thus different buckets.
|
||||
* does_not_support_stepdowns,
|
||||
* tenant_migration_incompatible,
|
||||
* # We need a timeseries collection.
|
||||
* requires_timeseries,
|
||||
* references_foreign_collection,
|
||||
@ -243,4 +244,4 @@ TimeseriesTest.run((insert) => {
|
||||
testFunc(collAOption, collBOption);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@ -2,9 +2,10 @@
|
||||
* Tests that only measurements with a binary identical meta field are included in the same bucket
|
||||
* in a time-series collection.
|
||||
* @tags: [
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
|
||||
* # writes splitting between two primaries, and thus different buckets.
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
|
||||
* # migrations may result in writes splitting between two primaries, and thus different buckets.
|
||||
* does_not_support_stepdowns,
|
||||
* tenant_migration_incompatible,
|
||||
* # We need a timeseries collection.
|
||||
* requires_timeseries,
|
||||
* # We assume that all nodes in a mixed-mode replica set are using compressed inserts to a
|
||||
@ -178,4 +179,4 @@ TimeseriesTest.run((insert) => {
|
||||
{_id: 2, time: t[2], meta: {a: [2, 1, 3]}, x: 20},
|
||||
{_id: 3, time: t[3], meta: {a: [2, 1, 3]}, x: 30},
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
@ -3,9 +3,10 @@
|
||||
* maximum values inserted into the bucket.
|
||||
*
|
||||
* @tags: [
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
|
||||
* # writes splitting between two primaries, and thus different buckets.
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
|
||||
* # migrations may result in writes splitting between two primaries, and thus different buckets.
|
||||
* does_not_support_stepdowns,
|
||||
* tenant_migration_incompatible,
|
||||
* # We need a timeseries collection.
|
||||
* requires_timeseries,
|
||||
* ]
|
||||
@ -123,4 +124,4 @@ TimeseriesTest.run((insert) => {
|
||||
runTest({a: NumberInt(1)}, {a: NumberInt(1)}, {a: NumberLong(2)});
|
||||
runTest({a: NumberDecimal(2.5)}, {a: NumberInt(1)}, {a: NumberDecimal(2.5)});
|
||||
runTest({a: Number(0.5)}, {a: Number(0.5)}, {a: NumberDecimal(2.5)});
|
||||
});
|
||||
});
|
||||
|
||||
@ -3,9 +3,10 @@
|
||||
* they are within the time range, regardless of the order in which they are inserted.
|
||||
*
|
||||
* @tags: [
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
|
||||
* # writes splitting between two primaries, and thus different buckets.
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
|
||||
* # migrations may result in writes splitting between two primaries, and thus different buckets.
|
||||
* does_not_support_stepdowns,
|
||||
* tenant_migration_incompatible,
|
||||
* # We need a timeseries collection.
|
||||
* requires_timeseries,
|
||||
* ]
|
||||
@ -64,4 +65,4 @@ TimeseriesTest.run((insert) => {
|
||||
assert.eq(buckets[1].control.min[timeFieldName], times[2]);
|
||||
assert.eq(buckets[1].control.max[timeFieldName], times[2]);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@ -2,9 +2,10 @@
|
||||
* Test the input/output behavior of some predicates on time-series collections.
|
||||
*
|
||||
* @tags: [
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
|
||||
* # writes splitting between two primaries, and thus different buckets.
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
|
||||
* # migrations may result in writes splitting between two primaries, and thus different buckets.
|
||||
* does_not_support_stepdowns,
|
||||
* tenant_migration_incompatible,
|
||||
* # We need a timeseries collection.
|
||||
* requires_timeseries,
|
||||
* ]
|
||||
@ -375,4 +376,4 @@ checkAllBucketings({"mt.a": {$size: 1}}, [
|
||||
{mt: {a: [{b: 2}]}},
|
||||
{mt: {a: [{b: 3}]}},
|
||||
{mt: {a: [{b: 2}, {b: 3}]}},
|
||||
]);
|
||||
]);
|
||||
|
||||
@ -2,9 +2,14 @@
|
||||
* Inserts time-series measurements into closed buckets identified by query-based reopening method.
|
||||
*
|
||||
* @tags: [
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns may result in
|
||||
* # writes splitting between two primaries, and thus different buckets.
|
||||
* # This test depends on certain writes ending up in the same bucket. Stepdowns and tenant
|
||||
* # migrations may result in writes splitting between two primaries, and thus different buckets.
|
||||
* does_not_support_stepdowns,
|
||||
* tenant_migration_incompatible,
|
||||
* # This test inserts uncompressed buckets directly into the buckets collection. This may cause
|
||||
* # intermittent failures on tenant migration passthroughs when validation checks that all
|
||||
* # buckets are compressed.
|
||||
* tenant_migration_incompatible,
|
||||
* # We need a timeseries collection.
|
||||
* requires_timeseries,
|
||||
* # This test depends on stats read from the primary node in replica sets.
|
||||
@ -315,10 +320,7 @@ const checkIfBucketReopened = function(
|
||||
"closed": false
|
||||
},
|
||||
"meta": "NonSuitableBucket2",
|
||||
"data": {
|
||||
"_id": {"0": ObjectId("63091c30138e9261fd70a903")},
|
||||
"time": {"0": ISODate("2022-08-26T19:19:30Z")}
|
||||
}
|
||||
"data": {"_id": BinData(7, "BwBjCRwwE46SYf1wqQMA"), "time": BinData(7, "CQDQVZjbggEAAAA=")}
|
||||
};
|
||||
const closedAndCompressedBucketDoc = {
|
||||
"_id": ObjectId("06091c2c050b7495eaef4584"),
|
||||
@ -335,10 +337,7 @@ const checkIfBucketReopened = function(
|
||||
"closed": true
|
||||
},
|
||||
"meta": "NonSuitableBucket3",
|
||||
"data": {
|
||||
"_id": {"0": ObjectId("63091c30138e9261fd70a903")},
|
||||
"time": {"0": ISODate("2022-08-26T19:19:30Z")}
|
||||
}
|
||||
"data": {"_id": BinData(7, "BwBjCRwwE46SYf1wqQMA"), "time": BinData(7, "CQDQVZjbggEAAAA=")}
|
||||
};
|
||||
const year2000BucketDoc = {
|
||||
"_id": ObjectId("07091c2c050b7495eaef4585"),
|
||||
|
||||
@ -7,10 +7,12 @@
|
||||
* not_allowed_with_security_token,
|
||||
* # Queries on mongoS may not request or provide a resume token.
|
||||
* assumes_against_mongod_not_mongos,
|
||||
* # Resuming may not work properly with stepdowns.
|
||||
* # Resuming may not work properly with stepdowns/tenant migration.
|
||||
* does_not_support_stepdowns,
|
||||
* tenant_migration_incompatible,
|
||||
* # We need a timeseries collection.
|
||||
* requires_timeseries,
|
||||
* cannot_run_during_upgrade_downgrade,
|
||||
* ]
|
||||
*/
|
||||
import {TimeseriesTest} from "jstests/core/timeseries/libs/timeseries.js";
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user