mirror of https://github.com/mongodb/mongo
SERVER-100631 Add ruff into "bazel run lint" (#32166)
GitOrigin-RevId: 4234e1f4a6e164cfd2ab53cdb7290b238095520f
This commit is contained in:
parent
af5c17461a
commit
40f6d641f7
|
|
@ -3051,5 +3051,8 @@ WORKSPACE.bazel @10gen/devprod-build @svc-auto-approve-bot
|
|||
# The following patterns are parsed from ./src/third_party/libmongocrypt/OWNERS.yml
|
||||
/src/third_party/libmongocrypt/**/* @10gen/server-security @svc-auto-approve-bot
|
||||
|
||||
# The following patterns are parsed from ./tools/lint/OWNERS.yml
|
||||
/tools/lint/**/* @10gen/devprod-build @svc-auto-approve-bot
|
||||
|
||||
# The following patterns are parsed from ./x509/OWNERS.yml
|
||||
/x509/**/* @10gen/server-security @svc-auto-approve-bot
|
||||
|
|
|
|||
|
|
@ -129,6 +129,12 @@ single_version_override(
|
|||
version = "6.4.0",
|
||||
)
|
||||
|
||||
bazel_dep(name = "rules_multitool", version = "0.4.0")
|
||||
|
||||
multitool = use_extension("@rules_multitool//multitool:extension.bzl", "multitool")
|
||||
multitool.hub(lockfile = "//tools/lint:multitool.lock.json")
|
||||
use_repo(multitool, "multitool")
|
||||
|
||||
# TODO port over from WORKSPACE
|
||||
# currently breaks pyright
|
||||
##node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node", dev_dependency = True)
|
||||
|
|
|
|||
|
|
@ -11,3 +11,8 @@ sh_binary(
|
|||
srcs = ["lint.sh"],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
py_binary(
|
||||
name = "bazelisk",
|
||||
srcs = ["bazelisk.py"],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
py_binary(
|
||||
name = "generate_coverity_command",
|
||||
srcs = ["generate_coverity_command.py"],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
|
@ -1,8 +1,15 @@
|
|||
# placeholder for bazel/wrapper_hook/lint.py
|
||||
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
NO_COLOR='\033[0m'
|
||||
|
||||
if [[ $1 == "ALL_PASSING" ]]; then
|
||||
echo "No linter errors found!"
|
||||
echo -e "${GREEN}INFO:${NO_COLOR} No linter errors found!"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Linter run failed, see details above"
|
||||
echo -e "${RED}ERROR:${NO_COLOR} Linter run failed, see details above"
|
||||
echo -e "${GREEN}INFO:${NO_COLOR} Run the following to try to auto-fix the errors:\n\nbazel run lint --fix"
|
||||
|
||||
exit 1
|
||||
|
|
|
|||
|
|
@ -146,3 +146,9 @@ platform(
|
|||
":rhel9",
|
||||
],
|
||||
)
|
||||
|
||||
py_binary(
|
||||
name = "remote_execution_containers_generator",
|
||||
srcs = ["remote_execution_containers_generator.py"],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
py_binary(
|
||||
name = "mongo_toolchain_version_generator",
|
||||
srcs = ["mongo_toolchain_version_generator.py"],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
|
@ -104,6 +104,10 @@ def list_files_without_targets(
|
|||
new_list = []
|
||||
for file in all_typed_files:
|
||||
if file not in typed_files_in_targets_set and file not in exempt_list:
|
||||
if "bazel_rules_mongo" in file:
|
||||
# Skip files in bazel_rules_mongo, since it has its own Bazel repo
|
||||
continue
|
||||
|
||||
new_list.append(file)
|
||||
|
||||
if len(new_list) != 0:
|
||||
|
|
@ -139,6 +143,11 @@ def run_rules_lint(bazel_bin: str, args: List[str]) -> bool:
|
|||
):
|
||||
return False
|
||||
|
||||
if not list_files_without_targets(
|
||||
files_with_targets, "python", "py", ["src/mongo", "buildscripts", "evergreen"]
|
||||
):
|
||||
return False
|
||||
|
||||
# Default to linting everything if no path was passed in
|
||||
if len([arg for arg in args if not arg.startswith("--")]) == 0:
|
||||
args = ["//..."] + args
|
||||
|
|
@ -147,7 +156,8 @@ def run_rules_lint(bazel_bin: str, args: List[str]) -> bool:
|
|||
with tempfile.NamedTemporaryFile(delete=False) as buildevents:
|
||||
buildevents_path = buildevents.name
|
||||
|
||||
args.append("--aspects=//tools/lint:linters.bzl%eslint")
|
||||
for linter in ["eslint", "ruff"]:
|
||||
args.append(f"--aspects=//tools/lint:linters.bzl%{linter}")
|
||||
|
||||
args.extend(
|
||||
[
|
||||
|
|
@ -210,11 +220,16 @@ def run_rules_lint(bazel_bin: str, args: List[str]) -> bool:
|
|||
if "coverage.dat" in report or not os.path.exists(report) or not os.path.getsize(report):
|
||||
# Report is empty. No linting errors.
|
||||
continue
|
||||
failing_reports += 1
|
||||
print(f"From {report}:")
|
||||
with open(report, "r", encoding="utf-8") as f:
|
||||
print(f.read())
|
||||
file_contents = f.read().strip()
|
||||
if file_contents == "All checks passed!":
|
||||
# Report is successful. No linting errors.
|
||||
continue
|
||||
|
||||
print(f"From {report}:")
|
||||
print(file_contents)
|
||||
print()
|
||||
failing_reports += 1
|
||||
|
||||
# Apply fixes if requested
|
||||
if fix:
|
||||
|
|
|
|||
|
|
@ -251,3 +251,35 @@ 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",
|
||||
),
|
||||
],
|
||||
)
|
||||
|
||||
# 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"],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ load("@poetry//:dependencies.bzl", "dependency")
|
|||
py_library(
|
||||
name = "ciconfig",
|
||||
srcs = [
|
||||
"__init__.py",
|
||||
"evergreen.py",
|
||||
],
|
||||
visibility = ["//visibility:public"],
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
# 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"],
|
||||
)
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# 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"],
|
||||
)
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# 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"],
|
||||
)
|
||||
|
|
@ -1,3 +1,5 @@
|
|||
load("@poetry//:dependencies.bzl", "dependency")
|
||||
|
||||
filegroup(
|
||||
name = "idlc",
|
||||
srcs = [
|
||||
|
|
@ -16,5 +18,65 @@ py_library(
|
|||
] + glob(["idl/**/*.py"]),
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
dependency(
|
||||
"typer",
|
||||
group = "core",
|
||||
),
|
||||
],
|
||||
)
|
||||
|
||||
py_library(
|
||||
name = "idl_compatibility_errors",
|
||||
srcs = [
|
||||
"idl_compatibility_errors.py",
|
||||
],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
py_binary(
|
||||
name = "idl_check_compatibility",
|
||||
srcs = [
|
||||
"idl_check_compatibility.py",
|
||||
],
|
||||
main = "idl_check_compatibility.py",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"idl_compatibility_errors",
|
||||
],
|
||||
)
|
||||
|
||||
py_binary(
|
||||
name = "check_stable_api_commands_have_idl_definitions",
|
||||
srcs = [
|
||||
"check_stable_api_commands_have_idl_definitions.py",
|
||||
],
|
||||
main = "check_stable_api_commands_have_idl_definitions.py",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
py_binary(
|
||||
name = "checkout_idl_files_from_past_releases",
|
||||
srcs = [
|
||||
"checkout_idl_files_from_past_releases.py",
|
||||
],
|
||||
main = "checkout_idl_files_from_past_releases.py",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
py_binary(
|
||||
name = "gen_all_server_params_list",
|
||||
srcs = [
|
||||
"gen_all_server_params_list.py",
|
||||
],
|
||||
main = "gen_all_server_params_list.py",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
py_binary(
|
||||
name = "run_tests",
|
||||
srcs = [
|
||||
"run_tests.py",
|
||||
],
|
||||
main = "run_tests.py",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -41,7 +41,6 @@ from pymongo import MongoClient
|
|||
|
||||
# Permit imports from "buildscripts".
|
||||
sys.path.append(os.path.normpath(os.path.join(os.path.abspath(__file__), "../../..")))
|
||||
|
||||
from idl import syntax
|
||||
|
||||
from buildscripts.idl.lib import list_idls, parse_idl
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
# 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"],
|
||||
)
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# 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"],
|
||||
)
|
||||
|
|
@ -3,6 +3,7 @@ load("@poetry//:dependencies.bzl", "dependency")
|
|||
py_library(
|
||||
name = "linter",
|
||||
srcs = [
|
||||
"__init__.py",
|
||||
"base.py",
|
||||
"filediff.py",
|
||||
"git.py",
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
# 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"],
|
||||
)
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# 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"],
|
||||
)
|
||||
|
|
@ -17,3 +17,10 @@ py_library(
|
|||
),
|
||||
],
|
||||
)
|
||||
|
||||
# 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"],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
py_binary(
|
||||
name = "resmoke_proxy",
|
||||
srcs = [
|
||||
"__init__.py",
|
||||
"resmoke_proxy.py",
|
||||
],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//buildscripts/resmokelib",
|
||||
],
|
||||
)
|
||||
|
|
@ -110,7 +110,7 @@ def in_spawn_host():
|
|||
return False
|
||||
|
||||
|
||||
if in_git_root_dir() and not in_spawn_host():
|
||||
if (in_git_root_dir() or "BUILD_WORKSPACE_DIRECTORY" in os.environ) and not in_spawn_host():
|
||||
generate_mongo_version_file()
|
||||
else:
|
||||
LOGGER.info("Skipping generating mongo version file since we're not in the root of a git repo")
|
||||
|
|
|
|||
|
|
@ -11,4 +11,11 @@ S3_SHA256_HASHES = {
|
|||
"https://mdb-build-public.s3.amazonaws.com/buildozer/v7.3.1/buildozer-linux-amd64": "3305e287b3fcc68b9a35fd8515ee617452cd4e018f9e6886b6c7cdbcba8710d4",
|
||||
"https://mdb-build-public.s3.amazonaws.com/buildozer/v7.3.1/buildozer-linux-arm64": "0b5a2a717ac4fc911e1fec8d92af71dbb4fe95b10e5213da0cc3d56cea64a328",
|
||||
"https://mdb-build-public.s3.amazonaws.com/buildozer/v7.3.1/buildozer-windows-amd64.exe": "58d41ce53257c5594c9bc86d769f580909269f68de114297f46284fbb9023dcf",
|
||||
"https://mdb-build-public.s3.amazonaws.com/ruff/0.6.9/ruff-aarch64-apple-darwin.tar.gz": "b94562393a4bf23f1a48521f5495a8e48de885b7c173bd7ea8206d6d09921633",
|
||||
"https://mdb-build-public.s3.amazonaws.com/ruff/0.6.9/ruff-aarch64-unknown-linux-musl.tar.gz": "73df3729a3381d0918e4640aac4b2653c542f74c7b7843dee8310e2c877e6f2e",
|
||||
"https://mdb-build-public.s3.amazonaws.com/ruff/0.6.9/ruff-powerpc64le-unknown-linux-gnu.tar.gz": "6eedb853553ee52309e9519af775b3359a12227ec342404b6a033308cdd48b1b",
|
||||
"https://mdb-build-public.s3.amazonaws.com/ruff/0.6.9/ruff-s390x-unknown-linux-gnu.tar.gz": "b4f93af861c1b3e1956df08e0d9f20b7e55cd7beb37c9df09b659908e920ebe6",
|
||||
"https://mdb-build-public.s3.amazonaws.com/ruff/0.6.9/ruff-x86_64-apple-darwin.tar.gz": "34aa37643e30dcb81a3c0e011c3a8df552465ea7580ba92ca727a3b7c6de25d1",
|
||||
"https://mdb-build-public.s3.amazonaws.com/ruff/0.6.9/ruff-x86_64-pc-windows-msvc.zip": "9d10e1282c5f695b2130cf593d55e37266513fc6d497edc4a30a6ed6d8ba4067",
|
||||
"https://mdb-build-public.s3.amazonaws.com/ruff/0.6.9/ruff-x86_64-unknown-linux-musl.tar.gz": "39a1cd878962ebc88322b4f6d33cae2292454563028f93a3f1f8ce58e3025b07",
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
# 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"],
|
||||
)
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# 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"],
|
||||
)
|
||||
|
|
@ -17,3 +17,10 @@ mongo_toolchain_py_cxx_test(
|
|||
),
|
||||
],
|
||||
)
|
||||
|
||||
# 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"],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
# 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"],
|
||||
)
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
py_test(
|
||||
name = "test_evergreen",
|
||||
srcs = [
|
||||
"__init__.py",
|
||||
"test_evergreen.py",
|
||||
],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//buildscripts/ciconfig",
|
||||
],
|
||||
)
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# 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"],
|
||||
)
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# 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"],
|
||||
)
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# 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"],
|
||||
)
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# 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"],
|
||||
)
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# 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"],
|
||||
)
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
load("@poetry//:dependencies.bzl", "dependency")
|
||||
|
||||
py_test(
|
||||
name = "test_suites_configurations",
|
||||
srcs = ["test_suites_configurations.py"],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//buildscripts/resmokelib",
|
||||
],
|
||||
)
|
||||
|
||||
py_test(
|
||||
name = "test_find_suites",
|
||||
srcs = ["test_find_suites.py"],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//buildscripts/resmokelib",
|
||||
],
|
||||
)
|
||||
|
||||
py_test(
|
||||
name = "test_generated_matrix_suites",
|
||||
srcs = ["test_generated_matrix_suites.py"],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//buildscripts/resmokelib",
|
||||
"//buildscripts/resmokelib/logging",
|
||||
],
|
||||
)
|
||||
|
||||
py_test(
|
||||
name = "test_jstest_tags",
|
||||
srcs = ["test_jstest_tags.py"],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//buildscripts/idl",
|
||||
"//buildscripts/resmokelib",
|
||||
],
|
||||
)
|
||||
|
||||
py_test(
|
||||
name = "test_matrix_suite_generation",
|
||||
srcs = ["test_matrix_suite_generation.py"],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//buildscripts/resmokelib",
|
||||
"//buildscripts/resmokelib/logging",
|
||||
],
|
||||
)
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
import glob
|
||||
import json
|
||||
import os
|
||||
import unittest
|
||||
from collections import defaultdict
|
||||
from typing import Optional
|
||||
|
|
@ -57,6 +58,7 @@ class RequiresFcvTagRule(JstestTagRule):
|
|||
|
||||
class TestJstestTags(unittest.TestCase):
|
||||
def test_jstest_tags(self):
|
||||
os.chdir(os.environ.get("BUILD_WORKSPACE_DIRECTORY", "."))
|
||||
globs = ["src/mongo/db/modules/enterprise/jstests/**/*.js", "jstests/**/*.js"]
|
||||
|
||||
tag_rules = [
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
py_test(
|
||||
name = "python_test",
|
||||
srcs = ["python_test.py"],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# 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"],
|
||||
)
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# 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"],
|
||||
)
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
py_test(
|
||||
name = "test_discovery",
|
||||
srcs = [
|
||||
"__init__.py",
|
||||
"test_discovery.py",
|
||||
],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//buildscripts/resmokelib",
|
||||
"//buildscripts/resmokelib/logging",
|
||||
],
|
||||
)
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# 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"],
|
||||
)
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# 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"],
|
||||
)
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# 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"],
|
||||
)
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# 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"],
|
||||
)
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# 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"],
|
||||
)
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# 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"],
|
||||
)
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# 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"],
|
||||
)
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# 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"],
|
||||
)
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# 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"],
|
||||
)
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# 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"],
|
||||
)
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# 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"],
|
||||
)
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
py_binary(
|
||||
name = "test_sbom",
|
||||
srcs = ["test_sbom.py"],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# 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"],
|
||||
)
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# 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"],
|
||||
)
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
load("@poetry//:dependencies.bzl", "dependency")
|
||||
|
||||
py_library(
|
||||
name = "timeout",
|
||||
srcs = ["timeout.py"],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
dependency(
|
||||
"shrub-py",
|
||||
group = "testing",
|
||||
),
|
||||
],
|
||||
)
|
||||
|
||||
py_library(
|
||||
name = "timeout_service",
|
||||
srcs = ["timeout_service.py"],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"timeout",
|
||||
"//buildscripts/resmoke_proxy",
|
||||
dependency(
|
||||
"inject",
|
||||
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"],
|
||||
)
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# 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"],
|
||||
)
|
||||
|
|
@ -3,6 +3,7 @@ load("@poetry//:dependencies.bzl", "dependency")
|
|||
py_library(
|
||||
name = "util",
|
||||
srcs = [
|
||||
"__init__.py",
|
||||
"buildozer_utils.py",
|
||||
"cedar_report.py",
|
||||
"cmdutils.py",
|
||||
|
|
|
|||
|
|
@ -560,3 +560,17 @@ sh_binary(
|
|||
name = "write_mongo_binary_url_to_downstream_expansions",
|
||||
srcs = ["write_mongo_binary_url_to_downstream_expansions.sh"],
|
||||
)
|
||||
|
||||
py_binary(
|
||||
name = "macos_notary",
|
||||
srcs = ["macos_notary.py"],
|
||||
main = "macos_notary.py",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
# 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"],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -124,3 +124,10 @@ sh_binary(
|
|||
name = "wiredtiger_develop_use",
|
||||
srcs = ["wiredtiger_develop_use.sh"],
|
||||
)
|
||||
|
||||
# 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"],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
# 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"],
|
||||
)
|
||||
|
|
@ -213,6 +213,9 @@ ignore = [
|
|||
"F822", # undefined-export
|
||||
]
|
||||
|
||||
[tool.ruff.lint.isort]
|
||||
known-first-party = ["buildscripts", "buildscripts/idl", "evergreen"]
|
||||
|
||||
[tool.pyright]
|
||||
include = [
|
||||
"buildscripts",
|
||||
|
|
|
|||
|
|
@ -164,3 +164,8 @@ mongo_cc_benchmark(
|
|||
"//src/mongo/db:service_context",
|
||||
],
|
||||
)
|
||||
|
||||
py_binary(
|
||||
name = "lock_gdb_test",
|
||||
srcs = ["lock_gdb_test.py"],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -92,3 +92,8 @@ mongo_cc_unit_test(
|
|||
":unicode",
|
||||
],
|
||||
)
|
||||
|
||||
py_binary(
|
||||
name = "gen_diacritic_map",
|
||||
srcs = ["gen_diacritic_map.py"],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
py_library(
|
||||
name = "utils",
|
||||
srcs = ["utils.py"],
|
||||
)
|
||||
|
||||
py_binary(
|
||||
name = "extract_failed_test_to_pickle",
|
||||
srcs = ["extract_failed_test_to_pickle.py"],
|
||||
)
|
||||
|
||||
py_binary(
|
||||
name = "extract_pickle_to_json",
|
||||
srcs = ["extract_pickle_to_json.py"],
|
||||
)
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# 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"],
|
||||
)
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
py_binary(
|
||||
name = "overwrite_results",
|
||||
srcs = [
|
||||
"overwrite_results.py",
|
||||
],
|
||||
main = "overwrite_results.py",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
py_binary(
|
||||
name = "setup_repro_env",
|
||||
srcs = [
|
||||
"setup_repro_env.py",
|
||||
],
|
||||
main = "setup_repro_env.py",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# 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"],
|
||||
)
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# 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"],
|
||||
)
|
||||
|
|
@ -55,3 +55,8 @@ mongo_cc_binary(
|
|||
"//src/mongo/db/query/stage_builder/sbe:abt_unit_test_utils",
|
||||
],
|
||||
)
|
||||
|
||||
py_binary(
|
||||
name = "optimizer_gdb_test",
|
||||
srcs = ["optimizer_gdb_test.py"],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -75,3 +75,9 @@ mongo_cc_unit_test(
|
|||
"//src/mongo/unittest",
|
||||
],
|
||||
)
|
||||
|
||||
py_binary(
|
||||
name = "process_logs",
|
||||
srcs = ["process_logs.py"],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1275,3 +1275,9 @@ mongo_cc_library(
|
|||
"packaged_task.h",
|
||||
],
|
||||
)
|
||||
|
||||
py_binary(
|
||||
name = "pretty_printer_test",
|
||||
srcs = ["pretty_printer_test.py"],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -62,12 +62,6 @@ config_setting(
|
|||
flag_values = {":with_cxx_stdlib": "best"},
|
||||
)
|
||||
|
||||
bool_flag(
|
||||
name = "with_abseil",
|
||||
build_setting_default = False,
|
||||
deprecation = "The value of this flag is ignored. Bazel builds always depend on Abseil for its pre-adopted `std::` types. You should remove this flag from your build command.",
|
||||
)
|
||||
|
||||
int_flag(
|
||||
name = "abi_version_no",
|
||||
build_setting_default = 1,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
version: 1.0.0
|
||||
filters:
|
||||
- "*":
|
||||
approvers:
|
||||
- 10gen/devprod-build
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
load("@aspect_rules_lint//lint:eslint.bzl", "lint_eslint_aspect")
|
||||
load("@aspect_rules_lint//lint:lint_test.bzl", "lint_test")
|
||||
load("@aspect_rules_lint//lint:ruff.bzl", "lint_ruff_aspect")
|
||||
|
||||
eslint = lint_eslint_aspect(
|
||||
binary = Label("@//tools/lint:eslint"),
|
||||
|
|
@ -11,3 +12,10 @@ eslint = lint_eslint_aspect(
|
|||
)
|
||||
|
||||
eslint_test = lint_test(aspect = eslint)
|
||||
|
||||
ruff = lint_ruff_aspect(
|
||||
binary = "@multitool//tools/ruff",
|
||||
configs = [
|
||||
Label("//:pyproject.toml"),
|
||||
],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,39 @@
|
|||
{
|
||||
"$schema": "https://raw.githubusercontent.com/theoremlp/rules_multitool/main/lockfile.schema.json",
|
||||
"ruff": {
|
||||
"binaries": [
|
||||
{
|
||||
"kind": "archive",
|
||||
"url": "https://mdb-build-public.s3.amazonaws.com/ruff/0.6.9/ruff-aarch64-unknown-linux-musl.tar.gz",
|
||||
"file": "ruff-aarch64-unknown-linux-musl/ruff",
|
||||
"sha256": "73df3729a3381d0918e4640aac4b2653c542f74c7b7843dee8310e2c877e6f2e",
|
||||
"os": "linux",
|
||||
"cpu": "arm64"
|
||||
},
|
||||
{
|
||||
"kind": "archive",
|
||||
"url": "https://mdb-build-public.s3.amazonaws.com/ruff/0.6.9/ruff-x86_64-unknown-linux-musl.tar.gz",
|
||||
"file": "ruff-x86_64-unknown-linux-musl/ruff",
|
||||
"sha256": "39a1cd878962ebc88322b4f6d33cae2292454563028f93a3f1f8ce58e3025b07",
|
||||
"os": "linux",
|
||||
"cpu": "x86_64"
|
||||
},
|
||||
{
|
||||
"kind": "archive",
|
||||
"url": "https://mdb-build-public.s3.amazonaws.com/ruff/0.6.9/ruff-aarch64-apple-darwin.tar.gz",
|
||||
"file": "ruff-aarch64-apple-darwin/ruff",
|
||||
"sha256": "b94562393a4bf23f1a48521f5495a8e48de885b7c173bd7ea8206d6d09921633",
|
||||
"os": "macos",
|
||||
"cpu": "arm64"
|
||||
},
|
||||
{
|
||||
"kind": "archive",
|
||||
"url": "https://mdb-build-public.s3.amazonaws.com/ruff/0.6.9/ruff-x86_64-apple-darwin.tar.gz",
|
||||
"file": "ruff-x86_64-apple-darwin/ruff",
|
||||
"sha256": "34aa37643e30dcb81a3c0e011c3a8df552465ea7580ba92ca727a3b7c6de25d1",
|
||||
"os": "macos",
|
||||
"cpu": "x86_64"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue