SERVER-115593 use RAAPI for eslint (#45332)

GitOrigin-RevId: a024c00299d5a2e0edb994653d5abbda62b92f2c
This commit is contained in:
Daniel Moody 2025-12-16 15:25:07 -06:00 committed by MongoDB Bot
parent d315d18ea3
commit cdc15ad29b
1 changed files with 32 additions and 13 deletions

View File

@ -103,19 +103,38 @@ def main():
# Use the nodejs binary from the bazel's npm repository # Use the nodejs binary from the bazel's npm repository
# had to add '--build_runfile_links', '--legacy_external_runfiles' due to hard coded path below # had to add '--build_runfile_links', '--legacy_external_runfiles' due to hard coded path below
subprocess.run( bazel_base_cmd = [
[ "bazel",
"bazel", "build",
"build", "//:eslint",
"//:eslint", "--config=local",
"--config=local", "--build_runfile_links",
"--build_runfile_links", "--legacy_external_runfiles",
"--legacy_external_runfiles", ]
], bazel_remote_cache_opts = [
env=os.environ, "--experimental_remote_downloader=grpcs://sodalite.cluster.engflow.com",
check=True, "--remote_cache=grpcs://sodalite.cluster.engflow.com",
cwd=REPO_ROOT, ]
)
try:
subprocess.run(
bazel_base_cmd + bazel_remote_cache_opts,
env=os.environ,
check=True,
cwd=REPO_ROOT,
)
except subprocess.CalledProcessError:
# Retry without the remote cache/downloader endpoints if the first attempt fails.
print(
"Bazel build with remote cache failed, retrying without remote cache/downloader.",
file=sys.stderr,
)
subprocess.run(
bazel_base_cmd,
env=os.environ,
check=True,
cwd=REPO_ROOT,
)
os.environ["PATH"] = ( os.environ["PATH"] = (
"bazel-bin/eslint_/eslint.runfiles/nodejs_linux_arm64/bin/nodejs/bin/" + os.pathsep "bazel-bin/eslint_/eslint.runfiles/nodejs_linux_arm64/bin/nodejs/bin/" + os.pathsep
) + os.environ["PATH"] ) + os.environ["PATH"]