110 Commits

Author SHA1 Message Date
Pawan Bhardwaj 76c81c27b0 [Cleanup] Remove workaround Apple CFStream bug from e2e tests (#41121)
<!--

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 #41121

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41121 from pawbhard:temp_check 185a3d8cc4f617d6df66d4f1adc738ef9a4b13f6
PiperOrigin-RevId: 838668301
2025-12-01 02:05:23 -08:00
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
Craig Tiller 66a137f1d7 [sanity] Restore it (#38869)
Closes #38869

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/38869 from ctiller:nubbins 972d734cdf45a4786de53c51b2ce8cf97a3d38ff
PiperOrigin-RevId: 731570368
2025-02-26 21:26:56 -08:00
Craig Tiller 07188632f4 Tiny formatting cleanups for portability
PiperOrigin-RevId: 731512282
2025-02-26 17:22:27 -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
Tanvi Jagtap ee5ccee552 [Gpr_To_Absl_Logging] Remove GRPC_API_TRACE (#37190)
[Gpr_To_Absl_Logging] Remove GRPC_API_TRACE .
This will be replaced by GRPC_TRACE_LOG

Closes #37190

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37190 from tanvi-jagtap:grpc_api_trace_fix 6dae72bc6e69cc5bef2fcc7b87fe4fdfa62e72f6
PiperOrigin-RevId: 652397141
2024-07-15 01:29:59 -07:00
Tanvi Jagtap 154081a92a [grpc][Gpr_To_Absl_Logging] Migrating from gpr to absl logging - gpr_log (#36678)
[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 #36678

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36678 from tanvi-jagtap:test_cpp_gpr_log 81b8f4179f6111b902cbed9eb65ef6f41eb1e32d
PiperOrigin-RevId: 636410944
2024-05-22 21:59:06 -07:00
Mark D. Roth 0944410d6c [reorg] move test/core/util -> test/core/test_util (#36446)
Closes #36446

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36446 from markdroth:reorg_test 5dcc85e006581a8fc52a3a914baa5f33e4a21589
PiperOrigin-RevId: 629229220
2024-04-29 17:06:40 -07:00
Craig Tiller 135f6e84b6 [flake] Remove inproc thread stress tests (#32283)
These tests are failing because they're running with too few threads,
however if we give them sufficient threads to catch bugs they're flaky.

Remove them and get the team some bandwidth back.
2023-02-07 08:58:41 -08:00
Craig Tiller 439c7518a3 [thread_stress_test] reduce thread count to a reasonable number (#32263) 2023-02-01 12:16:18 -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
Cheng-Yu Chung e9b287997a Remove include/grpcpp/impl/codegen/sync.h (#31545)
* Remove `include/grpcpp/impl/codegen/sync.h`

* Fix sanity tests
2022-11-22 13:45:53 -05:00
Esun Kim 250f9fc026 Revived google-readability-casting (#31607)
* Added google-readability-casting

* Fix

* Use brace init for constants

* more

* Fix

* Fix 2

* More fix

* Fixf
2022-11-11 16:44:37 -08:00
Esun Kim 530b702259 Update Clang 15 (#31518)
* clang-15

* iwyu

* run clang_format_code

* Clang-Tidy config

* Fix misc-unused-using-decls

* Fixed performance-inefficient-vector-operation

* Sanity
2022-11-04 09:08:03 -07:00
Craig Tiller c2ab8c99bb Revert "Revert "[c++] Move environment functions to C++ (#30937)" (#30986)" (#30988)
This reverts commit 96264e07b8.
2022-09-14 14:19:36 -07:00
Craig Tiller 96264e07b8 Revert "[c++] Move environment functions to C++ (#30937)" (#30986)
This reverts commit 74c0d6fe3f.
2022-09-14 11:53:55 -07:00
Craig Tiller 74c0d6fe3f [c++] Move environment functions to C++ (#30937)
* [gprpp] Move env to C++

* move headers/impl

* Automated change: Fix sanity tests

* fix

* fix

* Automated change: Fix sanity tests

* Update http_proxy.cc

* fix

* fix

* rename

* fix merge

* fix

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-09-14 10:17:15 -07:00
Esun Kim 98b1a7710e Changed num_threads based on slowness factor for xSAN (#30240)
* Changed num_threads

* Update by review

* Update by review
2022-07-11 14:47:55 -07:00
AJ Heller 18a8f6aad9 Refactor end2end tests to exercise each EventEngine (#29202)
* Refactor end2end tests to exercise each EventEngine

* fix incorrect bazel_only exclusions

* Automated change: Fix sanity tests

* microbenchmark fix

* sanitize, fix iOS flub

* Automated change: Fix sanity tests

* iOS fix

* reviewer feedback

* first pass at excluding EventEngine test expansion

Also caught a few cases where we should not test pollers, but should
test all engines. And two cases where we likely shouldn't be testing
either product.

* end2end fuzzers to be fuzzed differently via EventEngine.

* sanitize

* reviewer feedback

* remove misleading comment

* reviewer feedback: comments

* EE test_init needs to play with our build system

* fix golden file test runner

Co-authored-by: drfloob <drfloob@users.noreply.github.com>
2022-03-30 15:43:05 -07:00
AJ Heller 85189b24bb Reintroduce: Avoid fully qualifying namespaces (and add check) (#28917)
Based on a handful of https://abseil.io/tips, it's generally advised to
only fully-qualify namespaces when in a `using` statement, or when it's
otherwise required for compilation. In all other cases, the general
recommendation is to not fully-qualify.

This change fixes most `grpc.*` namespace uses. There are potential
challenges in trying to make blanket changes to non-gRPC namespace uses,
such as `::testing`, since there is also a `grpc::testing` namespace.
2022-02-18 16:18:54 -08:00
AJ Heller e72a5fe5dd Revert "Avoid fully qualifying namespaces (and add check) (#28901)" (#28916)
This reverts commit fc7314c701.
2022-02-17 17:56:19 -08:00
AJ Heller fc7314c701 Avoid fully qualifying namespaces (and add check) (#28901)
Based on a handful of https://abseil.io/tips, it's generally advised to
only fully-qualify namespaces when in a `using` statement, or when it's
otherwise required for compilation. In all other cases, the general
recommendation is to not fully-qualify.

This change fixes most `grpc.*` namespace uses. There are potential
challenges in trying to make blanket changes to non-gRPC namespace uses,
such as `::testing`, since there is also a `grpc::testing` namespace.
2022-02-17 16:23:25 -08:00
Oscar Shi e0a5c310cd Increase number of threads in stress test (#28821)
In some configurations 100 threads is not enough to cause exhaustion failing tests.

Increase number of threads to ensure resource exhaustion
2022-02-15 13:58:01 +01: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
Esun Kim 2ff84ed8c2 C++ cast for void* 2020-11-30 17:29:15 -08:00
Mark D. Roth 27e1c1c56d clang-tidy: enable google-readability-braces-around-statements 2020-11-06 13:41:44 -08: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
Vijay Pai b484e40e08 TYPED_TEST_CASE (deprecated) -> TYPED_TEST_SUITE 2019-10-17 17:18:14 -07:00
Vijay Pai 30f1230c10 Remove unused parameter warning (16 of 20) 2019-10-17 08:51:55 -07:00
Prashant Jaikumar 9f02fc7f91 Enable end2end C++ tests on iOS.
Some e2e tests were disabled on iOS because they hit the Apple CFStream bug.
This commit enables e2e tests and works around the Apple bug by disabling CFStream.
2019-09-05 13:43:45 -07:00
Karthik Ravi Shankar 60bdeef9f4 Move Channel also to impl for now 2019-04-23 14:03:06 -07:00
Karthik Ravi Shankar 603d014f0e Changes to fold credentials into grpc_impl from grpc 2019-04-23 13:54:26 -07:00
Soheil Hassas Yeganeh 2b9448a71c Revert "Revert "Introduce C++ wrappers for gpr_mu and gpr_cv.""
This reverts commit d09c9f8e20.
2019-04-17 14:35:29 -04:00
Alexander Polcyn d09c9f8e20 Revert "Introduce C++ wrappers for gpr_mu and gpr_cv."
This reverts commit a26c09dd25.
2019-04-11 16:52:54 -07:00
Soheil Hassas Yeganeh a26c09dd25 Introduce C++ wrappers for gpr_mu and gpr_cv.
Introduce RAII wrappers in the grpc::internal and grpc_core
namespaces, and use them in place of std::mutex and
std::condition_variable.

Note that, since std::mutex is also used by the public
C++ headers we cannot introduce these wrappers in grpc_core.

Also, note that in grpcpp we cannot use gRPC core and vice versa.
So we had to duplicate the code, once using core_codegen_interface
and once using direct calls.
2019-04-08 18:27:07 -04:00
Karthik Ravi Shankar b3889585a1 Revert "Moving ::grpc::ResourceQuota to ::grpc_impl::ResouceQuota" 2019-03-12 12:25:38 -07:00
Karthik Ravi Shankar f7dd48b2b6 Moving ::grpc::ResourceQuota to ::grpc_impl::ResouceQuota
This change moves ResourceQuota class fron grpc namespace to grpc_impl
namespace.
2019-03-06 10:12:23 -08:00
yang-g e75fc243da change tests to use the new class instead of grpc_test_init 2018-11-30 08:57:38 -08:00
Vijay Pai 16f738359d Make sure that we actually saw some resource exhaustion if applicable 2018-08-15 16:30:59 -07:00
Vijay Pai 14ad82a76d Create a new method handler for resource exhaustion and tie into thread mgr 2018-08-14 16:23:21 -07:00
Noah Eisen 58e0cbf9fb Enable the performance-* clang-tidy checks 2018-06-14 14:58:09 -04:00
Vijay Pai c90a85649b Change grpc++ references in names to grpcpp 2018-03-08 22:04:59 -08:00
Vijay Pai da69355f30 C++ize gpr_thread as grpc_core::Thread, make it 2-phase init (construct/Start) 2018-02-19 22:39:58 -08:00
Vijay Pai c745690caf Internalize gpr_thd except for id and currentid 2018-02-12 11:44:52 -08:00
Noah Eisen be82e64b3d Autofix c casts to c++ casts 2018-02-09 09:16:55 -08:00
Jan Tattermusch c9ec2c0888 Revert "Stop using std::thread in C++ library since it can trigger exceptions" 2018-01-12 10:16:22 +01:00
Vijay Pai 5dd32268be Switch C++ sync server to use gpr_thd rather than std::thread and provide resource exhaustion mechanism 2018-01-08 10:02:38 -08:00
Vijay Pai 4afcf5b566 Remove unused code from thread_stress_test 2017-11-01 10:44:01 -07:00