Commit Graph

186 Commits

Author SHA1 Message Date
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
58a4b9c922 [reorg] move src/core/lib/gpr -> src/core/util (#36543)
Closes #36543

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36543 from markdroth:reorg_util_gpr ba84e186beb1ec50d09bcf91ebd16e88b8e225aa
PiperOrigin-RevId: 634113744
2024-05-15 16:32:20 -07:00
AJ Heller
bc5570bec8 Revert "[grpc][Gpr_To_Absl_Logging] Migrating from gpr to absl logging - BUILD (#36607)" (#36625)
This reverts commit 15850972dd.

Breaks the bazel distribtests. https://source.cloud.google.com/results/invocations/da317d7c-5240-445f-8953-68a840ccc892/targets/%2F%2Ftools%2Fbazelify_tests%2Ftest:bazel_distribtest_6.5.0_buildtest/log

Closes #36625

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36625 from drfloob:revert-36607 395191f9c700e9b5206cef3bb44d875924602898
PiperOrigin-RevId: 633995522
2024-05-15 10:18:57 -07:00
Tanvi Jagtap
15850972dd [grpc][Gpr_To_Absl_Logging] Migrating from gpr to absl logging - BUILD (#36607)
[grpc][Gpr_To_Absl_Logging] Migrating from gpr to absl logging - BUILD
In this CL we are just editing the build and bzl files to add dependencies.
This is done to prevent merge conflict and constantly having to re-make the make files using generate_projects.sh for each set of changes.

Closes #36607

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36607 from tanvi-jagtap:build_test_cpp 3e17d778d03272cd51da86baa38b67f77760735c
PiperOrigin-RevId: 633523097
2024-05-14 03:37:04 -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
Tanvi Jagtap
30386413c0 [grpc][Gpr_To_Absl_Logging] Migrating from gpr to absl logging GPR_ASSERT (#36438)
[grpc][Gpr_To_Absl_Logging] Migrating from gpr to absl logging GPR_ASSERT
Replacing GPR_ASSERT with absl CHECK

These changes have been made using string replacement and regex.

Will not be replacing all instances of CHECK with CHECK_EQ , CHECK_NE etc because there are too many callsites. Only ones which are doable using very simple regex with least chance of failure will be replaced.

Given that we have 5000+ 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 #36438

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36438 from tanvi-jagtap:tjagtap_cpp 405efd63c33aaef551368578c06d01eb85e2a629
PiperOrigin-RevId: 628281347
2024-04-25 21:03:38 -07:00
ericsalo
a6823b6e97 Fix deprecation warnings from upb (#35510)
Replace "upb:collections" with "upb:message"
Replace "upb/collections" with "upb/message"
Replace "upb:upb" with "upb:mem" and/or "upb:base"
Replace "upb/upb.hpp" with "upb/mem/arena.hpp" and/or "upb/base/status.hpp"

Closes #35510

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35510 from ericsalo:master 112392a050489f59f91aa6db78e14408db75d98e
PiperOrigin-RevId: 597872730
2024-01-12 10:15:56 -08:00
Craig Tiller
c9df0ca470 [cpp] Reland removal of channel_filter code (#34598)
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-10-12 09:44:11 -07:00
Craig Tiller
7b17e4aa92 Revert "[cpp] Remove legacy channel filter C++ wrapper" (#34541)
Reverts grpc/grpc#34522
2023-09-28 22:29:53 -07:00
Craig Tiller
727c92a15c [cpp] Remove legacy channel filter C++ wrapper (#34522)
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-09-28 20:59:56 -07:00
AJ Heller
0d5dc5c45b [EventEngine] C++ Alarm migration and PosixEventEngine performance enhancements (#34056)
This PR is mainly a set of improvements that allow the C++ Alarm to be
migrated away from legacy iomgr. It cannot be landed without significant
speedup, due to third-parties relying on a fast path for immediate timer
execution with deadlines <= now.

Previous EventEngine performance of bm_alarm, compared to baseline iomgr
timers: *0.014%*
This PR: *2.5%*

Regarding previous failures to land this change: The cloud libraries
team agreed to reduce the amount of stress in their alarm stress test
https://github.com/googleapis/google-cloud-cpp/pull/12378
2023-08-16 11:54:04 -07:00
Yijie Ma
f2bcdf3bbc Add a test case for infinite past or unix epoch expiry in alarm_test.cc (#32101)
* initial commit

* review
2023-01-18 11:09:17 -08: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
Cheng-Yu Chung
7e3ada34e6 Clean up the TODO item in build target grpc_base -- part closure (#31001)
* Clean up the TODO item in build target `grpc_base` part `closure`

* Update

* Update

* Revert "Update"

This reverts commit daf31183903b3f3c2350d9d30b327869b1c7ec0b.

* Update

* Update

* Automated change: Fix sanity tests
2022-11-18 18:35:22 -05:00
Esun Kim
0ba0c4bf74 Added googletest clang-tidy checks (#31610)
* Added google-googletest

* Autofix

* Fix test names

* Fix
2022-11-18 13:02:20 -08: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
Craig Tiller
a23eae84c9 Revert "[flakes] Update flakiness (#31121)" (#31173)
This reverts commit bdc799af73.
2022-09-29 14:06:44 -07:00
Craig Tiller
bdc799af73 [flakes] Update flakiness (#31121)
* update

* Automated change: Fix sanity tests

* fix

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-09-29 11:04:22 -07:00
Esun Kim
d43511f4af Removed GRPC_ERROR_NONE (#31131) 2022-09-27 23:17:39 -07:00
Craig Tiller
1ad4bbe78e Revert "fix (#31018)" (#31021)
This reverts commit 2e6f268dfc.
2022-09-21 09:28:28 -07:00
Craig Tiller
2e6f268dfc fix (#31018) 2022-09-16 12:41:08 -07:00
Craig Tiller
96f5cddb5f [time] Introduce time sources (#30815)
* [time] Introduce time sources

* make import trivial

* Automated change: Fix sanity tests

* fix

* Automated change: Fix sanity tests

* fix

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* review feedback

* fix

* Automated change: Fix sanity tests

* ios fix

* fix

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-09-15 21:41:04 -07:00
Craig Tiller
f573fd44f9 [test] Semi-automatic flaky test tracking (#30638)
* [test] Semi-automatic flaky test tracking

* fix

* Automated change: Fix sanity tests

* Update update_flakes.py

* fix formatting

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-08-19 16:22:31 -07:00
Vignesh Babu
f0a2b3d660 Fix flakiness in //test/cpp/common:timer_test (#30606) 2022-08-16 18:08:55 -07:00
Craig Tiller
05e6bf2e4a [build] Add test/core/util, test/core/event_engine to auto build deps (#30364)
* [build] Add test/core/util, test/core/event_engine to auto build deps

* deal with suppressions

* fix suppressions

* Automated change: Fix sanity tests

* fix

* fix

* fix

* fix

* progress

* Automated change: Fix sanity tests

* fix

* fix

* fix

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-07-25 21:59:25 -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
Craig Tiller
5fc3ff8203 grpc_millis -> Timestamp/Duration (#28119)
* wip

* Automated change: Fix sanity tests

* fixes

* progress

* progress

* grpc compiles

* Automated change: Fix sanity tests

* fixing tests

* x

* progress

* better code

* Automated change: Fix sanity tests

* progress

* progress

* windows fix

* Make Duration metadata trivial

* better message

* fix

* Automated change: Fix sanity tests

* fix

* fix

* fix

* fix

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* fix

* progress

* fixes

* fix

* fix

* spam

* un-disable errantly disabled tests

* gain insight

* Automated change: Fix sanity tests

* fixes

* fixes

* fix

* debug

* tweak

* fix

* fix timeout

* fix comment

* fixes

* x

* better test

* tests

* Automated change: Fix sanity tests

* missed file

* fix

* x

* fix

* fix

* fix

* fix

* Automated change: Fix sanity tests

* fix

* merge

* Automated change: Fix sanity tests

* fix

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-03-01 11:34:05 -08:00
Esun Kim
c08eb4fc41 Attempt to upgrade upb to the latest (#28685)
* Update upb to 85e5c76cb7098d3ae35e575d652a40568013a149

* Update grpc_deps.bzl

* Run gen_upb_api.sh

* Run run_sed.sh

* Update gen_build_yaml.py

* Regen projects

* Reformat

* Update third_party/upb to 950cdab42fe4c83f06a2be46eeb46a068e486eed

* Update third_party/upb to c9c31241bc39922b092a81d192badd50cccaaa81

* Update src/upb/gen_build_yaml.py

* Generated projects

* Update third_party/upb to a02d92e0257a35f11d4a58b6a932506cbdbb2f29

* Patching in https://github.com/protocolbuffers/upb/pull/524

* Sed script went too far.

Co-authored-by: Nicolas 'Pixel' Noble <nicolas@nobis-crew.org>
2022-02-28 09:26:31 -08:00
Richard Belleville
468768865b Make Buildifier Sanity Test Strict (#27807)
* Fix all lint errors in repo.

* Use strict buildifier by default

* Whoops. That file does not exist

* Attempt fix to buildifier invocation

* Add missing copyright
2021-11-03 14:57:04 -07:00
Craig Tiller
d1e01ac139 Add a test for a (now-illegal) build file construct (#27602)
* Add a test for a (now-illegal) build file construct

* add to test suite!

* fix

* fix

* fix syntax
2021-10-06 07:43:59 -07:00
Craig Tiller
b669a3c521 Revert "Revert "a useful change (#27381)" (#27411)" (#27412)
This reverts commit 5db17f7350.
2021-09-20 19:46:11 -07:00
Craig Tiller
5db17f7350 Revert "a useful change (#27381)" (#27411)
This reverts commit 11eb70bbed.
2021-09-20 10:30:59 -07:00
Craig Tiller
11eb70bbed a useful change (#27381)
* a useful change

* Automated change: Fix sanity tests

* fix

* fix

* QsortCompare it is!

* Automated change: Fix sanity tests

* add missing header

* clang-tidy fixes, tweak clamp to only use <

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2021-09-20 09:13:27 -07: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
Craig Tiller
03bdfa4a74 Make socket mutators work for server connections (#26328)
* Make socket mutators work for server connections

* compile fix

* compile fix

* compile fix

* compile fix

* cleanup

* Revert "cleanup"

This reverts commit 480fcc600a48a2ab0a5f36eb0e701ecc3f3764ce.

* Revert "Revert "cleanup""

This reverts commit 29fbc349d2a43b971d134f829647b99c1d9216d2.
2021-06-23 14:40:35 -07:00
Vijay Pai
8aff94558c De-experimentalize C++ callback API (#25728)
* De-experimentalize callback API

* Make FromServerContext based on ServerContextBase

* Fix lambda

* Fix headers

* De-experimentalize tests

* clang-format

* Fix consistency checks

* wip

* Fix const-ness of callback client read RPC requests

* Fix golden file

* Give full route_guide callback client example with Hold etc

* Complete example route-guide server

* De-experimentalize test services

* Omit unneeded using

* Remove some uses of non-experimental macro from test

* clang-format examples

* De-experimentalize async stub calls

* Remove experimental namespace use in qps, ubms

* De-experimentalize alarms, generic stubs, and context allocator

* De-experimentalize SetContextAllocator

* clang-format

* Fix conflicts

* Leave obsolete API in place until users can be migrated
2021-05-27 14:55:25 -07:00
Esun Kim
ca945a58e9 Introduced grpc_error_handle (#25902)
- Define grpc_error_handle
- Replace grpc_error* with grpc_error_handle
2021-04-22 12:00:28 -07:00
donnadionne
1835f00ef1 Revert "Revert "Made grpc_core::Mutex compatible to absl::Mutex" (#25537)" (#25549)
This reverts commit 8e268dcec8.
2021-02-24 16:49:34 -08:00
donnadionne
8e268dcec8 Revert "Made grpc_core::Mutex compatible to absl::Mutex" (#25537)
* Revert "Made grpc_core::Mutex compatible to absl::Mutex"

This reverts commit 0b53341328.

* Revert "Added thread annotation (#25486)"

This reverts commit 9d897cb1a5.

* Revert "Fix a race in resolve_address and resolve_address_posix tests"

This reverts commit 6d8e7d3819.

* Restore 25398

* restore 25398
2021-02-24 10:32:49 -08:00
Esun Kim
0b53341328 Made grpc_core::Mutex compatible to absl::Mutex 2021-02-10 09:56:55 -08:00
Esun Kim
6dc1748f6c Revert "Made grpc_core::Mutex compatible to absl::Mutex" 2021-02-10 07:53:02 -08:00
Esun Kim
6a1518bd22 Made grpc_core::Mutex compatible to absl::Mutex 2021-02-08 16:15:53 -08:00
Esun Kim
e0d8c498a6 C++ cast for others 2020-11-30 17:36:21 -08:00
Esun Kim
8e9e895ffc Replace grpc_shutdown_blocking with grpc_shutdown 2020-10-08 10:57:05 -07:00
Jan Tattermusch
afda101854 cleanup bazel commands in test scripts (for non-RBE invocations) 2020-08-20 12:22:09 +02:00
ZhenLian
5438a00d38 fix MSAN error 2020-08-15 20:11:21 -07:00
ZhenLian
0cdc36f64f ALTS peer attributes plumbing 2020-08-14 17:27:57 -07:00
Esun Kim
165ee5007a Replaced grpc::string with std::string 2020-06-29 17:56:36 -07:00
Mark D. Roth
cc6414893c update bazel build dep, regenerate upb files, and add missing includes 2020-06-02 14:48:50 -07:00