SERVER-120022 Add bazel targets for release-critical, query-execution resmoke suites (#48415)

GitOrigin-RevId: b9bba0f6bdad1ba6f3fbab8e2a16733068475a1b
This commit is contained in:
Sean Lyons 2026-02-25 09:58:07 -05:00 committed by MongoDB Bot
parent 693a8c3235
commit b5154bd49d
16 changed files with 151 additions and 64 deletions

View File

@ -16,52 +16,16 @@ mongo_js_library(
name = "common_jstest_data",
deps = [
"//jstests/aggregation/extras:utils",
"//jstests/concurrency/fsm_workload_helpers:auto_retry_transaction",
"//jstests/concurrency/fsm_workload_helpers:server_types",
"//jstests/core/timeseries/libs:timeseries_writes_util",
"//jstests/core/timeseries/libs:viewless_timeseries_util",
"//jstests/core/timeseries/libs:all_javascript_files",
"//jstests/hooks:all_subpackage_javascript_files",
"//jstests/libs:all_subpackage_javascript_files",
"//jstests/noPassthrough/libs:all_subpackage_javascript_files",
"//jstests/replsets:rslib",
"//jstests/replsets/libs:all_javascript_files",
"//jstests/sharding/libs:sharded_index_util",
],
)
# This is a temporary test target for running the jstests core
# suite as a bazel test. Cleanup with SERVER-103537.
resmoke_suite_test(
name = "core",
srcs = [
"//jstests/core:all_subpackage_javascript_files",
"//jstests/core_standalone:all_subpackage_javascript_files",
],
config = ":suites/core.yml",
data = [
"//jstests/aggregation/extras:merge_helpers.js",
"//jstests/noPassthrough/libs:server_parameter_helpers.js",
"//jstests/noPassthrough/libs/index_builds:index_build.js",
"//jstests/replsets:rslib.js",
"//jstests/sharding/libs:last_lts_mongod_commands.js",
"//jstests/sharding/libs:last_lts_mongos_commands.js",
"//jstests/third_party/fast_check:fc-3.1.0.js",
"//src/third_party/schemastore.org:schemas",
"//x509:generate_main_certificates",
],
exclude_files = [
# Transactions are not supported on MongoDB standalone nodes, so we do not run these tests in the
# 'core' suite. Instead we run them against a 1-node replica set in the 'core_txns' suite.
"//jstests/core/txns:all_subpackage_javascript_files",
# Query settings are not supported on standalone.
"//jstests/core/query/query_settings:all_subpackage_javascript_files",
# Queryable encryption is not supported on standalone.
"//jstests/core/query/queryable_encryption:all_subpackage_javascript_files",
],
shard_count = 24,
tags = [
"ci-development-critical-single-variant",
],
deps = [
"//src/mongo/db:mongod",
"//src/mongo/s:mongos",
"//src/mongo/shell:mongo",
"//jstests/third_party/fast_check:all_javascript_files",
],
)

View File

@ -34,9 +34,9 @@ executor:
matrix_suite: true
selector:
exclude_files:
- jstests/core/txns/**/*.js
- jstests/core/query/queryable_encryption/**/*.js
- jstests/core/query/query_settings/**/*.js
- jstests/core/txns/**/*.js
exclude_with_any_tags: []
roots:
- jstests/core/**/*.js

View File

@ -33,9 +33,9 @@ executor:
matrix_suite: true
selector:
exclude_files:
- jstests/core/txns/**/*.js
- jstests/core/query/queryable_encryption/**/*.js
- jstests/core/query/query_settings/**/*.js
- jstests/core/txns/**/*.js
roots:
- jstests/core/**/*.js
- jstests/core_standalone/**/*.js

View File

@ -43,9 +43,9 @@ executor:
matrix_suite: true
selector:
exclude_files:
- jstests/core/txns/**/*.js
- jstests/core/query/queryable_encryption/**/*.js
- jstests/core/query/query_settings/**/*.js
- jstests/core/txns/**/*.js
- jstests/core/**/express.js
- jstests/core/query/sort/sortk.js
- jstests/core/query/sort/sorth.js

View File

@ -32,9 +32,9 @@ executor:
matrix_suite: true
selector:
exclude_files:
- jstests/core/txns/**/*.js
- jstests/core/query/queryable_encryption/**/*.js
- jstests/core/query/query_settings/**/*.js
- jstests/core/txns/**/*.js
- jstests/core/**/express.js
- jstests/core/query/sort/sortk.js
- jstests/core/query/sort/sorth.js

View File

@ -33,9 +33,9 @@ executor:
matrix_suite: true
selector:
exclude_files:
- jstests/core/txns/**/*.js
- jstests/core/query/queryable_encryption/**/*.js
- jstests/core/query/query_settings/**/*.js
- jstests/core/txns/**/*.js
exclude_with_any_tags:
- does_not_support_repeated_reads
- requires_profiling

View File

@ -1,12 +1,7 @@
test_kind: fsm_workload_test
selector:
roots:
- jstests/concurrency/fsm_workloads/**/*.js
exclude_with_any_tags:
- uses_transactions
- requires_replication
- requires_sharding
from_target: //jstests/suites/query-execution:concurrency
executor:
archive:

View File

@ -1,17 +1,7 @@
test_kind: js_test
selector:
roots:
- jstests/core/**/*.js
- jstests/core_standalone/**/*.js
exclude_files:
# Transactions are not supported on MongoDB standalone nodes, so we do not run these tests in the
# 'core' suite. Instead we run them against a 1-node replica set in the 'core_txns' suite.
- jstests/core/txns/**/*.js
# Queryable encryption is not supported on standalone.
- jstests/core/query/queryable_encryption/**/*.js
# Query settings are not supported on standalone.
- jstests/core/query/query_settings/**/*.js
from_target: //jstests/suites/query-execution:core
executor:
archive:
hooks:

View File

@ -877,6 +877,7 @@ tasks:
"incompatible_s390x",
"concurrency",
"common",
"has_bazel_target",
]
commands:
- func: "generate resmoke tasks"
@ -1183,6 +1184,7 @@ tasks:
"requires_large_host",
"jscore",
"common",
"has_bazel_target",
]
commands:
- func: "do setup"

View File

@ -7,6 +7,24 @@ mongo_js_library(
srcs = ["server_types.js"],
)
mongo_js_library(
name = "auto_retry_transaction",
srcs = ["auto_retry_transaction.js"],
deps = [
"//jstests/core/txns/libs:all_javascript_files",
"//jstests/libs/txns:all_javascript_files",
],
)
mongo_js_library(
name = "fsm_workload_helpers",
srcs = [":all_subpackage_javascript_files"],
deps = [
"//jstests/core/txns/libs:all_javascript_files",
"//jstests/libs/txns:all_javascript_files",
],
)
mongo_js_library(
name = "all_javascript_files",
srcs = glob([

View File

@ -2,6 +2,11 @@ load("//bazel:mongo_js_rules.bzl", "all_subpackage_javascript_files", "mongo_js_
package(default_visibility = ["//visibility:public"])
mongo_js_library(
name = "rslib",
srcs = ["rslib.js"],
)
mongo_js_library(
name = "all_javascript_files",
srcs = glob([

View File

@ -0,0 +1,5 @@
version: 2.0.0
filters:
- "README.md":
approvers:
- 10gen/devprod-correctness

15
jstests/suites/README.md Normal file
View File

@ -0,0 +1,15 @@
## Resmoke suite test targets
Bazel test targets for resmoke suites.
For documentation of the `resmoke_suite_test` rule, see [bazel/resmoke/README.md](bazel/resmoke/README.md).
## Configuring
In addition to attributes for `resmoke_suite_test`, the following are options for configuring test targets.
| Attribute | Purpose | Example |
| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `rescoures:cpu:N` tag | Allocate multiple CPUs for the test. By default, all tests get 1 CPU. | `tags = ["resources:cpu:2"],` |
| `ci-` tags | Configure priority of the task in CI.<br/>Setting one of these enables the test to run in CI. See [task_selection_tags.md](docs/evergreen-testing/yaml_configuration/task_selection_tags.md) for the semantics of each. <br/><br/>One of <br/> `ci-default`<br/>`ci-release-critical`<br/>`ci-development-critical`<br/>`ci-development-critical-single-variant` | `tags = ["ci-default"]` |
| `target_compatible_with` | Configure platforms/build options that the test is compatible with. Use this to exclude the test suite from platforms in CI. | Exclude the test on PPC/S390x, MacOS, and TSAN builds:<pre><code>target_compatible_with = select({<br/> "@platforms//cpu:ppc": ["@platforms//:incompatible"],<br/> "@platforms//cpu:s390x": ["@platforms//:incompatible"],<br/> "@platforms//os:macos": ["@platforms//:incompatible"],<br/> "//bazel/config:tsan_enabled": ["@platforms//:incompatible"],<br/> "//conditions:default": [],<br/>}) |

View File

@ -0,0 +1,64 @@
load("//bazel/resmoke:resmoke.bzl", "resmoke_suite_test")
load(":common.bzl", "CONCURRENCY_DATA", "CORE_DATA")
resmoke_suite_test(
name = "core",
srcs = [
"//jstests/core:all_subpackage_javascript_files",
"//jstests/core_standalone:all_subpackage_javascript_files",
],
config = "//buildscripts/resmokeconfig:suites/core.yml",
data = CORE_DATA,
exclude_files = [
# Queryable encryption is not supported on standalone.
"//jstests/core/query/queryable_encryption:all_subpackage_javascript_files",
# Query settings are not supported on standalone.
"//jstests/core/query/query_settings:all_subpackage_javascript_files",
# Transactions are not supported on MongoDB standalone nodes, so we do not run these tests in the
# 'core' suite. Instead we run them against a 1-node replica set in the 'core_txns' suite.
"//jstests/core/txns:all_subpackage_javascript_files",
],
shard_count = 24,
tags = [
"ci-development-critical",
"ci-development-critical-single-variant",
"common",
"jscore",
],
deps = [
"//src/mongo/db:mongod",
"//src/mongo/s:mongos",
"//src/mongo/shell:mongo",
],
)
resmoke_suite_test(
name = "concurrency",
srcs = ["//jstests/concurrency/fsm_workloads:all_subpackage_javascript_files"],
config = "//buildscripts/resmokeconfig:suites/concurrency.yml",
data = CONCURRENCY_DATA,
exclude_with_any_tags = [
"uses_transactions",
"requires_replication",
"requires_sharding",
],
shard_count = 5,
tags = [
"ci-release-critical",
"common",
"concurrency",
"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

@ -0,0 +1,8 @@
version: 2.0.0
filters:
- "*":
approvers:
- 10gen/query-execution
- "OWNERS.yml":
approvers:
- 10gen/query-execution-staff-leads

View File

@ -0,0 +1,21 @@
# Javascript dependencies that tests in the core suite import.
# This is useful when you need a dependency to be included in
# passthrough suites.
CORE_DATA = [
"//jstests/aggregation/extras:merge_helpers.js",
"//jstests/noPassthrough/libs:server_parameter_helpers.js",
"//jstests/noPassthrough/libs/index_builds:index_build.js",
"//jstests/sharding/libs:last_lts_mongod_commands.js",
"//jstests/sharding/libs:last_lts_mongos_commands.js",
"//src/third_party/schemastore.org:schemas",
"//x509:generate_main_certificates",
]
# Javascript dependencies that tests in the concurrency suite import.
CONCURRENCY_DATA = [
"//jstests/concurrency/fsm_libs:all_javascript_files",
"//jstests/concurrency/fsm_utils:all_javascript_files",
"//jstests/concurrency/fsm_workload_helpers",
"//jstests/concurrency/fsm_workload_modifiers:all_subpackage_javascript_files",
"//jstests/sharding/analyze_shard_key/libs:all_javascript_files",
]