SERVER-100116 Swap eslint to rules_lint & upgrade to 9.19.0 (#31917)

GitOrigin-RevId: d08518aa13c42c1dfdb68fbbd74d9898b2f09bdf
This commit is contained in:
Zack Winter 2025-02-11 15:44:56 -08:00 committed by MongoDB Bot
parent 1d1b27e7f2
commit e2d43f0b28
453 changed files with 4417 additions and 651 deletions

View File

@ -1,3 +0,0 @@
src/mongo/gotools/*
*.tpl.js
jstests/third_party/**/*.js

View File

@ -1,248 +0,0 @@
env:
es2022: true
mongo: true
parserOptions:
ecmaVersion: 2022
sourceType: "module"
extends: "eslint:recommended"
rules:
no-prototype-builtins: 0
no-useless-escape: 0
no-irregular-whitespace: 0
no-inner-declarations: 0
no-unused-vars: [0, {"varsIgnorePattern": "^_", "args": "none"}]
no-empty: 0
no-redeclare: 0
no-constant-condition: 0
no-loss-of-precision: 0
semi: 2
no-restricted-syntax:
[
"error",
{
message: "Invalid load call. Please convert your library to a module and import it instead.",
selector: 'CallExpression > Identifier[name="load"]',
},
]
globals:
TestData: true
WriteError: true
WriteCommandError: true
BulkWriteError: true
DB: true
DBCollection: true
DBQuery: true
DBExplainQuery: true
DBCommandCursor: true
MongoBridge: true
MongoURI: true
WriteConcern: true
SessionOptions: true
CollInfos: true
CountDownLatch: true
BSONAwareMap: true
# FCV-related
latestFCV: true
lastLTSFCV: true
lastContinuousFCV: true
checkFCV: true
isFCVEqual: true
binVersionToFCV: true
numVersionsSinceLastLTS: true
getFCVConstants: true
removeFCVDocument: true
targetFCV: true
AssertionError: true
assert: true
doassert: true
authutil: true
tojson: true
tojsononeline: true
tostrictjson: true
tojsonObject: true
toEJSON: true
print: true
printjson: true
printjsononeline: true
jsTest: true
jsTestLog: true
jsonTestLog: true
ErrorCodes: true
ErrorCodeStrings: true
checkProgram: true
Random: true
checkLog: true
sleep: true
resetDbpath: true
copyDbpath: true
jsTestName: true
startParallelShell: true
buildInfo: true
getBuildInfo: true
jsTestOptions: true
printShardingStatus: true
_getErrorWithCode: true
isNetworkError: true
__magicNoPrint: true
computeSHA256Block: true
emit: true
_awaitRSHostViaRSMonitor: true
convertShardKeyToHashed: true
benchRun: true
benchRunSync: true
gc: true
DataConsistencyChecker: true
isNumber: true
isObject: true
isString: true
_createSecurityToken: true
_createTenantToken: true
_isAddressSanitizerActive: true
_isLeakSanitizerActive: true
_isThreadSanitizerActive: true
_isUndefinedBehaviorSanitizerActive: true
_isSpiderMonkeyDebugEnabled: true
_optimizationsEnabled: true
allocatePort: true
allocatePorts: true
resetAllocatedPorts: true
bsonObjToArray: true
_writeTestPipeObjects: true
_writeTestPipe: true
_writeTestPipeBsonFile: true
_readTestPipes: true
runFeatureFlagMultiversionTest: true
isRetryableError: true
numberDecimalsAlmostEqual: true
numberDecimalsEqual: true
debug: true
bsonsize: true
_DelegatingDriverSession: true
_DummyDriverSession: true
_ServerSession: true
sortDoc: true
executeNoThrowNetworkError: true
_readDumpFile: true
_openGoldenData: true
_writeGoldenData: true
_threadInject: true
port: true
_buildBsonObj: true
convertTrafficRecordingToBSON: true
_setShellFailPoint: true
shellHelper: true
_srand: true
_shouldUseImplicitSessions: true
testingReplication: true
myPort: true
retryOnNetworkError: true
getJSHeapLimitMB: true
_getEnv: true
indentStr: true
_forgetReplSet: true
_fnvHashToHexString: true
_resultSetsEqualUnordered: true
getStringWidth: true
_compareStringsWithCollation: true
eventResumeTokenType: true
highWaterMarkResumeTokenType: true
# likely could be replaced with `path`
_copyFileRange: true
appendFile: true
copyFile: true
writeFile: true
fileExists: true
pathExists: true
umask: true
getFileMode: true
copyDir: true
# likely could be replaced with `child_process`
MongoRunner: true
run: true
runProgram: true
runMongoProgram: true
runNonMongoProgram: true
runNonMongoProgramQuietly: true
_runMongoProgram: true
_startMongoProgram: true
startMongoProgram: true
_stopMongoProgram: true
stopMongoProgramByPid: true
clearRawMongoProgramOutput: true
rawMongoProgramOutput: true
waitProgram: true
waitMongoProgram: true
_runningMongoChildProcessIds: true
startMongoProgramNoConnect: true
# shell-specific
shellPrintHelper: true
shellAutocomplete: true
__autocomplete__: true
defaultPrompt: true
___it___: true
__promptWrapper__: true
passwordPrompt: true
isInteractive: true
# built-in BSON types and helpers
Code: true
MaxKey: true
MinKey: true
HexData: true
DBPointer: true
DBRef: true
BinData: true
NumberLong: true
NumberDecimal: true
Timestamp: true
MD5: true
Geo: true
decodeResumeToken: true
bsonWoCompare: true
bsonUnorderedFieldsCompare: true
bsonBinaryEqual: true
friendlyEqual: true
timestampCmp: true
decompressBSONColumn: true
hex_md5: true
QueryHelpers: true
chatty: true
DriverSession: true
ToolTest: true
uncheckedParallelShellPidsString: true
_shouldRetryWrites: true
# from_cpp:
__prompt__: true
_replMonitorStats: true
# explainable.js
Explainable: true
# utils.js
_verboseShell: true
__quiet: true
printStackTrace: true
setVerboseShell: true
_barFormat: true
compare: true
compareOn: true
shellPrint: true
_originalPrint: true
disablePrint: true
enablePrint: true
replSetMemberStatePrompt: true
hasErrorCode: true
helloStatePrompt: true
_validateMemberIndex: true
help: true
retryOnRetryableError: true

1
.github/CODEOWNERS vendored
View File

@ -13,7 +13,6 @@ OWNERS.yml @10gen/server-root-ownership @svc-auto-approve-bot
.bazelversion @10gen/devprod-build @svc-auto-approve-bot .bazelversion @10gen/devprod-build @svc-auto-approve-bot
.clang-format @10gen/server-programmability @svc-auto-approve-bot .clang-format @10gen/server-programmability @svc-auto-approve-bot
.clang-tidy.in @10gen/server-programmability @svc-auto-approve-bot .clang-tidy.in @10gen/server-programmability @svc-auto-approve-bot
.eslintignore @10gen/devprod-correctness @svc-auto-approve-bot
.gitignore @10gen/devprod-build @svc-auto-approve-bot .gitignore @10gen/devprod-build @svc-auto-approve-bot
.mypy.ini @10gen/devprod-build @10gen/devprod-correctness @svc-auto-approve-bot .mypy.ini @10gen/devprod-build @10gen/devprod-correctness @svc-auto-approve-bot
.prettierignore @10gen/devprod-correctness @svc-auto-approve-bot .prettierignore @10gen/devprod-correctness @svc-auto-approve-bot

View File

@ -145,7 +145,10 @@ mongo_install(
copy_to_directory( copy_to_directory(
name = "mongot_folder", name = "mongot_folder",
srcs = ["@mongot_localdev//:mongot_binaries"], srcs = select({
"//bazel/config:include_mongot_enabled": ["@mongot_localdev//:mongot_binaries"],
"//conditions:default": [],
}),
out = "mongot-localdev", out = "mongot-localdev",
include_external_repositories = ["mongot_localdev"], include_external_repositories = ["mongot_localdev"],
tags = [ tags = [

View File

@ -21,9 +21,6 @@ filters:
- ".clang-tidy.in": - ".clang-tidy.in":
approvers: approvers:
- 10gen/server-programmability - 10gen/server-programmability
- ".eslintignore":
approvers:
- 10gen/devprod-correctness
- ".gitignore": - ".gitignore":
approvers: approvers:
- 10gen/devprod-build - 10gen/devprod-build

View File

@ -13,15 +13,20 @@ def list_files_without_targets(bazel_bin: str):
# rules_lint only checks files that are in targets, verify that all files in the source tree # rules_lint only checks files that are in targets, verify that all files in the source tree
# are contained within targets. # are contained within targets.
js_files_in_targets = [ try:
line.strip() proc = subprocess.check_output(
for line in subprocess.check_output(
[bazel_bin, "cquery", 'kind("source file", deps(//...))', "--output", "files"], [bazel_bin, "cquery", 'kind("source file", deps(//...))', "--output", "files"],
stderr=subprocess.STDOUT, stderr=subprocess.STDOUT,
) )
.decode("utf-8") except subprocess.CalledProcessError as ex:
.splitlines() print("ERROR: bazel query failed:")
if line.strip().endswith("js") print(ex.cmd)
print(ex.stdout)
print(ex.stderr)
sys.exit(1)
js_files_in_targets = [
line.strip() for line in proc.decode("utf-8").splitlines() if line.strip().endswith("js")
] ]
print("Checking that all javascript files have BUILD.bazel targets...") print("Checking that all javascript files have BUILD.bazel targets...")

View File

@ -1,372 +1,3 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
"""ESLint module.
Will download a prebuilt ESLint binary if necessary (i.e. it isn't installed, isn't in the current print('Please use "bazel run lint" instead of this script')
path, or is the wrong version). It works in much the same way as clang_format.py. In lint mode, it
will lint the files or directory paths passed. In lint-patch mode, for upload.py, it will see if
there are any candidate files in the supplied patch. Fix mode will run ESLint with the --fix
option, and that will update the files with missing semicolons and similar repairable issues.
There is also a -d mode that assumes you only want to run one copy of ESLint per file / directory
parameter supplied. This lets ESLint search for candidate files to lint.
"""
import logging
import os
import platform
import shutil
import string
import subprocess
import sys
import tarfile
import tempfile
import threading
import urllib.error
import urllib.parse
import urllib.request
from distutils import spawn
from optparse import OptionParser
from typing import Optional
import structlog
# Get relative imports to work when the package is not installed on the PYTHONPATH.
if __name__ == "__main__" and __package__ is None:
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(os.path.realpath(__file__)))))
from buildscripts.linter import git, parallel
from buildscripts.linter.filediff import gather_changed_files_for_lint
##############################################################################
#
# Constants for ESLint
#
#
# Expected version of ESLint.
# If you want to update the version, please refer to `buildscripts/eslint/README.md`
ESLINT_VERSION = "8.28.0"
# Name of ESLint as a binary.
ESLINT_PROGNAME = "eslint"
# Arch of running system
ARCH = platform.machine() if platform.machine() != "aarch64" else "arm64"
# URL location of our provided ESLint binaries.
ESLINT_HTTP_LINUX_CACHE = (
"https://s3.amazonaws.com/boxes.10gen.com/build/eslint-"
+ ESLINT_VERSION
+ "-linux-"
+ ARCH
+ ".tar.gz"
)
ESLINT_HTTP_DARWIN_CACHE = (
"https://s3.amazonaws.com/boxes.10gen.com/build/eslint-" + ESLINT_VERSION + "-darwin.tar.gz"
)
# Path in the tarball to the ESLint binary.
ESLINT_SOURCE_TAR_BASE = string.Template(ESLINT_PROGNAME + "-$operating_system-$arch")
LOGGER = structlog.get_logger(__name__)
def callo(args):
"""Call a program, and capture its output."""
return subprocess.check_output(args).decode("utf-8")
def extract_eslint(tar_path, target_file):
"""Extract ESLint tar file."""
tarfp = tarfile.open(tar_path)
for name in tarfp.getnames():
if name == target_file:
tarfp.extract(name)
tarfp.close()
def get_eslint_from_cache(dest_file, operating_system, arch):
"""Get ESLint binary from mongodb's cache."""
# Get URL
if operating_system == "Linux":
url = ESLINT_HTTP_LINUX_CACHE
elif operating_system == "Darwin":
url = ESLINT_HTTP_DARWIN_CACHE
else:
raise ValueError("ESLint is not available as a binary for " + operating_system)
dest_dir = tempfile.gettempdir()
temp_tar_file = os.path.join(dest_dir, "temp.tar.gz")
# Download the file
print("Downloading ESLint %s from %s, saving to %s" % (ESLINT_VERSION, url, temp_tar_file))
urllib.request.urlretrieve(url, temp_tar_file)
print("Extracting ESLint %s to %s" % (ESLINT_VERSION, dest_file))
eslint_distfile = ESLINT_SOURCE_TAR_BASE.substitute(
operating_system=operating_system, arch=arch
)
extract_eslint(temp_tar_file, eslint_distfile)
shutil.move(eslint_distfile, dest_file)
class ESLint(object):
"""Class encapsulates finding a suitable copy of ESLint, and linting an individual file."""
def __init__(self, path, cache_dir):
"""Initialize ESLint."""
eslint_progname = ESLINT_PROGNAME
# Initialize ESLint configuration information
if sys.platform.startswith("linux"):
self.arch = ARCH
self.tar_path = None
elif sys.platform == "darwin":
self.arch = "x86_64"
self.tar_path = None
self.path = None
# Find ESLint now
if path is not None:
if os.path.isfile(path):
self.path = path
else:
print("WARNING: Could not find ESLint at %s" % path)
# Check the environment variable
if "MONGO_ESLINT" in os.environ:
self.path = os.environ["MONGO_ESLINT"]
if self.path and not self._validate_version(warn=True):
self.path = None
# Check the user's PATH environment variable now
if self.path is None:
self.path = spawn.find_executable(eslint_progname)
if self.path and not self._validate_version(warn=True):
self.path = None
# Have not found it yet, download it from the web
if self.path is None:
if not os.path.isdir(cache_dir):
os.makedirs(cache_dir)
self.path = os.path.join(cache_dir, eslint_progname)
if os.path.isfile(self.path) and not self._validate_version(warn=True):
print(
"WARNING: removing ESLint from %s to download the correct version" % self.path
)
os.remove(self.path)
if not os.path.isfile(self.path):
if sys.platform.startswith("linux"):
get_eslint_from_cache(self.path, "Linux", self.arch)
elif sys.platform == "darwin":
get_eslint_from_cache(self.path, "Darwin", self.arch)
else:
print(
"ERROR: eslint.py does not support downloading ESLint "
"on this platform, please install ESLint " + ESLINT_VERSION
)
# Validate we have the correct version
if not self._validate_version():
raise ValueError("correct version of ESLint was not found.")
self.print_lock = threading.Lock()
def _validate_version(self, warn=False):
"""Validate ESLint is the expected version."""
esl_version = callo([self.path, "--version"]).rstrip()
# Ignore the leading v in the version string.
if ESLINT_VERSION == esl_version[1:]:
return True
if warn:
print(
"WARNING: ESLint found in path %s, but the version is incorrect: %s"
% (self.path, esl_version)
)
return False
def _lint(self, file_name, print_diff):
"""Check the specified file for linting errors."""
# ESLint returns non-zero on a linting error. That's all we care about
# so only enter the printing logic if we have an error.
try:
callo([self.path, "-f", "unix", file_name])
except subprocess.CalledProcessError as err:
if print_diff:
# Take a lock to ensure error messages do not get mixed when printed to the screen
with self.print_lock:
print("ERROR: ESLint found errors in " + file_name)
print(err.output)
return False
return True
def lint(self, file_name):
"""Check the specified file has no linting errors."""
return self._lint(file_name, print_diff=True)
def autofix(self, file_name):
"""Run ESLint in fix mode."""
return not subprocess.call([self.path, "--fix", file_name])
def is_interesting_file(file_name):
"""Return true if this file should be checked."""
return (
file_name.startswith("src/mongo") or file_name.startswith("jstests")
) and file_name.endswith(".js")
def _get_build_dir():
"""Get the location of the scons build directory in case we need to download ESLint."""
return os.path.join(git.get_base_dir(), "build")
def _lint_files(eslint, files):
"""Lint a list of files with ESLint."""
eslint = ESLint(eslint, _get_build_dir())
print("Running ESLint %s at %s" % (ESLINT_VERSION, eslint.path))
lint_clean = parallel.parallel_process([os.path.abspath(f) for f in files], eslint.lint)
if not lint_clean:
print(
"ERROR: ESLint found errors. Run ESLint manually to see errors in "
"files that were skipped"
)
sys.exit(1)
return True
def lint_patch(eslint, infile):
"""Lint patch command entry point."""
files = git.get_files_to_check_from_patch(infile, is_interesting_file)
# Patch may have files that we do not want to check which is fine
if files:
return _lint_files(eslint, files)
return True
def lint_git_diff(eslint: Optional[str]) -> bool:
"""
Lint the files that have changes since the last git commit.
:param eslint: Path to eslint command.
:return: True if lint was successful.
"""
files = gather_changed_files_for_lint(is_interesting_file)
# Patch may have files that we do not want to check which is fine
if files:
return _lint_files(eslint, files)
return True
def lint(eslint, dirmode, glob):
"""Lint files command entry point."""
if dirmode and glob:
files = glob
else:
files = git.get_files_to_check(glob, is_interesting_file)
_lint_files(eslint, files)
return True
def _autofix_files(eslint, files):
"""Auto-fix the specified files with ESLint."""
eslint = ESLint(eslint, _get_build_dir())
print("Running ESLint %s at %s" % (ESLINT_VERSION, eslint.path))
autofix_clean = parallel.parallel_process([os.path.abspath(f) for f in files], eslint.autofix)
if not autofix_clean:
print("ERROR: failed to auto-fix files")
return False
return True
def autofix_func(eslint, dirmode, glob):
"""Auto-fix files command entry point."""
if dirmode:
files = glob
else:
files = git.get_files_to_check(glob, is_interesting_file)
return _autofix_files(eslint, files)
def main():
"""Execute Main entry point."""
success = False
usage = "%prog [-e <eslint>] [-d] lint|lint-patch|fix [glob patterns] "
description = (
"The script will try to find ESLint version %s on your system and run it. "
"If it won't find the version it will try to download it and then run it. "
"Commands description: lint runs ESLint on provided patterns or all .js "
"files under `jstests/` and `src/mongo`; "
"lint-patch runs ESLint against .js files modified in the "
"provided patch file (for upload.py); "
"fix runs ESLint with --fix on provided patterns "
"or files under jstests/ and src/mongo." % ESLINT_VERSION
)
epilog = "*Unless you specify -d a separate ESLint process will be launched for every file"
parser = OptionParser(usage=usage, description=description, epilog=epilog)
parser.add_option(
"-e",
"--eslint",
type="string",
dest="eslint",
help="Fully qualified path to eslint executable",
)
parser.add_option(
"-d",
"--dirmode",
action="store_true",
default=True,
dest="dirmode",
help="Considers the glob patterns as directories and runs ESLint process "
"against each pattern",
)
(options, args) = parser.parse_args(args=sys.argv)
logging.basicConfig(stream=sys.stdout, level=logging.INFO)
structlog.configure(logger_factory=structlog.stdlib.LoggerFactory())
if len(args) > 1:
command = args[1]
searchlist = args[2:]
if not searchlist:
searchlist = ["jstests/", "src/mongo/"]
if command == "lint":
success = lint(options.eslint, options.dirmode, searchlist)
elif command == "lint-patch":
if not args[2:]:
success = False
print("You must provide the patch's fully qualified file name with lint-patch")
else:
success = lint_patch(options.eslint, searchlist)
elif command == "lint-git-diff":
success = lint_git_diff(options.eslint)
elif command == "fix":
success = autofix_func(options.eslint, options.dirmode, searchlist)
else:
parser.print_help()
else:
parser.print_help()
sys.exit(0 if success else 1)
if __name__ == "__main__":
main()

View File

@ -783,7 +783,7 @@ tasks:
- "buildscripts/errorcodes.py" - "buildscripts/errorcodes.py"
- "--quiet" - "--quiet"
- name: lint_eslint - name: bazel_run_lint
tags: tags:
[ [
"assigned_to_jira_team_devprod_build", "assigned_to_jira_team_devprod_build",
@ -806,18 +806,11 @@ tasks:
- func: "cleanup environment" - func: "cleanup environment"
- func: "set up venv" - func: "set up venv"
- func: "upload pip requirements" - func: "upload pip requirements"
- command: subprocess.exec - func: "get engflow creds"
type: test - func: "bazel run"
params: vars:
binary: bash target: >-
args: lint
- "./src/evergreen/run_python_script_with_report.sh"
- "lint-eslint"
- "buildscripts/eslint.py"
- "--dirmode"
- "lint"
- "jstests/"
- "src/mongo"
# Check that the mutational fuzzer can parse all JS filess. # Check that the mutational fuzzer can parse all JS filess.
- name: lint_fuzzer_sanity_all - name: lint_fuzzer_sanity_all

View File

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -12,10 +12,8 @@ function testAggWithSystemVariable(varName, explain) {
// This query might or might not throw depending on the engine used // This query might or might not throw depending on the engine used
// and whether the variable is defined. // and whether the variable is defined.
if (explain) { if (explain) {
// eslint-disable-next-line
coll.explain().aggregate({$group: {_id: varName}}); coll.explain().aggregate({$group: {_id: varName}});
} else { } else {
// eslint-disable-next-line
coll.aggregate({$group: {_id: varName}}); coll.aggregate({$group: {_id: varName}});
} }
} catch (e) { } catch (e) {

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

10
jstests/auth/BUILD.bazel Normal file
View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -0,0 +1,10 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
js_library(
name = "all_javascript_files",
srcs = glob([
"*.js",
]),
)

View File

@ -36,7 +36,7 @@ export const $config = (function() {
.batchSize(2) .batchSize(2)
.maxTimeMS(10); .maxTimeMS(10);
const c = curs.itcount(); // eslint-disable-line const c = curs.itcount();
} catch (e) { } catch (e) {
assert.commandFailedWithCode( assert.commandFailedWithCode(
e, [ErrorCodes.MaxTimeMSExpired, ErrorCodes.NetworkInterfaceExceededTimeLimit]); e, [ErrorCodes.MaxTimeMSExpired, ErrorCodes.NetworkInterfaceExceededTimeLimit]);

Some files were not shown because too many files have changed in this diff Show More