envoyproxy / envoyproxy/nighthawk
[CI] clang format (/ci/do_ci.sh) result differs between local run and CI run
- Dominant language
- C++
- Stars
- 414
- Forks
- 95
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 11
Description
*Title*: `/ci/do_ci.sh fix_format` run passes locally but fails on CI
*Description*:
`/ci/do_ci.sh fix_format` local run formats `TerminationPredicatePtr &&` to `TerminationPredicatePtr&&`. This format passes checks locally but fails in CI runs. There seems to be a difference between the two environments. Example of commit:
https://github.com/envoyproxy/nighthawk/pull/1002/commits/4e48f3ed3a79b1c4e72e8c5520ee12144fdf00b7
*Reproduction steps*:
I destroyed and recreated the python virtual environment locally and reproduced the issue.
Example of ci/do_ci.sh local run for formatting that passes on CI:
$ ./ci/do_ci.sh check_format
Running with 16 cpus and BAZEL_BUILD_OPTIONS: --verbose_failures --action_env=HOME --action_env=PYTHONUSERBASE --experimental_local_memory_estimate --experimental_generate_json_trace_profile
clang/clang++ toolchain configured
check_format...
INFO: Invocation ID: d76a2219-7144-4f22-b3d6-8dd26c7409a7
INFO: Analyzed target @envoy//tools/code_format:check_format.py (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
WARNING: /usr/local/google/home/amerlan/.cache/bazel/_bazel_amerlan/83bd5c8264e6cd991cfadbc57544dd5d/external/envoy/tools/code_format/BUILD:7:14: @envoy//tools/code_format:check_format.py is a source file, nothing will be built for it. If you want to build a target that consumes this file, try --compile_one_dependency
INFO: Elapsed time: 0.497s, Critical Path: 0.01s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
INFO: Running command line: /usr/local/google/home/amerlan/.cache/bazel/_bazel_amerlan/83bd5c8264e6cd991cfadbc57544dd5d/external/envoy/tools/code_format/check_format.py --skip_envoy_build_rule_check --namespace_check Nighthawk '--build_fixer_check_excluded_paths=./../nighthawk' check ./../nighthawk
ERROR: From ./../nighthawk/test/mocks/common/mock_termination_predicate.h
ERROR: clang-format check failed for file: ./../nighthawk/test/mocks/common/mock_termination_predicate.h
ERROR: check format failed. run 'tools/code_format/check_format.py fix'
>**Note**: If there are privacy concerns, sanitize the data prior to
sharing.
Contributor guide
Assessment
This issue has not been assessed yet.