Commit Graph

681 Commits

Author SHA1 Message Date
GitHub Actions 7128a4ef7f Update artifacts branch 2026-01-08 07:01:20 +00:00
GitHub Actions 81fe81dfa2 Update artifacts branch 2024-10-04 16:46:18 +00:00
Yousuk Seung 568fbfff8c [generic API] separate callback from cq in generic stub/service (#36447)
See https://github.com/grpc/proposal/pull/426

<!--

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

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36447 from yousukseung:generic-stub-service-refactor 1cc0cbdc4b74450f631115fefc254976383eb816
PiperOrigin-RevId: 642774012
2024-06-12 16:22:17 -07:00
Craig Tiller 32a0218e6e [log] Use ABSL_ prefixed version of LOG/CHECK macros in the include/ tree (#36819)
We should separately add a lint to ensure no new usage slips in.

Closes #36819

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36819 from ctiller:absl 61207b02f45a6abf0d4d0ccba118a1c011586708
PiperOrigin-RevId: 640572209
2024-06-05 10:38:21 -07:00
Tanvi Jagtap 3eb1b1cf69 [grpc][Gpr_To_Absl_Logging] Migrating from gpr to absl logging - gpr_log (#36713)
[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 #36713

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36713 from tanvi-jagtap:src_core_lib_misc_gpr_log 0a36bebcbc2577cd653e466ed9f4d3c86cab6ccc
PiperOrigin-RevId: 639729711
2024-06-03 04:22:01 -07:00
Esun Kim c9df35a4d1 [Clean-up] Fix MSAN and UBSAN issues found by clang-19 (#36707)
Fixed various MSAN and UBSAN issues found in an attempt to bump the clang version used for RBE. (https://github.com/grpc/grpc/pull/36685) As our xSAN tests are using RBE, it revealed a few new issues. This PR is to fix all of those.

Closes #36707

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36707 from veblush:fix-xsan ebbebc2d4e47f05ad2a406cdae6b0f603ac5242f
PiperOrigin-RevId: 636685138
2024-05-23 14:56:20 -07:00
Tanvi Jagtap 3890766adf [grpc][Gpr_To_Absl_Logging] Migrating from gpr to absl logging GPR_ASSERT (#36452)
[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 #36452

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36452 from tanvi-jagtap:tjagtap_include_grpc 08e612fccdf817db8dfce268a26343a9595d0843
PiperOrigin-RevId: 628318595
2024-04-26 00:42:19 -07:00
Craig Tiller 83a17ff468 [clang-format] Remove requirement that port_platform.h is at the top (#36275)
Closes #36275

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36275 from ctiller:port_platform-include-grpcpp-impl-clang-format 89c43491d0ff4385c24c235854ab220d923307b1
PiperOrigin-RevId: 623178498
2024-04-09 09:08:28 -07:00
Craig Tiller 2bcca152cf [clang-format] Remove requirement that port_platform.h is at the top (#36277)
Closes #36277

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36277 from ctiller:port_platform-include-grpcpp-impl-codegen-clang-format 2670fb8c35ef741c778abd2338fea826b4cfe224
PiperOrigin-RevId: 623176416
2024-04-09 08:48:02 -07:00
AJ Heller 3d82c522fa [EventEngine] Refactor ServerCallbackCall to use EventEngine::Run (#36126)
This removes two Executor::Run dependencies, and requires that all ServerCallbackCall implementations implement the new `RunAsync` method. There's one other known other implementation of ServerCallbackCall that will need to be updated.

We could also support an "inefficient" path that uses the default engine (not implemented here), for all subclasses that do not want to update. As far as anyone is aware, the ServerCallbackCall class was never intended to be subclassed externally.

Closes #36126

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36126 from drfloob:server-callback-on-ee 6242a78a3f6d5cd290e02e9d3ab83e1b00152524
PiperOrigin-RevId: 619621598
2024-03-28 17:34:00 +00:00
Mike Kruskal db51a3f69a Mark grpc generators for editions support.
Edition 2023 makes no changes to method/service descriptors, so these should be unaffected and already supported.

PiperOrigin-RevId: 615832918
2024-03-14 10:52:00 -07:00
Tanvi Jagtap 58300b9d1f Adding clang format file to each folder (#35727)
<!--

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

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35727 from tanvi-jagtap:tjagtap_2024_01_29_formatting_1005 b92d064158884a535e66863ea5d99140453b690e
PiperOrigin-RevId: 602963496
2024-01-31 00:58:09 -08:00
Tanvi Jagtap 00a35e24e5 Adding clang format file to each folder (#35736)
<!--

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

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35736 from tanvi-jagtap:tjagtap_formatting_1006 3a0a4125cf55392ddf2c7eccc86c0b5ce2ddaa6d
PiperOrigin-RevId: 602601007
2024-01-29 21:55:59 -08:00
Craig Tiller 4e666c740b Internal change
PiperOrigin-RevId: 590780731
2023-12-13 20:06:30 -08:00
Tanvi Jagtap 8019903a44 Internal configuration cleanup
PiperOrigin-RevId: 590528536
2023-12-14 03:42:30 +00:00
h-vetinari 2d1595c9af [Build] Shared builds on windows (#34103)
Towards https://github.com/grpc/grpc/issues/33032,

Reopen after botched force-push in #33175 that then got "merged" and
cannot be reopened anymore.

More context in that PR.

---------

Co-authored-by: Isuru Fernando <isuruf@gmail.com>
Co-authored-by: David Chamberlin <david.chamberlin@ln.email.gs.com>
2023-09-12 09:12:36 -07:00
Craig Tiller 76bd606bae [build] Make GRPC_MUST_USE_RESULT default backed by nodiscard (#33742)
Going forward `[[nodiscard]]` is the portable way to spell this;
requires yanking a bunch of usage from after the param list to before.

We should further refine the GRPC_MUST_USE_RESULT macro to make it work
uniformly for any compilers that it doesn't today (most likely by making
it expand to nothing).

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-07-18 15:23:46 -07:00
Esun Kim c523bdac1e [C++] Added a cord support to gRPC protobuf serializer (#32617)
As Protobuf is going to support Cord to reduce memory copy when
[de]serializing Cord fields, gRPC is going to leverage it. This
implementation is based on the internal one but it's slightly modified
to use the public APIs of Cord. only
2023-04-19 08:55:25 -07:00
Jan Tattermusch 0f1afec5a8 [protobuf] Upgrade third_party/protobuf to 22.x (#32606)
The very non-trivial upgrade of third_party/protobuf to 22.x
This PR strives to be as small as possible and many changes that were
compatible with protobuf 21.x and didn't have to be merged atomically
with the upgrade were already merged.
Due to the complexity of the upgrade, this PR wasn't created
automatically by a tool, but manually. Subsequent upgraded of
third_party/protobuf with our OSS release script should work again once
this change is merged.

This is best reviewed commit-by-commit, I tried to group changes in
logical areas.

Notable changes:
- the upgrade of third_party/protobuf submodule, the bazel protobuf
dependency itself
- upgrade of UPB dependency to 22.x (in the past, we used to always
upgrade upb to "main", but upb now has release branch as well). UPB
needs to be upgraded atomically with protobuf since there's a de-facto
circular dependency (new protobuf depends on new upb, which depends on
new protobuf for codegen).
- some protobuf and upb bazel rules are now aliases, so `
extract_metadata_from_bazel_xml.py` and `gen_upb_api_from_bazel_xml.py`
had to be modified to be able to follow aliases and reach the actual
aliased targets.
- some protobuf public headers were renamed, so especially
`src/compiler` needed to be updated to use the new headers.
- protobuf and upb now both depend on utf8_range project, so since we
bundle upb with grpc in some languages, we now have to bundle utf8_range
as well (hence changes in build for python, PHP, objC, cmake etc).
- protoc now depends on absl and utf8_range (previously protobuf had
absl dependency, but not for the codegen part), so python's
make_grpcio_tools.py required partial rewrite to be able to handle those
dependencies in the grpcio_tools build.
- many updates and fixes required for C++ distribtests (currently they
all pass, but we'll probably need to follow up, make protobuf's and
grpc's handling of dependencies more aligned and revisit the
distribtests)
- bunch of other changes mostly due to overhaul of protobuf's and upb's
internal build layout.

TODOs:
- [DONE] make sure IWYU and clang_tidy_code pass
- create a list of followups (e.g. work to reenable the few tests I had
to disable and to remove workaround I had to use)
- [DONE in cl/523706129] figure out problem(s) with internal import

---------

Co-authored-by: Craig Tiller <ctiller@google.com>
2023-04-12 18:43:58 +02:00
Yousuk Seung 6b31b8d346 Add MakeChannelArgumentOption() for void* (#32096) 2023-01-13 17:15:30 -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 1b05576aa3 [cleanups] Clean up GrpcLibraryInitializer (#31894)
* Clean up `GrpcLibraryInitializer`

* Update

* Automated change: Fix sanity tests
2022-12-17 01:08:35 +08:00
Cheng-Yu Chung e28419f1f9 [cleanups] Remove class CoreCodegen and g_core_codegen_interface (#31875)
* Delete `g_core_codegen_interface`

* Automated change: Fix sanity tests

* Fix

* Update
2022-12-14 23:47:13 +08:00
Cheng-Yu Chung 9a7e77318b [cleanups] Remove include/grpc/impl/codegen/grpc_types.h (#31835)
* Remove `include/grpc/impl/codegen/grpc_types.h`

* Automated change: Fix sanity tests

* Fix typo

* Automated change: Fix sanity tests
2022-12-14 02:29:17 +08:00
Cheng-Yu Chung f03304b963 [cleanups] Remove functions in class CoreCodegen (#31837)
* Clean up `assert_fail()`

* Clean up `ok()` and `cancel()`

* Automated change: Fix sanity tests
2022-12-13 09:37:48 +08:00
Cheng-Yu Chung 2e9e6439f8 Remove include/grpc/impl/codegen/connectivity_state.h (#31728)
* Remove `include/grpc/impl/codegen/connectivity_state.h`

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests
2022-12-12 18:03:33 +08:00
Cheng-Yu Chung 4e90f43a75 Remove functions in class CoreCodegen (#31796)
* Update include

* Clean up `grpc_empty_slice()`

* Clean up `grpc_slice_malloc()`

* Clean up `grpc_slice_unref()`

* Clean up `grpc_slice_ref()`

* Clean up `grpc_slice_split_tail()`

* Clean up `grpc_slice_split_head()`

* Clean up `grpc_slice_sub()`

* Clean up `grpc_slice_buffer_add()`

* Clean up `grpc_slice_buffer_add_indexed()`

* Clean up `grpc_slice_buffer_pop()`

* Clean up `grpc_slice_from_static_buffer()`

* Clean up `grpc_slice_from_copied_buffer()`

* Clean up `grpc_metadata_array_init()`

* Clean up `grpc_metadata_array_destroy()`

* Clean up `gpr_inf_future()`

* Clean up `gpr_time_0()`
2022-12-07 18:55:47 +08:00
Cheng-Yu Chung 1d968a36aa Remove functions in class CoreCodegen (#31767)
* Clean up `grpc_byte_buffer_copy()`

* Clean up `grpc_byte_buffer_destroy()`

* Clean up `grpc_byte_buffer_length()`

* Clean up `grpc_byte_buffer_reader_init()`

* Clean up `grpc_byte_buffer_reader_destroy()`

* Clean up `grpc_byte_buffer_reader_next()`

* Clean up `grpc_byte_buffer_reader_peek()`

* Clean up `grpc_raw_byte_buffer_create()`

* Clean up `grpc_slice_new_with_user_data()`

* Clean up `grpc_slice_new_with_len()`

* Clean up `grpc_call_start_batch()`

* Clean up `grpc_call_cancel_with_status()`

* Clean up `grpc_call_failed_before_recv_message()`

* Clean up `grpc_call_ref()`

* Clean up `grpc_call_unref()`

* Clean up `grpc_call_error_to_string()`

* Fix typos

* Automated change: Fix sanity tests
2022-12-03 05:27:42 +08:00
Cheng-Yu Chung 024a0f7388 Remove functions in class CoreCodegen (#31751)
* Clean up `grpc_completion_queue_factory_lookup()`

* Clean up `grpc_completion_queue_create()`

* Clean up `grpc_completion_queue_create_for_next()`

* Clean up `grpc_completion_queue_create_for_pluck()`

* Clean up `grpc_completion_queue_shutdown()`

* Clean up `grpc_completion_queue_destroy()`

* Clean up `grpc_completion_queue_pluck()`

* Clean up `gpr_malloc()`

* Clean up `gpr_free()`

* Clean up `grpc_init()`

* Clean up `grpc_shutdown()`

* Clean up `gpr_mu_init()`

* Clean up `gpr_mu_destroy()`

* Clean up `gpr_mu_lock()`

* Clean up `gpr_mu_unlock()`

* Clean up `gpr_cv_init()`

* Clean up `gpr_cv_destroy()`

* Clean up `gpr_cv_wait()`

* Clean up `gpr_cv_signal()`

* Remove `gpr_cv_broadcast()`
2022-11-29 21:54:14 +08:00
Cheng-Yu Chung 5498481265 Remove include/grpcpp/impl/codegen/proto_utils.h (#31532) 2022-11-29 21:33:55 +08:00
Cheng-Yu Chung c34d99fd9a Remove include/grpc/impl/codegen/compression_types.h (#31726)
* Remove `include/grpc/impl/codegen/compression_types.h`

* Automated change: Fix sanity tests
2022-11-22 14:41:55 -05: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
Cheng-Yu Chung 452d026b7d Remove include/grpcpp/impl/codegen/interceptor_common.h (#31530)
* Remove `include/grpcpp/impl/codegen/interceptor_common.h`

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests
2022-11-22 11:07:55 -05:00
Cheng-Yu Chung d5b285df95 Remove include/grpcpp/impl/codegen/create_auth_context.h (#31359)
* Remove `include/grpcpp/impl/codegen/create_auth_context.h`

* Update

* Automated change: Fix sanity tests
2022-11-21 23:06:10 -05:00
Cheng-Yu Chung e83d69bdf2 Remove include/grpcpp/impl/codegen/metadata_map.h (#31531)
* Remove `include/grpcpp/impl/codegen/metadata_map.h`

* Automated change: Fix sanity tests
2022-11-21 17:33:27 -05:00
Cheng-Yu Chung 224c72b524 Remove include/grpcpp/impl/codegen/server_interface.h (#31539) 2022-11-21 15:40:52 -05:00
Cheng-Yu Chung e7f9fb03f4 Remove include/grpcpp/impl/codegen/server_callback_handlers.h (#31533) 2022-11-21 11:40:58 -05:00
Cheng-Yu Chung 7e736c7a6b Remove include/grpcpp/impl/codegen/intercepted_channel.h (#31529) 2022-11-18 17:16:21 -05:00
Cheng-Yu Chung a02cc7d88a Remove include/grpcpp/impl/codegen/delegating_channel.h (#31495)
* Remove `include/grpcpp/impl/codegen/delegating_channel.h`

* Update

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests
2022-11-18 14:10:37 -05:00
Cheng-Yu Chung 405de7ac72 Remove include/grpcpp/impl/codegen/status.h (#31285)
* Remove `include/grpcpp/impl/codegen/status.h`

* Include removing status_code_enum

* Update

* Update

* Update zlib (#31356) (#31357)

To mitigate CVE-2022-37434

* Update

Co-authored-by: Mikhail Lappo <miklelappo@users.noreply.github.com>
2022-11-18 13:22:55 -05:00
Cheng-Yu Chung c91c2fbd1a Remove include/grpcpp/impl/codegen/completion_queue_tag.h (#31320)
* Remove `include/grpcpp/impl/codegen/completion_queue_tag.h`

* Automated change: Fix sanity tests
2022-11-17 13:52:14 -05:00
Cheng-Yu Chung 47b9a57de9 Remove g_glip and class GrpcLibraryInterface (#30414)
* Remove `g_glip` and `class GrpcLibraryInterface`

* Update

* Update

* Update

* Automated change: Fix sanity tests (#20)

* Update

* Update

* Update

* Test

* Fix

* Revert "Test"

This reverts commit 2f5c77e98d9601b84123377f3e3746be192c4cbf.

* More fix

* More fix

* More fix

* Minor fix

* Revert "Minor fix"

This reverts commit 1ee3ae4da1779fb8c2abc11dace06f09532b17d9.

* Revert "More fix"

This reverts commit 1fc234896b088ec51e02c1dde79cf70db1ef90ae.

* Revert "More fix"

This reverts commit 851393c0e6d668c9c36332b552eefc70be314a4c.

* Revert "More fix"

This reverts commit ed342a51d0dbd47eff20c7c2bbe10a523ea8ca92.

* Revert "Fix"

This reverts commit 286ad8e6394082243c8089c5f8ee904db5f49d7e.
2022-11-14 15:30:09 -05:00
Cheng-Yu Chung 37c6662919 Remove include/grpcpp/impl/codegen/callback_common.h (#31311)
* Remove `include/grpcpp/impl/codegen/callback_common.h`

* Update
2022-11-01 18:34:20 -04:00
Cheng-Yu Chung 08ee2a3487 Remove include/grpcpp/impl/codegen/call_op_set.h (#31310) 2022-10-31 22:33:35 -04:00
Cheng-Yu Chung e60140676a Remove include/grpcpp/impl/codegen/channel_interface.h (#31312)
* Remove `include/grpcpp/impl/codegen/channel_interface.h`

* Update
2022-10-28 17:47:49 -04:00
Cheng-Yu Chung d6a050842a Revert "Revert "Remove include/grpcpp/impl/codegen/rpc_service_method.h (#31277)" (#31317)" (#31322)
This reverts commit 8b8fcfdd0b.
2022-10-28 15:40:45 -04:00
Cheng-Yu Chung 9143627664 Remove include/grpcpp/impl/codegen/security/auth_context.h (#31292) 2022-10-26 11:39:47 -04:00
Cheng-Yu Chung c65348879a Remove include/grpcpp/impl/codegen/time.h (#31290) 2022-10-25 17:46:44 -04:00
Cheng-Yu Chung 493b961dfb Remove include/grpcpp/impl/codegen/sync_stream.h (#31289) 2022-10-24 18:01:12 -04:00
Cheng-Yu Chung f4b25ab837 Remove include/grpcpp/impl/codegen/stub_options.h (#31287) 2022-10-21 20:23:54 -04:00