62 Commits

Author SHA1 Message Date
Craig Tiller 339906443b [clang-format] Match include file ordering to internal clang-format (#40905)
gRPC is currently getting formatted with two different clang-format implementations, and due to some weirdness they have different include file orderings. This change introduces clang-format configuration to ensure that the two systems align - it's *highly* expected that this will need some maintenance going forward as the two systems evolve.

Closes #40905

PiperOrigin-RevId: 819606209
2025-10-15 00:24:11 -07:00
Adam Heller f5ffef4d6b [test] Add PostMortem dumps on CHECK failures in test builds (#39945)
See `grpc_check.h`. This code  redefines the abseil `CHECK*` macros using custom gRPC macros when building tests. In `bazel test ...` builds, on check failure, `PostMortemEmit()` will dump state to the log before crashing.

Caveat: to prevent circular dependencies, code that `postmortem` relies on cannot use the custom gRPC CHECK macros. This is not much code, ~50 source files. grep for the `absl/log:check` bazel dependency.

Closes #39945

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/39945 from drfloob:grpc_check ca8e46718f2021e0df79aa67a3a0b0c751b3ce44
PiperOrigin-RevId: 807452496
2025-09-15 17:43:19 -07:00
Yash Tibrewal c637de558a [Cleanup] Avoid std::make_pair (#38636)
Maybe in some of these cases, `{}` would work instead of `std::pair`, but I'm just doing a simple find and replace here.

Closes #38636

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/38636 from yashykt:NoMakePair d819f6a74be2fb2859083436297f79ed3139a1b7
PiperOrigin-RevId: 722772621
2025-02-03 13:19:08 -08:00
Craig Tiller dbb5164ac7 [clang-format] Remove custom clang-format rules for include ordering (#37820)
Closes #37820

PiperOrigin-RevId: 682352913
2024-10-04 09:44:20 -07:00
Mark D. Roth f6c57b6384 [reorg] move a bunch of stuff to src/core/util (#36792)
The following files have been moved:
- src/core/lib/avl/*
- src/core/lib/backoff/*
- src/core/lib/debug/event_log*
- src/core/lib/iomgr/gethostname*
- src/core/lib/iomgr/grpc_if_nametoindex*
- src/core/lib/matchers/*
- src/core/lib/uri/* (renamed from uri_parser.* to uri.*)
- src/core/lib/gprpp/* (existing src/core/util/time.cc was renamed to gpr_time.cc to avoid conflict)

Closes #36792

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36792 from markdroth:reorg_util d4e8996f481c611ffbb06a8b04924ff81bc1bc2b
PiperOrigin-RevId: 676947640
2024-09-20 13:19:02 -07:00
Esun Kim a47d91c7b2 [Clean-up] Tidy fix (#37104)
Applied two clang 17 tidy fixes;

- https://clang.llvm.org/extra/clang-tidy/checks/readability/container-size-empty.html
- https://clang.llvm.org/extra/clang-tidy/checks/modernize/make-shared.html

Closes #37104

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37104 from veblush:fix-tidy 7b905869b819ac3bd6c45feed665e1f98a0585ca
PiperOrigin-RevId: 650815403
2024-07-09 18:08:10 -07:00
Tanvi Jagtap b4fa67a452 [Gpr_To_Absl_Logging] Remove unused declaration of gpr_default_log.
This was removed as a part of gpr to absl migration.

PiperOrigin-RevId: 643863973
2024-06-16 20:55:53 -07:00
Tanvi Jagtap 1dbfd4c9f2 [grpc][Gpr_To_Absl_Logging] Deleting multiple instances of gpr_set_log_function (#36833)
Deleting multiple instances of gpr_set_log_function .
This function will be deleted soon.
https://github.com/grpc/proposal/pull/425

Closes #36833

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36833 from tanvi-jagtap:remove_gpr_log_partial_code 17517efee4795eb6e5ff7670252e7329c9cf12d7
PiperOrigin-RevId: 641268299
2024-06-07 09:14:44 -07:00
Tanvi Jagtap 986428d252 [grpc][Gpr_To_Absl_Logging] Migrating from gpr to absl logging - gpr_log (#36636)
[grpc][Gpr_To_Absl_Logging] Migrating from gpr to absl logging - gpr_log
In this CL we are migrating from gRPCs own gpr logging mechanism to absl logging mechanism. The intention is to deprecate gpr_log in the future.

We have the following mapping

1. gpr_log(GPR_INFO,...) -> LOG(INFO)
2. gpr_log(GPR_ERROR,...) -> LOG(ERROR)
3. gpr_log(GPR_DEBUG,...) -> VLOG(2)

Reviewers need to check :

1. If the above mapping is correct.
2. The content of the log is as before.
gpr_log format strings did not use string_view or std::string . absl LOG accepts these. So there will be some elimination of string_view and std::string related conversions. This is expected.

Closes #36636

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36636 from tanvi-jagtap:regex_test_cpp f2cac9c5a49f8d6025989160b9d9d6954dc8cc2d
PiperOrigin-RevId: 634954173
2024-05-17 20:10:09 -07:00
Tanvi Jagtap 259f0e7903 [grpc][Gpr_To_Absl_Logging] Migrating from gpr to absl logging - GPR_ASSERT (#36222)
Replacing GPR_ASSERT with absl CHECK

Will not be replacing CHECK with CHECK_EQ , CHECK_NE etc because there are too many callsites.

This could be done using Cider-V once these changes are submitted if we want to clean up later. Given that we have 4000+ instances of GPR_ASSERT to edit, Doing it manually is too much work for both the author and reviewer.

<!--

If you know who should review your pull request, please assign it to that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the appropriate
lang label.

-->

Closes #36222

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36222 from tanvi-jagtap:assert_interop adcc660e78c74cc1f8257d9925b9ed1215dab4a8
PiperOrigin-RevId: 623366969
2024-04-09 21:32:34 -07:00
Craig Tiller 67f364e23e [cleanup] Eliminate usage of GRPC_ASSERT(false...); (#31757)
* crash function

* progress

* fix

* fix

* Automated change: Fix sanity tests

* fix

* fix

* fix

* fixes

* Automated change: Fix sanity tests

* fix

* Automated change: Fix sanity tests

* fix

* fix

* use cpp attr

* Automated change: Fix sanity tests

* fix

* fix

* fix

* fix

* fix

* fix

* add exclusion

* fix

* typo

* fix

* fmt

* Update tcp_socket_utils.cc

* Automated change: Fix sanity tests

* fix

* revert php changes

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-01-11 08:50:32 -08:00
Yijie Ma f99b8b5bc4 Convert c-style comments to C++-style comments (#31923)
* baseline

* fix clang-tidy

* manually revert these files

* manually fixup at eof

* revert 2 more files

* change check_deprecated_grpc++.py

* change end2end_defs.include template

* fix check_include_guards.py

* untrack tools/distrib/python/convert_cstyle_comments_to_cpp.py

not yet ready to be submitted

* fix

yapf check_include_guards.py
remove a space...

* fix version.cc.template

* fix version_info.h.template
2022-12-22 23:01:53 -08:00
Craig Tiller ea389c00c2 Adjust include order per style guide (#27175)
Introduce clang-format configuration to sort includes closer to our rules.
2021-09-08 12:14:44 -07:00
capstan 131579d52d Roll forward of commit 7883b51: Use abseil's flags in tests.
This replaces gflags. Added TODOs where use of `absl::Duration` or `absl::FlagSaver` might be preferred in follow-up cleanup. Fixes #24493.

This reverts commit da66b7d14e.

NEW:
* Adds references to `absl/flags/declare.h`, new to LTS 2020923.2 imported in commit 5b43440.
* Works around MSVC 2017 compiler error with large help text on flags by reducing the help text.
2020-11-06 16:07:19 +01:00
Nathan Herring da66b7d14e Revert "Abseil Flags" 2020-10-24 15:19:55 -07:00
capstan 7883b5133d Use abseil's flags in tests.
This replaces gflags. Added TODOs where use of `absl::Duration` or `absl::FlagSaver` might be preferred in follow-up cleanup. Fixes #24493.
2020-10-23 19:36:33 +02:00
Esun Kim aae4f4cf18 Fix by misc-unused-using-decls 2020-10-19 18:12:11 -07:00
Esun Kim 165ee5007a Replaced grpc::string with std::string 2020-06-29 17:56:36 -07:00
Esun Kim 415d41f9e8 Rerun clang-formatter-7 2020-03-03 10:46:55 -08:00
Jan Tattermusch 2b028c8cec do not use default server override for C++ interop client 2018-12-20 14:49:54 +01:00
ncteisen b6597b4fbd Add two new soak interop tests 2018-07-17 17:12:26 -07:00
Yihua Zhang 0dcbb83420 add alts to interop tests 2018-04-20 08:50:45 -07:00
Vijay Pai c90a85649b Change grpc++ references in names to grpcpp 2018-03-08 22:04:59 -08:00
ncteisen adbfbd5977 Remove all extern C 2017-11-17 14:08:57 -08:00
Craig Tiller 4ac2b8e585 Enable clang-tidy as a sanity check, fix up all known failures 2017-11-10 14:14:17 -08:00
Craig Tiller baa14a975e Update clang-format to 5.0 2017-11-03 09:09:36 -07:00
yang-g 53a64b9936 Properly clean up stress test clients 2017-10-04 12:36:49 -07:00
Jan Tattermusch 7897ae9308 auto-fix most of licenses 2017-06-08 11:22:41 +02:00
ncteisen 9c7a08d250 Simplify cpp stress flags 2017-01-18 16:58:33 -08:00
yang-g cc5910228d manual revert of #8901 2017-01-11 11:10:43 -08:00
Sree Kuchibhotla 7eef316e20 Fix metrics server 2016-12-16 11:30:35 -08:00
Craig Tiller 3b45b8d60b Revert "Test credentials provider update" 2016-11-29 12:31:14 -08:00
yang-g a7ef49bf6a Support custom credential type in interop 2016-11-23 10:55:03 -08:00
Vijay Pai 320ed13d3e Deprecate grpc::thread and sync in favor of std::thread,mutex,etc 2016-11-01 17:16:55 -07:00
Makarand Dharmapurikar f01f7b6d6c clang-format fixes 2016-10-21 09:07:06 -07:00
Makarand Dharmapurikar e3dd1d7d11 modify stress_test command line options
Modify command line options to be consistent with interop_client.
2016-10-20 10:37:39 -07:00
David Garcia Quintas c79b0650d2 removed codegen/log.h 2016-07-27 21:11:58 -07:00
Sree Kuchibhotla 5130427b30 Add remaining inteorp tests to stress client 2016-05-05 15:39:36 -07:00
Sree Kuchibhotla ad0f792254 Interop client that is resilient to server restarts 2016-05-05 15:39:36 -07:00
Sree Kuchibhotla 3714e302c0 Simplify QPS Metrics collection 2016-04-22 10:17:28 -07:00
Jan Tattermusch 8cddd87738 Merge pull request #6005 from sreecha/stress_exit_codes
Terminate with error exit code in case of any failure
2016-04-01 07:27:03 -07:00
Sree Kuchibhotla 16dd3e46e8 Reduce log verbosity of stress_test client by default. Correct a typo 2016-03-31 09:46:20 -07:00
Craig Tiller 6169d5f7b0 Update copyrights 2016-03-31 07:46:18 -07:00
Craig Tiller f40df23eeb Auto-changes 2016-03-25 13:38:14 -07:00
murgatroid99 3466c4b55d Updated copyrights 2016-01-12 10:26:04 -08:00
Craig Tiller 7cc0f464d1 Merge github.com:grpc/grpc into proto_names 2016-01-07 16:37:03 -08:00
Sree Kuchibhotla 0fa95eab81 Ability to filter log messages based on log level 2016-01-06 07:58:10 -08:00
Craig Tiller 1b4e33029e Consolidate C++ proto files under src/proto
- make the directory structure match the package structure
- sanitize the package structure (test --> testing)
- add auto-detection of proto file dependencies
2015-12-17 16:35:00 -08:00
Sree Kuchibhotla e1330ff451 Add multiple channels to each server 2015-11-20 10:03:32 -08:00
Sree Kuchibhotla 52a514a250 Address code review comments 2015-11-19 10:28:47 -08:00