SERVER-120036 Add bazel test targets for remaining release critical resmoke suites (#51497)

GitOrigin-RevId: 720923fe031bda5b50136f5ed560f588321f2b4c
This commit is contained in:
Sean Lyons 2026-04-17 15:20:40 -04:00 committed by MongoDB Bot
parent 8db193de69
commit e95fced3cb
12 changed files with 225 additions and 3 deletions

View File

@ -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

View File

@ -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",
],
)

View File

@ -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);

View File

@ -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",
],
)

View File

@ -10,3 +10,9 @@ mongo_js_library(
)
all_subpackage_javascript_files()
exports_files(
glob([
"*.yaml",
]),
)

View File

@ -10,3 +10,8 @@ mongo_js_library(
)
all_subpackage_javascript_files()
py_binary(
name = "reflect",
srcs = ["reflect.py"],
)

View File

@ -10,3 +10,9 @@ mongo_js_library(
)
all_subpackage_javascript_files()
exports_files(
glob([
"*.yaml",
]),
)

View File

@ -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",
],
)

View File

@ -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",
],
)

View File

@ -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",
],
)

View File

@ -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",
],
)

View File

@ -0,0 +1,5 @@
version: 2.0.0
filters:
- "*":
approvers:
- 10gen/server-storage-engine-integration