diff --git a/buildscripts/resmokeconfig/suites/OWNERS.yml b/buildscripts/resmokeconfig/suites/OWNERS.yml index 0e991276366..b1630407b16 100644 --- a/buildscripts/resmokeconfig/suites/OWNERS.yml +++ b/buildscripts/resmokeconfig/suites/OWNERS.yml @@ -63,6 +63,12 @@ filters: - "core_wildcard_indexes.yml": approvers: - 10gen/query-execution-write-exec + - "decimal.yml": + approvers: + - 10gen/server-programmability + - "disk_wiredtiger.yml": + approvers: + - 10gen/server-storage-engine-integration - "extensions*": approvers: - 10gen/query-integration-extensions-api diff --git a/jstests/concurrency/BUILD.bazel b/jstests/concurrency/BUILD.bazel index 97513de081b..5fed1315214 100644 --- a/jstests/concurrency/BUILD.bazel +++ b/jstests/concurrency/BUILD.bazel @@ -1,4 +1,6 @@ load("//bazel:mongo_js_rules.bzl", "all_subpackage_javascript_files", "mongo_js_library") +load("//bazel/resmoke:resmoke.bzl", "resmoke_suite_test") +load("//jstests/suites/query-execution:common.bzl", "CONCURRENCY_DATA") package(default_visibility = ["//visibility:public"]) @@ -10,3 +12,27 @@ mongo_js_library( ) all_subpackage_javascript_files() + +resmoke_suite_test( + name = "concurrency_simultaneous", + config = "//buildscripts/resmokeconfig:suites/concurrency_simultaneous.yml", + data = CONCURRENCY_DATA, + shard_count = 15, + tags = [ + "ci-release-critical", + "common", + "concurrency", + "random_name", + "resources:cpu:2", + ], + target_compatible_with = select({ + "@platforms//cpu:ppc": ["@platforms//:incompatible"], + "@platforms//cpu:s390x": ["@platforms//:incompatible"], + "@platforms//os:macos": ["@platforms//:incompatible"], + "//conditions:default": [], + }), + deps = [ + "//src/mongo/db:mongod", + "//src/mongo/shell:mongo", + ], +) diff --git a/jstests/disk/wt_cache_size_config.js b/jstests/disk/wt_cache_size_config.js index a4da2defc10..2f3366556ee 100644 --- a/jstests/disk/wt_cache_size_config.js +++ b/jstests/disk/wt_cache_size_config.js @@ -23,6 +23,32 @@ const totalCacheKB = Number( ); jsTestLog("Total process RAM available: " + totalCacheKB); +// Mirrors processinfo_linux.cpp: getMemorySizeLimit(). If a cgroup memory limit is set and +// is smaller than the system total, mongod will use that as its base for WiredTiger cache sizing. +function getMemorySizeLimitKB() { + for (const cgroupFile of [ + "/sys/fs/cgroup/memory.max", // cgroups v2 + "/sys/fs/cgroup/memory/memory.limit_in_bytes", // cgroups v1 + ]) { + let content; + try { + content = cat(cgroupFile).trim(); + } catch (e) { + continue; + } + if (!content || content === "max") { + break; + } + const limitBytes = Number(content); + if (!isNaN(limitBytes)) { + return Math.min(totalCacheKB, limitBytes / bytesPerKB); + } + } + return totalCacheKB; +} +const effectiveCacheKB = getMemorySizeLimitKB(); +jsTestLog("Effective process RAM (after cgroup limits): " + effectiveCacheKB); + function runTest(expectedCacheSizeBytes, serverConfig, fuzzyGBCheck = false) { let rst = new ReplSetTest({nodes: 1}); rst.startSet(serverConfig); @@ -58,16 +84,16 @@ runTest(0.3 * bytesPerGB, {wiredTigerCacheSizeGB: "0.3"}, true); runTest(10 * 1000 * 1000 * bytesPerMB, {wiredTigerCacheSizeGB: "10000"}, false); // Test default value -runTest(Math.max((totalCacheKB / bytesPerKB - 1024) * 0.5, 256.0) * bytesPerMB, {}, true); +runTest(Math.max((effectiveCacheKB / bytesPerKB - 1024) * 0.5, 256.0) * bytesPerMB, {}, true); // // Percentage-based tests. // TestData.storageEngineCacheSizePct = "0.01"; -runTest(0.01 * totalCacheKB * bytesPerKB, {}, true); +runTest(0.01 * effectiveCacheKB * bytesPerKB, {}, true); TestData.storageEngineCacheSizePct = ""; -runTest(0.03 * totalCacheKB * bytesPerKB, {wiredTigerCacheSizePct: "0.03"}, true); +runTest(0.03 * effectiveCacheKB * bytesPerKB, {wiredTigerCacheSizePct: "0.03"}, true); // Test lower limit runTest(256 * bytesPerMB, {wiredTigerCacheSizePct: "0.00000001"}, false); diff --git a/jstests/noPassthrough/BUILD.bazel b/jstests/noPassthrough/BUILD.bazel index 97513de081b..777efff7bb2 100644 --- a/jstests/noPassthrough/BUILD.bazel +++ b/jstests/noPassthrough/BUILD.bazel @@ -1,4 +1,5 @@ load("//bazel:mongo_js_rules.bzl", "all_subpackage_javascript_files", "mongo_js_library") +load("//bazel/resmoke:resmoke.bzl", "resmoke_suite_test") package(default_visibility = ["//visibility:public"]) @@ -10,3 +11,62 @@ mongo_js_library( ) all_subpackage_javascript_files() + +resmoke_suite_test( + name = "no_passthrough", + config = "//buildscripts/resmokeconfig:suites/no_passthrough.yml", + data = [ + "//jstests/aggregation/extras:merge_helpers.js", + "//jstests/auth/lib:all_subpackage_javascript_files", + "//jstests/concurrency/fsm_libs:all_subpackage_javascript_files", + "//jstests/concurrency/fsm_utils:all_subpackage_javascript_files", + "//jstests/core/libs:raw_operation_utils.js", + "//jstests/disk/libs:all_subpackage_javascript_files", + "//jstests/fle2/libs:all_subpackage_javascript_files", + "//jstests/libs:key1", + "//jstests/libs:test_crt_files", + "//jstests/libs:test_pem_files", + "//jstests/libs:testconfig", + "//jstests/libs/config_files:set_component_verbosity.json", + "//jstests/libs/config_files:set_profiling.json", + "//jstests/libs/config_files:set_profiling_filter.json", + "//jstests/libs/config_files:set_verbosity.json", + "//jstests/multiVersion/libs:all_subpackage_javascript_files", + "//jstests/noPassthrough/libs:max_conns_config.yaml", + "//jstests/noPassthrough/libs:max_conns_config_no_admin_threads.yaml", + "//jstests/noPassthrough/libs:max_conns_override_config.yaml", + "//jstests/noPassthrough/libs:max_conns_override_config_no_admin_threads.yaml", + "//jstests/noPassthrough/libs:net.bindIpAll.yaml", + "//jstests/noPassthrough/libs:net.bindIp_localhost.yaml", + "//jstests/noPassthrough/libs:net.max_incoming_connections.yaml", + "//jstests/noPassthrough/libs/configExpand:reflect", + "//jstests/noPassthrough/network/libs:net.max_incoming_connections_rate_limiter.yaml", + "//jstests/query_golden/libs:all_subpackage_javascript_files", + "//jstests/sharding/libs:all_subpackage_javascript_files", + "//jstests/sharding/libs:proxy_protocol_server", + "//jstests/ssl/libs:all_subpackage_javascript_files", + "//jstests/with_mongot/mongotmock/lib", + "//x509:generate_main_certificates", + ], + shard_count = 40, + tags = [ + "ci-release-critical", + "incompatible_with_bazel_remote_test", # TODO(SERVER-122822), TODO(SERVER-122823), Many tests in this suite are currently incompatible with remote execution. + "misc_js", + "requires-execution-on-windows-patch-build", + ], + target_compatible_with = select({ + "@platforms//cpu:ppc": ["@platforms//:incompatible"], + "@platforms//cpu:s390x": ["@platforms//:incompatible"], + "@platforms//os:macos": ["@platforms//:incompatible"], + "//conditions:default": [], + }), + deps = [ + "//src/mongo/db:mongod", + "//src/mongo/replay:mongor", + "//src/mongo/s:mongos", + "//src/mongo/shell:mongo", + "//src/mongo/tools/mongobridge_tool:mongobridge", + "//src/third_party/wiredtiger:wt", + ], +) diff --git a/jstests/noPassthrough/libs/BUILD.bazel b/jstests/noPassthrough/libs/BUILD.bazel index 97513de081b..186134cce0b 100644 --- a/jstests/noPassthrough/libs/BUILD.bazel +++ b/jstests/noPassthrough/libs/BUILD.bazel @@ -10,3 +10,9 @@ mongo_js_library( ) all_subpackage_javascript_files() + +exports_files( + glob([ + "*.yaml", + ]), +) diff --git a/jstests/noPassthrough/libs/configExpand/BUILD.bazel b/jstests/noPassthrough/libs/configExpand/BUILD.bazel index 97513de081b..9b25d1913ba 100644 --- a/jstests/noPassthrough/libs/configExpand/BUILD.bazel +++ b/jstests/noPassthrough/libs/configExpand/BUILD.bazel @@ -10,3 +10,8 @@ mongo_js_library( ) all_subpackage_javascript_files() + +py_binary( + name = "reflect", + srcs = ["reflect.py"], +) diff --git a/jstests/noPassthrough/network/libs/BUILD.bazel b/jstests/noPassthrough/network/libs/BUILD.bazel index 97513de081b..186134cce0b 100644 --- a/jstests/noPassthrough/network/libs/BUILD.bazel +++ b/jstests/noPassthrough/network/libs/BUILD.bazel @@ -10,3 +10,9 @@ mongo_js_library( ) all_subpackage_javascript_files() + +exports_files( + glob([ + "*.yaml", + ]), +) diff --git a/jstests/noPassthroughWithMongod/BUILD.bazel b/jstests/noPassthroughWithMongod/BUILD.bazel index 97513de081b..4971e9f7dae 100644 --- a/jstests/noPassthroughWithMongod/BUILD.bazel +++ b/jstests/noPassthroughWithMongod/BUILD.bazel @@ -1,4 +1,5 @@ load("//bazel:mongo_js_rules.bzl", "all_subpackage_javascript_files", "mongo_js_library") +load("//bazel/resmoke:resmoke.bzl", "resmoke_suite_test") package(default_visibility = ["//visibility:public"]) @@ -10,3 +11,23 @@ mongo_js_library( ) all_subpackage_javascript_files() + +resmoke_suite_test( + name = "no_passthrough_with_mongod", + srcs = ["//jstests/noPassthroughWithMongod:all_subpackage_javascript_files"], + config = "//buildscripts/resmokeconfig:suites/no_passthrough_with_mongod.yml", + data = [ + "//jstests/auth:test_only_commands_list.js", + ], + shard_count = 10, + tags = [ + "ci-release-critical", + "incompatible_with_bazel_remote_test", # TODO(SERVER-122766) ipv6_connection_string_validation.js: mongod fails to bind to IPv6 port in remote execution + "misc_js", + ], + deps = [ + "//src/mongo/db:mongod", + "//src/mongo/s:mongos", + "//src/mongo/shell:mongo", + ], +) diff --git a/jstests/suites/programmability/BUILD.bazel b/jstests/suites/programmability/BUILD.bazel index b469b355cbb..878e7bce782 100644 --- a/jstests/suites/programmability/BUILD.bazel +++ b/jstests/suites/programmability/BUILD.bazel @@ -53,3 +53,18 @@ resmoke_suite_test( "//src/mongo/shell:mongo", ], ) + +resmoke_suite_test( + name = "decimal", + config = "//buildscripts/resmokeconfig:suites/decimal.yml", + tags = [ + "ci-release-critical", + "common", + "decimal", + "jscore", + ], + deps = [ + "//src/mongo/db:mongod", + "//src/mongo/shell:mongo", + ], +) diff --git a/jstests/suites/routing-and-topology/BUILD.bazel b/jstests/suites/routing-and-topology/BUILD.bazel index a320a169ccb..5ed365fd826 100644 --- a/jstests/suites/routing-and-topology/BUILD.bazel +++ b/jstests/suites/routing-and-topology/BUILD.bazel @@ -25,3 +25,24 @@ resmoke_suite_test( "//src/mongo/shell:mongo", ], ) + +resmoke_suite_test( + name = "sharded_collections_jscore_passthrough_with_config_transitions_and_add_remove_shard", + config = "//buildscripts/resmokeconfig:suites/sharded_collections_jscore_passthrough_with_config_transitions_and_add_remove_shard.yml", + data = CORE_DATA, + shard_count = 50, + tags = [ + "ci-release-critical", + "jscore", + "sharding", + ], + target_compatible_with = select({ + "@platforms//os:macos": ["@platforms//:incompatible"], + "//conditions:default": [], + }), + deps = [ + "//src/mongo/db:mongod", + "//src/mongo/s:mongos", + "//src/mongo/shell:mongo", + ], +) diff --git a/jstests/suites/storage-engine-integration/BUILD.bazel b/jstests/suites/storage-engine-integration/BUILD.bazel new file mode 100644 index 00000000000..0c81cc70d7c --- /dev/null +++ b/jstests/suites/storage-engine-integration/BUILD.bazel @@ -0,0 +1,25 @@ +load("//bazel/resmoke:resmoke.bzl", "resmoke_suite_test") + +resmoke_suite_test( + name = "disk_wiredtiger", + config = "//buildscripts/resmokeconfig:suites/disk_wiredtiger.yml", + data = [ + "//jstests/disk/libs:all_javascript_files", + ], + tags = [ + "ci-release-critical", + "requires_replicated_fast_count_recovery", + ], + target_compatible_with = select({ + "@platforms//cpu:ppc": ["@platforms//:incompatible"], + "@platforms//cpu:s390x": ["@platforms//:incompatible"], + "//bazel/config:ubsan_enabled": ["@platforms//:incompatible"], + "//bazel/config:asan_enabled": ["@platforms//:incompatible"], + "//conditions:default": [], + }), + deps = [ + "//src/mongo/db:mongod", + "//src/mongo/shell:mongo", + "//src/third_party/wiredtiger:wt", + ], +) diff --git a/jstests/suites/storage-engine-integration/OWNERS.yml b/jstests/suites/storage-engine-integration/OWNERS.yml new file mode 100644 index 00000000000..69e89c57936 --- /dev/null +++ b/jstests/suites/storage-engine-integration/OWNERS.yml @@ -0,0 +1,5 @@ +version: 2.0.0 +filters: + - "*": + approvers: + - 10gen/server-storage-engine-integration