From 3335233b3cdfa284b8010a55d58d1d8d86ade7ca Mon Sep 17 00:00:00 2001 From: Lizan Zhou Date: Wed, 27 Nov 2019 15:05:19 -0800 Subject: [PATCH 01/10] devcontainer WIP Signed-off-by: Lizan Zhou --- .devcontainer/.gitignore | 1 + .devcontainer/Dockerfile | 27 +++++++++++++++++++++++++++ .devcontainer/README.md | 23 +++++++++++++++++++++++ .devcontainer/devcontainer.json | 31 +++++++++++++++++++++++++++++++ .devcontainer/setup.sh | 12 ++++++++++++ .vscode/.gitignore | 2 ++ .vscode/refresh_compdb.sh | 6 ++++++ .vscode/tasks.json | 31 +++++++++++++++++++++++++++++++ bazel/setup_clang.sh | 3 +-- 9 files changed, 134 insertions(+), 2 deletions(-) create mode 100644 .devcontainer/.gitignore create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/README.md create mode 100644 .devcontainer/devcontainer.json create mode 100755 .devcontainer/setup.sh create mode 100644 .vscode/.gitignore create mode 100755 .vscode/refresh_compdb.sh create mode 100644 .vscode/tasks.json diff --git a/.devcontainer/.gitignore b/.devcontainer/.gitignore new file mode 100644 index 000000000000..55abd6a0566c --- /dev/null +++ b/.devcontainer/.gitignore @@ -0,0 +1 @@ +devcontainer.env diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 000000000000..aa9848aaee9f --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,27 @@ +FROM gcr.io/envoy-ci/envoy-build@sha256:f0b2453c3587e3297f5caf5e97fbf57c97592c96136209ec13fe2795aae2c896 + +ARG USERNAME=vscode +ARG USER_UID=501 +ARG USER_GID=$USER_UID + +ENV BUILD_DIR=/build +ENV TEST_TMPDIR=/build/tmp +ENV ENVOY_STDLIB=libstdc++ + +ENV DEBIAN_FRONTEND=noninteractive +RUN apt-get update \ + && apt-get -y install --no-install-recommends libpython2.7 sudo net-tools psmisc 2>&1 \ + # + # Create a non-root user to use if preferred - see https://aka.ms/vscode-remote/containers/non-root-user. + && groupadd --gid $USER_GID $USERNAME \ + && useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME \ + # [Optional] Add sudo support for non-root user + && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \ + && chmod 0440 /etc/sudoers.d/$USERNAME \ + # + # Clean up + && apt-get autoremove -y \ + && apt-get clean -y \ + && rm -rf /var/lib/apt/lists/* \ + +ENV DEBIAN_FRONTEND= \ No newline at end of file diff --git a/.devcontainer/README.md b/.devcontainer/README.md new file mode 100644 index 000000000000..083d548976f6 --- /dev/null +++ b/.devcontainer/README.md @@ -0,0 +1,23 @@ +# Envoy Dev Container + +This directory contains some experimental tools for Envoy Development in [VSCode Remote - Containers](https://code.visualstudio.com/docs/remote/containers). + +## How to use + +Open with VSCode with the Container extension installed. Follow the [official guide](https://code.visualstudio.com/docs/remote/containers) to open this +repository directly from GitHub or from checked-out source tree. + +After opening, run the `Refresh Compilation Database` task to generate compilation database to navigate in source code. +This will run partial build of Envoy and may take a while depends on the machine performance. This task is needed to run everytime after +changing BUILD files to get the changes reflected. + +## Advanced Usages + +### Using Remote Build Execution + +WIP + +### Disk performance + +Docekr for Mac/Windows is known to have disk performance issue, this is very obvious when you try to format all files in the container. +[Update the mount consistency to 'delegated'](https://code.visualstudio.com/docs/remote/containers-advanced#_update-the-mount-consistency-to-delegated-for-macos) is recommended. \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000000..6ed9bb8c8cf6 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,31 @@ +{ + "name": "Envoy Dev", + "dockerFile": "Dockerfile", + "runArgs": [ + "--user=vscode", + "--cap-add=SYS_PTRACE", + "--security-opt=seccomp=unconfined", + "--volume=${env:HOME}:${env:HOME}", + "--volume=envoy-build:/build", + // Uncomment next line if you have devcontainer.env + // "--env-file=.devcontainer/devcontainer.env" + ], + "settings": { + "terminal.integrated.shell.linux": "/bin/bash", + "bazel.buildifierFixOnFormat": true, + "clangd.path": "/opt/llvm/bin/clangd", + "python.pythonPath": "/usr/bin/python3", + "files.exclude": { + "**/.clangd/**": true, + "**/bazel-*/**": true + } + }, + "postCreateCommand": ".devcontainer/setup.sh", + "extensions": [ + "github.vscode-pull-request-github", + "zxh404.vscode-proto3", + "bazelbuild.vscode-bazel", + "llvm-vs-code-extensions.vscode-clangd", + "webfreak.debug" + ] +} diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh new file mode 100755 index 000000000000..31ebc1f1cd57 --- /dev/null +++ b/.devcontainer/setup.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +. ci/setup_cache.sh +trap - EXIT + +BAZELRC_FILE=~/.bazelrc bazel/setup_clang.sh /opt/llvm + +# Use generated toolchain config because we know the base container is the one we're using in RBE. +# Not using libc++ here because clangd will raise some tidy issue in libc++ header as of version 9. +echo "build --config=rbe-toolchain-clang" >> ~/.bazelrc +echo "build --symlink_prefix=/" >> ~/.bazelrc +echo "build ${BAZEL_BUILD_EXTRA_OPTIONS}" | tee -a ~/.bazelrc diff --git a/.vscode/.gitignore b/.vscode/.gitignore new file mode 100644 index 000000000000..c2393f450708 --- /dev/null +++ b/.vscode/.gitignore @@ -0,0 +1,2 @@ +settings.json +launch.json diff --git a/.vscode/refresh_compdb.sh b/.vscode/refresh_compdb.sh new file mode 100755 index 000000000000..ca4490379908 --- /dev/null +++ b/.vscode/refresh_compdb.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +TEST_TMPDIR=${TEST_TMPDIR:-/tmp}/compdb tools/gen_compilation_database.py --run_bazel_build + +# Kill clangd to reload the compilation database +killall -v /opt/llvm/bin/clangd \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 000000000000..bab9ce542d0f --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,31 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "label": "Build All Tests", + "type": "shell", + "command": "bazel build //test/...", + "group": { + "kind": "build", + "isDefault": true + } + }, + { + "label": "Run All Tests", + "type": "shell", + "command": "bazel test //test/...", + "group": { + "kind": "test", + "isDefault": true + } + }, + { + "label": "Refresh Compilation Database", + "type": "shell", + "command": ".vscode/refresh_compdb.sh", + "problemMatcher": [] + } + ] +} \ No newline at end of file diff --git a/bazel/setup_clang.sh b/bazel/setup_clang.sh index 4fd8a2bf8a5d..6b79aaed2484 100755 --- a/bazel/setup_clang.sh +++ b/bazel/setup_clang.sh @@ -1,6 +1,6 @@ #!/bin/bash -BAZELRC_FILE="$(bazel info workspace)/clang.bazelrc" +BAZELRC_FILE="${BAZELRC_FILE:-$(bazel info workspace)/clang.bazelrc}" LLVM_PREFIX=$1 @@ -28,6 +28,5 @@ build:clang-asan --linkopt=-fsanitize=vptr,function build:clang-asan --linkopt=-L${RT_LIBRARY_PATH} build:clang-asan --linkopt=-l:libclang_rt.ubsan_standalone-x86_64.a build:clang-asan --linkopt=-l:libclang_rt.ubsan_standalone_cxx-x86_64.a - " > ${BAZELRC_FILE} From c0c979aa84f4f68d8c31b01836b7df89d5ada8e7 Mon Sep 17 00:00:00 2001 From: Lizan Zhou Date: Wed, 13 May 2020 13:45:47 -0700 Subject: [PATCH 02/10] image update Signed-off-by: Lizan Zhou --- .devcontainer/Dockerfile | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index aa9848aaee9f..4ff020d1041e 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,4 +1,4 @@ -FROM gcr.io/envoy-ci/envoy-build@sha256:f0b2453c3587e3297f5caf5e97fbf57c97592c96136209ec13fe2795aae2c896 +FROM gcr.io/envoy-ci/envoy-build:04f06115b6ee7cfea74930353fb47a41149cbec3 ARG USERNAME=vscode ARG USER_UID=501 @@ -9,19 +9,14 @@ ENV TEST_TMPDIR=/build/tmp ENV ENVOY_STDLIB=libstdc++ ENV DEBIAN_FRONTEND=noninteractive -RUN apt-get update \ - && apt-get -y install --no-install-recommends libpython2.7 sudo net-tools psmisc 2>&1 \ +RUN apt-get -y update \ + && apt-get -y install --no-install-recommends libpython2.7 net-tools psmisc vim 2>&1 \ # # Create a non-root user to use if preferred - see https://aka.ms/vscode-remote/containers/non-root-user. && groupadd --gid $USER_GID $USERNAME \ && useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME \ # [Optional] Add sudo support for non-root user && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \ - && chmod 0440 /etc/sudoers.d/$USERNAME \ - # - # Clean up - && apt-get autoremove -y \ - && apt-get clean -y \ - && rm -rf /var/lib/apt/lists/* \ + && chmod 0440 /etc/sudoers.d/$USERNAME -ENV DEBIAN_FRONTEND= \ No newline at end of file +ENV DEBIAN_FRONTEND= From e16797e4732101121f0854f750434dc04c497aee Mon Sep 17 00:00:00 2001 From: Lizan Zhou Date: Wed, 13 May 2020 13:48:15 -0700 Subject: [PATCH 03/10] add container user Signed-off-by: Lizan Zhou --- .devcontainer/devcontainer.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 6ed9bb8c8cf6..b4c56432cec5 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -20,6 +20,8 @@ "**/bazel-*/**": true } }, + "remoteUser": "vscode", + "containerUser": "vscode", "postCreateCommand": ".devcontainer/setup.sh", "extensions": [ "github.vscode-pull-request-github", @@ -28,4 +30,4 @@ "llvm-vs-code-extensions.vscode-clangd", "webfreak.debug" ] -} +} \ No newline at end of file From 5e013639a2325594636793731987be9e4075192f Mon Sep 17 00:00:00 2001 From: Lizan Zhou Date: Wed, 13 May 2020 18:46:03 -0700 Subject: [PATCH 04/10] remove TEST_TMPDIR Signed-off-by: Lizan Zhou --- .devcontainer/Dockerfile | 1 - .devcontainer/setup.sh | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 4ff020d1041e..d17a43c3f431 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -5,7 +5,6 @@ ARG USER_UID=501 ARG USER_GID=$USER_UID ENV BUILD_DIR=/build -ENV TEST_TMPDIR=/build/tmp ENV ENVOY_STDLIB=libstdc++ ENV DEBIAN_FRONTEND=noninteractive diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh index 31ebc1f1cd57..bd871cf6e5f2 100755 --- a/.devcontainer/setup.sh +++ b/.devcontainer/setup.sh @@ -10,3 +10,4 @@ BAZELRC_FILE=~/.bazelrc bazel/setup_clang.sh /opt/llvm echo "build --config=rbe-toolchain-clang" >> ~/.bazelrc echo "build --symlink_prefix=/" >> ~/.bazelrc echo "build ${BAZEL_BUILD_EXTRA_OPTIONS}" | tee -a ~/.bazelrc +echo "startup --output_base=/build/tmp" From 9199ba1cdb27d9b33c705e967d6683e8de27edae Mon Sep 17 00:00:00 2001 From: Lizan Zhou Date: Wed, 13 May 2020 18:48:37 -0700 Subject: [PATCH 05/10] add tools/vscode Signed-off-by: Lizan Zhou --- {.vscode => tools/vscode}/refresh_compdb.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {.vscode => tools/vscode}/refresh_compdb.sh (100%) diff --git a/.vscode/refresh_compdb.sh b/tools/vscode/refresh_compdb.sh similarity index 100% rename from .vscode/refresh_compdb.sh rename to tools/vscode/refresh_compdb.sh From 45f0d1c068c8f84ba72005e2720cb76578639b3b Mon Sep 17 00:00:00 2001 From: Lizan Zhou Date: Wed, 13 May 2020 19:15:55 -0700 Subject: [PATCH 06/10] allow refresh compdb even there's compile error Signed-off-by: Lizan Zhou --- .vscode/tasks.json | 4 ++-- tools/gen_compilation_database.py | 13 ++++++++++++- tools/vscode/refresh_compdb.sh | 5 +++-- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index bab9ce542d0f..fe0a5963698e 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -24,8 +24,8 @@ { "label": "Refresh Compilation Database", "type": "shell", - "command": ".vscode/refresh_compdb.sh", + "command": "tools/vscode/refresh_compdb.sh", "problemMatcher": [] } ] -} \ No newline at end of file +} diff --git a/tools/gen_compilation_database.py b/tools/gen_compilation_database.py index b5b3c5a4a1be..3874e6c06a11 100755 --- a/tools/gen_compilation_database.py +++ b/tools/gen_compilation_database.py @@ -3,6 +3,7 @@ import argparse import glob import json +import logging import os import shlex import subprocess @@ -30,8 +31,17 @@ def generateCompilationDatabase(args): "--config=compdb", "--remote_download_outputs=all", ] + if args.keep_going: + bazel_options.append("-k") if args.run_bazel_build: - runBazelBuildForCompilationDatabase(bazel_options, args.bazel_targets) + try: + runBazelBuildForCompilationDatabase(bazel_options, args.bazel_targets) + except subprocess.CalledProcessError as e: + if not args.keep_going: + raise + else: + logging.warning("bazel build failed {}: {}".format(e.returncode, e.cmd)) + subprocess.check_call(["bazel", "build"] + bazel_options + [ "--aspects=@bazel_compdb//:aspects.bzl%compilation_database_aspect", @@ -102,6 +112,7 @@ def fixCompilationDatabase(args, db): if __name__ == "__main__": parser = argparse.ArgumentParser(description='Generate JSON compilation database') parser.add_argument('--run_bazel_build', action='store_true') + parser.add_argument('-k', '--keep_going', action='store_true') parser.add_argument('--include_external', action='store_true') parser.add_argument('--include_genfiles', action='store_true') parser.add_argument('--include_headers', action='store_true') diff --git a/tools/vscode/refresh_compdb.sh b/tools/vscode/refresh_compdb.sh index ca4490379908..186850e807bd 100755 --- a/tools/vscode/refresh_compdb.sh +++ b/tools/vscode/refresh_compdb.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash -TEST_TMPDIR=${TEST_TMPDIR:-/tmp}/compdb tools/gen_compilation_database.py --run_bazel_build +# Setting platform suffix here so the compdb headers won't be overwritten by another bazel run +BAZEL_BUILD_OPTIONS=--platform_suffix=-compdb tools/gen_compilation_database.py --run_bazel_build -k # Kill clangd to reload the compilation database -killall -v /opt/llvm/bin/clangd \ No newline at end of file +killall -v /opt/llvm/bin/clangd From 4633a9e4375bddeba8e81fb1d58610627818656a Mon Sep 17 00:00:00 2001 From: Lizan Zhou Date: Thu, 14 May 2020 15:31:22 -0700 Subject: [PATCH 07/10] docs Signed-off-by: Lizan Zhou --- .devcontainer/README.md | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/.devcontainer/README.md b/.devcontainer/README.md index 083d548976f6..c8249ae92a22 100644 --- a/.devcontainer/README.md +++ b/.devcontainer/README.md @@ -1,23 +1,30 @@ -# Envoy Dev Container +# Envoy Dev Container (experimental) This directory contains some experimental tools for Envoy Development in [VSCode Remote - Containers](https://code.visualstudio.com/docs/remote/containers). ## How to use -Open with VSCode with the Container extension installed. Follow the [official guide](https://code.visualstudio.com/docs/remote/containers) to open this +Open with VSCode with the Container extension installed. Follow the [official guide](https://code.visualstudio.com/docs/remote/containers) to open this repository directly from GitHub or from checked-out source tree. After opening, run the `Refresh Compilation Database` task to generate compilation database to navigate in source code. This will run partial build of Envoy and may take a while depends on the machine performance. This task is needed to run everytime after -changing BUILD files to get the changes reflected. +changing BUILD files to get the changes reflected. ## Advanced Usages ### Using Remote Build Execution -WIP +Write the following content to `devcontainer.env` and rebuild the container. The key will be persisted in the container's `~/.bazelrc`. + +``` +GCP_SERVICE_ACCOUNT_KEY= +BAZEL_REMOTE_INSTANCE= +BAZEL_REMOTE_CACHE=grpcs://remotebuildexecution.googleapis.com +BAZEL_BUILD_EXTRA_OPTIONS=--config=remote-ci --config=remote --jobs= +``` ### Disk performance -Docekr for Mac/Windows is known to have disk performance issue, this is very obvious when you try to format all files in the container. -[Update the mount consistency to 'delegated'](https://code.visualstudio.com/docs/remote/containers-advanced#_update-the-mount-consistency-to-delegated-for-macos) is recommended. \ No newline at end of file +Docker for Mac/Windows is known to have disk performance issue, this makes formatting all files in the container very slow. +[Update the mount consistency to 'delegated'](https://code.visualstudio.com/docs/remote/containers-advanced#_update-the-mount-consistency-to-delegated-for-macos) is recommended. From 2cffcc9b3523bb1d5fac86d6a4b90a45429f6ad0 Mon Sep 17 00:00:00 2001 From: Lizan Zhou Date: Thu, 14 May 2020 15:55:26 -0700 Subject: [PATCH 08/10] format Signed-off-by: Lizan Zhou --- tools/gen_compilation_database.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/gen_compilation_database.py b/tools/gen_compilation_database.py index 3874e6c06a11..1a3cf2ff4025 100755 --- a/tools/gen_compilation_database.py +++ b/tools/gen_compilation_database.py @@ -42,7 +42,6 @@ def generateCompilationDatabase(args): else: logging.warning("bazel build failed {}: {}".format(e.returncode, e.cmd)) - subprocess.check_call(["bazel", "build"] + bazel_options + [ "--aspects=@bazel_compdb//:aspects.bzl%compilation_database_aspect", "--output_groups=compdb_files" From 1ae78b0a3b0b9af2e18df14302d93b1daa233ae6 Mon Sep 17 00:00:00 2001 From: Lizan Zhou Date: Thu, 14 May 2020 17:37:23 -0700 Subject: [PATCH 09/10] review Signed-off-by: Lizan Zhou --- .devcontainer/README.md | 3 +++ .devcontainer/setup.sh | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.devcontainer/README.md b/.devcontainer/README.md index c8249ae92a22..095c229cd6a5 100644 --- a/.devcontainer/README.md +++ b/.devcontainer/README.md @@ -24,6 +24,9 @@ BAZEL_REMOTE_CACHE=grpcs://remotebuildexecution.googleapis.com BAZEL_BUILD_EXTRA_OPTIONS=--config=remote-ci --config=remote --jobs= ``` +By default the `--config=remote` implies [`--remote_download_toplevel`](https://docs.bazel.build/versions/master/command-line-reference.html#flag--remote_download_toplevel), +change this to `minimal` or `all` depending on where you're running the container by adding them to `BAZEL_BUILD_EXTRA_OPTIONS`. + ### Disk performance Docker for Mac/Windows is known to have disk performance issue, this makes formatting all files in the container very slow. diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh index bd871cf6e5f2..4dd2ddbff92b 100755 --- a/.devcontainer/setup.sh +++ b/.devcontainer/setup.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash . ci/setup_cache.sh -trap - EXIT +trap - EXIT # Don't remove the key file written into a temporary file BAZELRC_FILE=~/.bazelrc bazel/setup_clang.sh /opt/llvm @@ -11,3 +11,5 @@ echo "build --config=rbe-toolchain-clang" >> ~/.bazelrc echo "build --symlink_prefix=/" >> ~/.bazelrc echo "build ${BAZEL_BUILD_EXTRA_OPTIONS}" | tee -a ~/.bazelrc echo "startup --output_base=/build/tmp" + +[[ ! -z "${BUILD_DIR}" ]] && sudo chown -R "$(id -u):$(id -g)" ${BUILD_DIR} \ No newline at end of file From da13bee2a6ad9cba37df68e630781865801f7b93 Mon Sep 17 00:00:00 2001 From: Lizan Zhou Date: Fri, 15 May 2020 14:52:28 -0700 Subject: [PATCH 10/10] note API changes need refresh compdb Signed-off-by: Lizan Zhou --- .devcontainer/README.md | 6 ++++-- tools/vscode/refresh_compdb.sh | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.devcontainer/README.md b/.devcontainer/README.md index 095c229cd6a5..1cd314d2e4e0 100644 --- a/.devcontainer/README.md +++ b/.devcontainer/README.md @@ -8,8 +8,10 @@ Open with VSCode with the Container extension installed. Follow the [official gu repository directly from GitHub or from checked-out source tree. After opening, run the `Refresh Compilation Database` task to generate compilation database to navigate in source code. -This will run partial build of Envoy and may take a while depends on the machine performance. This task is needed to run everytime after -changing BUILD files to get the changes reflected. +This will run partial build of Envoy and may take a while depends on the machine performance. +This task is needed to run everytime after: +- Changing a BUILD file that add/remove files from a target, changes dependencies +- Changing API proto files ## Advanced Usages diff --git a/tools/vscode/refresh_compdb.sh b/tools/vscode/refresh_compdb.sh index 186850e807bd..c40074be87e3 100755 --- a/tools/vscode/refresh_compdb.sh +++ b/tools/vscode/refresh_compdb.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +tools/proto_format/proto_format.sh fix + # Setting platform suffix here so the compdb headers won't be overwritten by another bazel run BAZEL_BUILD_OPTIONS=--platform_suffix=-compdb tools/gen_compilation_database.py --run_bazel_build -k