844 lines
17 KiB
Python
844 lines
17 KiB
Python
load("@poetry//:dependencies.bzl", "dependency")
|
|
load("@npm//:eslint/package_json.bzl", "bin")
|
|
load("@rules_python//python:defs.bzl", "py_binary", "py_library")
|
|
|
|
exports_files([
|
|
"candle_wrapper.py",
|
|
"cheetah_source_generator.py",
|
|
"clang_tidy_config_gen.py",
|
|
"jstoh.py",
|
|
"pip_requirements.py",
|
|
"symbols.orderfile",
|
|
"symbols-al2023.orderfile",
|
|
])
|
|
|
|
py_binary(
|
|
name = "msitrim",
|
|
srcs = ["msitrim.py"],
|
|
main = "msitrim.py",
|
|
visibility = ["//visibility:public"],
|
|
deps = select({
|
|
"@platforms//os:windows": [
|
|
dependency(
|
|
"python-msilib",
|
|
group = "platform",
|
|
),
|
|
],
|
|
"//conditions:default": [],
|
|
}),
|
|
)
|
|
|
|
py_binary(
|
|
name = "simple_report",
|
|
srcs = ["simple_report.py"],
|
|
main = "simple_report.py",
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
dependency(
|
|
"click",
|
|
group = "evergreen",
|
|
),
|
|
dependency(
|
|
"typing-extensions",
|
|
group = "core",
|
|
),
|
|
],
|
|
)
|
|
|
|
py_library(
|
|
name = "build_system_options",
|
|
srcs = ["build_system_options.py"],
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
py_binary(
|
|
name = "mongosymb",
|
|
srcs = ["mongosymb.py"],
|
|
main = "mongosymb.py",
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//buildscripts:build_system_options",
|
|
"//buildscripts/util",
|
|
dependency(
|
|
"requests",
|
|
group = "core",
|
|
),
|
|
dependency(
|
|
"tenacity",
|
|
group = "core",
|
|
),
|
|
],
|
|
)
|
|
|
|
py_binary(
|
|
name = "resmoke",
|
|
srcs = ["resmoke.py"],
|
|
data = [
|
|
"//buildscripts/resmokeconfig:fully_disabled_feature_flags.yml",
|
|
"//buildscripts/resmokeconfig:resmoke_modules.yml",
|
|
"//buildscripts/resmokeconfig/loggers:all_files",
|
|
"//src/mongo/util/version:releases.yml",
|
|
],
|
|
main = "resmoke.py",
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//buildscripts/resmokelib",
|
|
dependency(
|
|
"typer",
|
|
group = "core",
|
|
),
|
|
],
|
|
)
|
|
|
|
py_binary(
|
|
name = "setup_clang_tidy",
|
|
srcs = ["setup_clang_tidy.py"],
|
|
args = [
|
|
"--config-rlocation=$(rlocationpath //:clang_tidy_config)",
|
|
],
|
|
data = [
|
|
"//:clang_tidy_config",
|
|
"//src/mongo/tools/mongo_tidy_checks",
|
|
],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
dependency(
|
|
"bazel-runfiles",
|
|
group = "testing",
|
|
),
|
|
],
|
|
)
|
|
|
|
py_library(
|
|
name = "install_bazel",
|
|
srcs = [
|
|
"install_bazel.py",
|
|
],
|
|
deps = [
|
|
dependency(
|
|
"retry",
|
|
group = "testing",
|
|
),
|
|
"//buildscripts/s3_binary:download",
|
|
],
|
|
)
|
|
|
|
py_library(
|
|
name = "bazel_custom_formatter",
|
|
srcs = [
|
|
"bazel_custom_formatter.py",
|
|
],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"install_bazel",
|
|
dependency(
|
|
"typing-extensions",
|
|
group = "core",
|
|
),
|
|
dependency(
|
|
"retry",
|
|
group = "testing",
|
|
),
|
|
"simple_report",
|
|
],
|
|
)
|
|
|
|
py_binary(
|
|
name = "legacy_commands_check",
|
|
srcs = [
|
|
"legacy_commands_check.py",
|
|
],
|
|
main = "legacy_commands_check.py",
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//buildscripts/linter",
|
|
"//buildscripts/patch_builds",
|
|
],
|
|
)
|
|
|
|
py_library(
|
|
name = "mongo_toolchain",
|
|
srcs = [
|
|
"mongo_toolchain.py",
|
|
],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
dependency(
|
|
"typer",
|
|
group = "core",
|
|
),
|
|
],
|
|
)
|
|
|
|
py_library(
|
|
name = "clang_tidy_lib",
|
|
srcs = [
|
|
"apply_clang_tidy_fixes.py",
|
|
"clang_tidy.py",
|
|
"clang_tidy_vscode.py",
|
|
],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"mongo_toolchain",
|
|
"simple_report",
|
|
],
|
|
)
|
|
|
|
py_binary(
|
|
name = "sbom_linter",
|
|
srcs = [
|
|
"sbom_linter.py",
|
|
],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
dependency(
|
|
"jsonschema",
|
|
group = "build-metrics",
|
|
),
|
|
dependency(
|
|
"license-expression",
|
|
group = "lint",
|
|
),
|
|
],
|
|
)
|
|
|
|
py_binary(
|
|
name = "quickmongolint",
|
|
srcs = [
|
|
"quickmongolint.py",
|
|
],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//buildscripts/linter",
|
|
],
|
|
)
|
|
|
|
py_binary(
|
|
name = "todo_linter",
|
|
srcs = [
|
|
"todo_linter.py",
|
|
],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//buildscripts/linter",
|
|
dependency(
|
|
"evergreen-py",
|
|
group = "testing",
|
|
),
|
|
],
|
|
)
|
|
|
|
py_binary(
|
|
name = "errorcodes",
|
|
srcs = ["errorcodes.py"],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
dependency(
|
|
"regex",
|
|
group = "compile",
|
|
),
|
|
],
|
|
)
|
|
|
|
bin.eslint_binary(
|
|
name = "eslint_binary",
|
|
# Allow the binary to be run outside bazel
|
|
# See more details about this by commenting this out and running `bazel run //:format`
|
|
env = {"BAZEL_BINDIR": "."},
|
|
)
|
|
|
|
sh_binary(
|
|
name = "auto_install_db_contrib_tool",
|
|
srcs = ["auto_install_db_contrib_tool.sh"],
|
|
)
|
|
|
|
sh_binary(
|
|
name = "setup_engflow_creds",
|
|
srcs = ["setup_engflow_creds.sh"],
|
|
)
|
|
|
|
sh_binary(
|
|
name = "consolidate_repos",
|
|
srcs = ["consolidate-repos.sh"],
|
|
)
|
|
|
|
sh_binary(
|
|
name = "consolidate_repos_enterprise",
|
|
srcs = ["consolidate-repos-enterprise.sh"],
|
|
)
|
|
|
|
sh_binary(
|
|
name = "poetry_sync",
|
|
srcs = ["poetry_sync.sh"],
|
|
)
|
|
|
|
sh_binary(
|
|
name = "mount_drives",
|
|
srcs = ["mount_drives.sh"],
|
|
)
|
|
|
|
py_library(
|
|
name = "parse_test_xml",
|
|
srcs = [
|
|
"parse_test_xml.py",
|
|
],
|
|
deps = [
|
|
dependency(
|
|
"pyyaml",
|
|
group = "core",
|
|
),
|
|
],
|
|
)
|
|
|
|
py_binary(
|
|
name = "gather_failed_tests",
|
|
srcs = ["gather_failed_tests.py"],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//buildscripts/util",
|
|
dependency(
|
|
"typer",
|
|
group = "core",
|
|
),
|
|
dependency(
|
|
"pyyaml",
|
|
group = "core",
|
|
),
|
|
],
|
|
)
|
|
|
|
py_binary(
|
|
name = "burn_in_tests",
|
|
srcs = ["burn_in_tests.py"],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//buildscripts/patch_builds",
|
|
"//buildscripts/resmokelib",
|
|
dependency(
|
|
"click",
|
|
group = "evergreen",
|
|
),
|
|
dependency(
|
|
"gitpython",
|
|
group = "evergreen",
|
|
),
|
|
dependency(
|
|
"pydantic",
|
|
group = "evergreen",
|
|
),
|
|
dependency(
|
|
"pyyaml",
|
|
group = "core",
|
|
),
|
|
dependency(
|
|
"structlog",
|
|
group = "evergreen",
|
|
),
|
|
],
|
|
)
|
|
|
|
py_binary(
|
|
name = "bazel_burn_in",
|
|
srcs = ["bazel_burn_in.py"],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//buildscripts:burn_in_tests",
|
|
"//buildscripts:generate_result_tasks",
|
|
"//buildscripts/util",
|
|
dependency(
|
|
"typer",
|
|
group = "core",
|
|
),
|
|
dependency(
|
|
"shrub-py",
|
|
group = "testing",
|
|
),
|
|
],
|
|
)
|
|
|
|
py_binary(
|
|
name = "generate_result_tasks",
|
|
srcs = ["generate_result_tasks.py"],
|
|
data = [
|
|
"@codeowners_binary//:codeowners",
|
|
"@mothra//:teams",
|
|
],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//buildscripts/ciconfig",
|
|
"//buildscripts/util",
|
|
dependency(
|
|
"typer",
|
|
group = "core",
|
|
),
|
|
dependency(
|
|
"shrub-py",
|
|
group = "testing",
|
|
),
|
|
dependency(
|
|
"bazel-runfiles",
|
|
group = "testing",
|
|
),
|
|
],
|
|
)
|
|
|
|
sh_binary(
|
|
name = "setup_node_env",
|
|
srcs = ["setup_node_env.sh"],
|
|
)
|
|
|
|
py_binary(
|
|
name = "evergreen_task_timeout",
|
|
srcs = ["evergreen_task_timeout.py"],
|
|
main = "evergreen_task_timeout.py",
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//buildscripts/ciconfig",
|
|
"//buildscripts/resmoke_proxy",
|
|
"//buildscripts/timeouts:timeout_service",
|
|
"//evergreen:all_python_files",
|
|
dependency(
|
|
"evergreen-py",
|
|
group = "testing",
|
|
),
|
|
dependency(
|
|
"pydantic",
|
|
group = "evergreen",
|
|
),
|
|
dependency(
|
|
"inject",
|
|
group = "evergreen",
|
|
),
|
|
],
|
|
)
|
|
|
|
py_binary(
|
|
name = "bazel_local_resources",
|
|
srcs = ["bazel_local_resources.py"],
|
|
visibility = ["//visibility:public"],
|
|
deps = [dependency(
|
|
"filelock",
|
|
group = "testing",
|
|
)],
|
|
)
|
|
|
|
py_binary(
|
|
name = "poetry_lock_check",
|
|
srcs = ["poetry_lock_check.py"],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
dependency(
|
|
"poetry",
|
|
group = "export",
|
|
),
|
|
],
|
|
)
|
|
|
|
py_binary(
|
|
name = "validate_evg_project_config",
|
|
srcs = ["validate_evg_project_config.py"],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//buildscripts/ciconfig",
|
|
dependency(
|
|
"typer",
|
|
group = "core",
|
|
),
|
|
dependency(
|
|
"typing-extensions",
|
|
group = "core",
|
|
),
|
|
dependency(
|
|
"structlog",
|
|
group = "evergreen",
|
|
),
|
|
],
|
|
)
|
|
|
|
py_binary(
|
|
name = "large_file_check",
|
|
srcs = ["large_file_check.py"],
|
|
deps = [
|
|
"//buildscripts/linter",
|
|
"//buildscripts/patch_builds",
|
|
dependency(
|
|
"structlog",
|
|
group = "evergreen",
|
|
),
|
|
dependency(
|
|
"gitpython",
|
|
group = "evergreen",
|
|
),
|
|
],
|
|
)
|
|
|
|
# TODO(SERVER-105817): The following library is autogenerated, please split these out into individual python targets
|
|
py_library(
|
|
name = "all_python_files",
|
|
srcs = glob(["*.py"]),
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
py_binary(
|
|
name = "pyrightlint",
|
|
srcs = ["pyrightlint.py"],
|
|
deps = [
|
|
"//buildscripts/linter",
|
|
dependency(
|
|
"structlog",
|
|
group = "lint",
|
|
),
|
|
dependency(
|
|
"pyright",
|
|
),
|
|
],
|
|
)
|
|
|
|
py_binary(
|
|
name = "archive_artifacts",
|
|
srcs = ["archive_artifacts.py"],
|
|
deps = [
|
|
dependency(
|
|
"pyzstd",
|
|
group = "modules_poc",
|
|
),
|
|
dependency(
|
|
"cffi",
|
|
group = "modules_poc",
|
|
),
|
|
],
|
|
)
|
|
|
|
py_library(
|
|
name = "local_rbe_container_url",
|
|
srcs = ["local_rbe_container_url.py"],
|
|
data = [
|
|
"//bazel/platforms:remote_execution_containers.bzl",
|
|
],
|
|
)
|
|
|
|
py_binary(
|
|
name = "print_local_rbe_container_url",
|
|
srcs = ["print_local_rbe_container_url.py"],
|
|
deps = [
|
|
"local_rbe_container_url",
|
|
],
|
|
)
|
|
|
|
py_binary(
|
|
name = "create_rbe_sysroot",
|
|
srcs = [
|
|
"create_rbe_sysroot.py",
|
|
],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"local_rbe_container_url",
|
|
],
|
|
)
|
|
|
|
# Markdown link linter
|
|
py_binary(
|
|
name = "markdown_link_linter",
|
|
srcs = ["lint_markdown_links.py"],
|
|
main = "lint_markdown_links.py",
|
|
visibility = ["//visibility:public"],
|
|
deps = [], # 'requests' optional (external link checks skipped if absent)
|
|
)
|
|
|
|
py_binary(
|
|
name = "streams_suite_coverage_linter",
|
|
srcs = ["streams_suite_coverage_linter.py"],
|
|
main = "streams_suite_coverage_linter.py",
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
dependency(
|
|
"pyyaml",
|
|
group = "core",
|
|
),
|
|
],
|
|
)
|
|
|
|
py_binary(
|
|
name = "yamllinters",
|
|
srcs = ["yamllinters.py"],
|
|
main = "yamllinters.py",
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
dependency(
|
|
"yamllint",
|
|
group = "lint",
|
|
),
|
|
dependency(
|
|
"evergreen-lint",
|
|
group = "lint",
|
|
),
|
|
dependency(
|
|
"evergreen-py",
|
|
group = "testing",
|
|
),
|
|
],
|
|
)
|
|
|
|
py_binary(
|
|
name = "github_merge_queue_metrics",
|
|
srcs = ["github_merge_queue_metrics.py"],
|
|
main = "github_merge_queue_metrics.py",
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
dependency(
|
|
"requests",
|
|
group = "core",
|
|
),
|
|
dependency(
|
|
"opentelemetry-api",
|
|
group = "testing",
|
|
),
|
|
dependency(
|
|
"opentelemetry-sdk",
|
|
group = "testing",
|
|
),
|
|
dependency(
|
|
"opentelemetry-exporter-otlp-proto-http",
|
|
group = "testing",
|
|
),
|
|
dependency(
|
|
"boto3",
|
|
group = "aws",
|
|
),
|
|
],
|
|
)
|
|
|
|
py_library(
|
|
name = "check_for_noexcept",
|
|
srcs = ["check_for_noexcept.py"],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
dependency(
|
|
"gitpython",
|
|
group = "evergreen",
|
|
),
|
|
dependency(
|
|
"structlog",
|
|
group = "evergreen",
|
|
),
|
|
dependency(
|
|
"typer",
|
|
group = "core",
|
|
),
|
|
],
|
|
)
|
|
|
|
py_library(
|
|
name = "debugsymb_mapper",
|
|
srcs = ["debugsymb_mapper.py"],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//buildscripts:build_system_options",
|
|
"//buildscripts/resmokelib",
|
|
"//buildscripts/util",
|
|
dependency(
|
|
"requests",
|
|
group = "core",
|
|
),
|
|
],
|
|
)
|
|
|
|
py_library(
|
|
name = "evergreen_activate_gen_tasks",
|
|
srcs = ["evergreen_activate_gen_tasks.py"],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//buildscripts/util",
|
|
dependency(
|
|
"click",
|
|
group = "evergreen",
|
|
),
|
|
dependency(
|
|
"requests",
|
|
group = "core",
|
|
),
|
|
dependency(
|
|
"structlog",
|
|
group = "evergreen",
|
|
),
|
|
dependency(
|
|
"pydantic",
|
|
group = "evergreen",
|
|
),
|
|
dependency(
|
|
"retry",
|
|
group = "testing",
|
|
),
|
|
dependency(
|
|
"evergreen-py",
|
|
group = "testing",
|
|
),
|
|
],
|
|
)
|
|
|
|
py_library(
|
|
name = "evergreen_resmoke_job_count",
|
|
srcs = ["evergreen_resmoke_job_count.py"],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
dependency(
|
|
"psutil",
|
|
group = "build-metrics",
|
|
),
|
|
dependency(
|
|
"structlog",
|
|
group = "evergreen",
|
|
),
|
|
dependency(
|
|
"pyyaml",
|
|
group = "core",
|
|
),
|
|
],
|
|
)
|
|
|
|
py_library(
|
|
name = "evergreen_task_tags",
|
|
srcs = ["evergreen_task_tags.py"],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//buildscripts/ciconfig",
|
|
],
|
|
)
|
|
|
|
py_library(
|
|
name = "feature_flag_tags_check",
|
|
srcs = ["feature_flag_tags_check.py"],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//buildscripts/resmokelib",
|
|
],
|
|
)
|
|
|
|
py_library(
|
|
name = "jepsen_report",
|
|
srcs = ["jepsen_report.py"],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//buildscripts:simple_report",
|
|
dependency(
|
|
"click",
|
|
group = "evergreen",
|
|
),
|
|
dependency(
|
|
"typing-extensions",
|
|
group = "core",
|
|
),
|
|
],
|
|
)
|
|
|
|
py_library(
|
|
name = "package_test_internal",
|
|
srcs = ["package_test_internal.py"],
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
py_library(
|
|
name = "packager",
|
|
srcs = ["packager.py"],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
dependency(
|
|
"gitpython",
|
|
group = "evergreen",
|
|
),
|
|
],
|
|
)
|
|
|
|
py_library(
|
|
name = "powercycle_sentinel",
|
|
srcs = ["powercycle_sentinel.py"],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//buildscripts/util",
|
|
dependency(
|
|
"click",
|
|
group = "evergreen",
|
|
),
|
|
dependency(
|
|
"structlog",
|
|
group = "evergreen",
|
|
),
|
|
dependency(
|
|
"evergreen-py",
|
|
group = "testing",
|
|
),
|
|
],
|
|
)
|
|
|
|
py_library(
|
|
name = "sort_backport_multiversion",
|
|
srcs = ["sort_backport_multiversion.py"],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
dependency(
|
|
"pyyaml",
|
|
group = "core",
|
|
),
|
|
],
|
|
)
|
|
|
|
py_library(
|
|
name = "validate_commit_message",
|
|
srcs = ["validate_commit_message.py"],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"@bazel_rules_mongo//utils:evergreen_git",
|
|
"@poetry//:library_pathspec",
|
|
dependency(
|
|
"requests",
|
|
group = "core",
|
|
),
|
|
dependency(
|
|
"structlog",
|
|
group = "evergreen",
|
|
),
|
|
dependency(
|
|
"typer",
|
|
group = "core",
|
|
),
|
|
dependency(
|
|
"gitpython",
|
|
group = "evergreen",
|
|
),
|
|
dependency(
|
|
"typing-extensions",
|
|
group = "core",
|
|
),
|
|
],
|
|
)
|
|
|
|
py_library(
|
|
name = "todo_check",
|
|
srcs = ["todo_check.py"],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//buildscripts:validate_commit_message",
|
|
dependency(
|
|
"click",
|
|
group = "evergreen",
|
|
),
|
|
dependency(
|
|
"evergreen-py",
|
|
group = "testing",
|
|
),
|
|
],
|
|
)
|
|
|
|
py_library(
|
|
name = "validate_mongocryptd",
|
|
srcs = ["validate_mongocryptd.py"],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//buildscripts/ciconfig",
|
|
dependency(
|
|
"pyyaml",
|
|
group = "core",
|
|
),
|
|
],
|
|
)
|