[CI] clang format (/ci/do_ci.sh) result differs between local run and CI run

Aperta
#1,003 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
cpp
Ambito
ci-cd, tooling

Direzione di ricerca

Inizia con /ci/do_ci.sh e l’output di check_format, quindi confronta l’ambiente di formattazione utilizzato localmente e in CI. Riproduci la discrepanza con test/mocks/common/mock_termination_predicate.h usando fix_format e check_format, e ispeziona il commit indicato per individuare la formattazione diversa. È completato quando lo stesso risultato di formattazione supera sia i controlli locali sia quelli di CI.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

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.

Lingua principale
C++
Stelle
420
Fork
99
Merge medio
2g 14h
PR unite (30g)
17

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di envoyproxy/nighthawk

Tutte le issue di envoyproxy/nighthawk

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.