Skip to content

ci/tools: minor fix to the compile db generation#36018

Merged
wbpcode merged 1 commit intoenvoyproxy:mainfrom
wbpcode:dev-fix-tool-again
Sep 7, 2024
Merged

ci/tools: minor fix to the compile db generation#36018
wbpcode merged 1 commit intoenvoyproxy:mainfrom
wbpcode:dev-fix-tool-again

Conversation

@wbpcode
Copy link
Member

@wbpcode wbpcode commented Sep 7, 2024

Commit Message: ci/tools: minor fix to the compile db generation
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]

Signed-off-by: wangbaiping <wangbaiping@bytedance.com>
Comment on lines -31 to +32
["bazel", *bazel_startup_options, "info", *bazel_options, "execution_root",
*bazel_options]).decode().strip()
["bazel", *bazel_startup_options, "info", *bazel_options,
"execution_root"]).decode().strip()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove repeatedly bazel_options

Comment on lines +1044 to +1061
# Override the BAZEL_STARTUP_OPTIONS to setting different output directory.
# So the compdb headers won't be overwritten by another bazel run.
for i in "${!BAZEL_STARTUP_OPTIONS[@]}"; do
if [[ ${BAZEL_STARTUP_OPTIONS[i]} == "--output_base"* ]]; then
COMPDB_OUTPUT_BASE="${BAZEL_STARTUP_OPTIONS[i]}"-envoy-compdb
BAZEL_STARTUP_OPTIONS[i]="${COMPDB_OUTPUT_BASE}"
BAZEL_STARTUP_OPTION_LIST="${BAZEL_STARTUP_OPTIONS[*]}"
export BAZEL_STARTUP_OPTION_LIST
fi
done

if [[ -z "${SKIP_PROTO_FORMAT}" ]]; then
"${CURRENT_SCRIPT_DIR}/../tools/proto_format/proto_format.sh" fix
fi

read -ra ENVOY_GEN_COMPDB_OPTIONS <<< "${ENVOY_GEN_COMPDB_OPTIONS:-}"

# Setting TEST_TMPDIR here so the compdb headers won't be overwritten by another bazel run.
TEST_TMPDIR="${BUILD_DIR}/envoy-compdb" \
"${CURRENT_SCRIPT_DIR}/../tools/gen_compilation_database.py" \
"${CURRENT_SCRIPT_DIR}/../tools/gen_compilation_database.py" \
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TEST_TMPDIR couldn't work because the explicit --output_base/--output_user_root options in the build_setup.sh. This override the options.

Copy link
Member

@phlax phlax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks @wbpcode

@wbpcode wbpcode merged commit 6618b3c into envoyproxy:main Sep 7, 2024
@wbpcode wbpcode deleted the dev-fix-tool-again branch September 7, 2024 16:33
mum4k pushed a commit to envoyproxy/nighthawk that referenced this pull request Sep 10, 2024
- Update the ENVOY_COMMIT and ENVOY_SHA in bazel/repositories.bzl to the latest Envoy's commit.
- Update .bazelrc to envoyproxy/envoy#35978
- Update ci/run_envoy_docker.sh to envoyproxy/envoy#35926 and envoyproxy/envoy#35660
- Update tools/gen_compilation_database.py to envoyproxy/envoy#36018 and envoyproxy/envoy#35811
- Update source/client/process_impl.cc to match interface change in envoyproxy/envoy#35912

Signed-off-by: Tom Zhang <4367421+tomjzzhang@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants