Commit Graph

102 Commits

Author SHA1 Message Date
Tanvi Jagtap ba6e429ff4 Adding clang format file to each folder (#35734)
<!--

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

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35734 from tanvi-jagtap:tjagtap_formatting_1008 40014df8fe
PiperOrigin-RevId: 602601487
2024-01-29 22:30:28 -08:00
Esun Kim 8144346e2c [Protobuf] Added static_cast (#35566)
Fixes https://github.com/grpc/grpc/issues/35268

Closes #35566

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35566 from veblush:proto-buffer 02635228f5
PiperOrigin-RevId: 599954076
2024-01-19 15:34:14 -08:00
David Chamberlin 528bc23088 [Build] Minimal changes for enabling DLL operation on Windows (#35484)
<!--

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

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35484 from dawidcha:win_shared_gs_api f8f244da99
PiperOrigin-RevId: 598863993
2024-01-16 09:30:33 -08:00
AJ Heller a0cab8318d [EventEngine] Replace Executor with EE::Run in Client Reactor (#35295)
Closes #35295

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35295 from drfloob:client-callback-reactor-ee de095c7f5c
PiperOrigin-RevId: 590983428
2023-12-14 10:41:56 -08:00
Yijie Ma bae0c705aa
[Deps] Update to Clang-16 (#34492)
<!--

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.

-->
2023-10-11 16:26:32 -07:00
Romain Geissler @ Amadeus c38837a741
[C++] Use GOOGLE_PROTOBUF_VERSION instead of PROTOBUF_VERSION. (#34635)
Indeed it seems that on Protobuf side, PROTOBUF_VERSION is defined in
port_def.inc which always comes with a matching include of
port_undef.inc which explicitly undef all macros, among them
PROTOBUF_VERSION. GOOGLE_PROTOBUF_VERSION doesn't suffer from this
issue.

This is a followup of #33646.
2023-10-10 15:06:34 -07:00
Esun Kim 4fa02accc1
[Cord] Fix MakeCordFromSlice memory bug (#34549)
Fix `MakeCordFromSlice` function to fail to carry an inlined slice which
can give a corrupted result when deserializing a Cord.
2023-09-29 14:23:16 -07:00
Romain Geissler @ Amadeus 0bc07c957e
[C++] Fix clang's -Winconsistent-missing-override in proto reader/writer. (#33646)
The "override" is not added on purpose to remain compatible with
Protobuf < 22.x, as already written in the comment on top of these two
functions.

CC @veblush as the author of this code.

Note: I am personally not super enthousiastic about this change. As an
alternative, I can propose to selectively add the `override` keyword,
based on the value of the `PROTOBUF_VERSION` macro (comparing it to
`4022000`). Tell me if you prefer this version instead.
2023-09-12 12:47:55 -07:00
Romain Geissler @ Amadeus 899bf72004
[C++] Fix two compilation warnings in grpcpp/support/proto_buffer_reader.h. (#33635)
Detected with gcc 13:
```
In file included from /data/mwrep/res/osp/Grpc/23-0-0-0/include/grpcpp/impl/proto_utils.h:31,
                 from ./include/generated/gacms.object.grpc.pb.h:18,
                 from ./include/generated/gacms.object.grpc.pb.cc:6:
/data/mwrep/res/osp/Grpc/23-0-0-0/include/grpcpp/support/proto_buffer_reader.h: In member function 'virtual bool grpc::ProtoBufferReader::ReadCord(absl::lts_20230125::Cord*, int)': /data/mwrep/res/osp/Grpc/23-0-0-0/include/grpcpp/support/proto_buffer_reader.h:157:24: error: comparison of integer expressions of different signedness: 'uint64_t' {aka 'long unsigned int'} and 'int' [-Werror=sign-compare]
  157 |       if (slice_length <= count) {
      |           ~~~~~~~~~~~~~^~~~~~~~
/data/mwrep/res/osp/Grpc/23-0-0-0/include/grpcpp/support/proto_buffer_reader.h: In lambda function:
/data/mwrep/res/osp/Grpc/23-0-0-0/include/grpcpp/support/proto_buffer_reader.h:191:35: warning: unused parameter 'view' [-Wunused-parameter]
  191 |         [slice](absl::string_view view) { grpc_slice_unref(slice); });
      |                 ~~~~~~~~~~~~~~~~~~^~~~
cc1plus: all warnings being treated as errors
```
2023-07-10 17:42:23 -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
Yash Tibrewal bf1a26cde8
GcpObservability: Add client api latency (#32645)
This PR adds the view `grpc.io/client/api_latency` for GCP Observability
which aims to collect the end-to-end time taken by a call.

Changes made to support this -
1) A global interceptor factory registration is created for stats
plugins.
2) OpenCensus plugin now provides a new interceptor that's responsible
for collecting the new latency.
3) Gcp Observability registers this plugin.
4) A new OpenCensus measurement and view is created for api latency.
Note that this is internal as of now, since it's not clear if it should
be exposed as public experimental API. Leaving that decision for the
future.

<!--

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.

-->
2023-03-22 15:31:47 -07: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 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 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 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 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 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 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 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
Cheng-Yu Chung 34b1633944
Remove `include/grpcpp/impl/codegen/string_ref.h` (#31286) 2022-10-19 22:56:36 -04:00
Cheng-Yu Chung 8c7cb57c02
Revert "Revert "Revert "Remove `include/grpcpp/impl/codegen/status_code_enum.h`"" (#31391)" (#31396)
This reverts commit 7827868762.
2022-10-19 08:01:54 -07:00
Cheng-Yu Chung 7827868762
Revert "Revert "Remove `include/grpcpp/impl/codegen/status_code_enum.h`"" (#31391)
* Revert "Revert "Remove `include/grpcpp/impl/codegen/status_code_enum.h` (#31284)" (#31387)"

This reverts commit 1a9ce63199.

* Update
2022-10-18 18:26:05 -04:00
Cheng-Yu Chung 1a9ce63199
Revert "Remove `include/grpcpp/impl/codegen/status_code_enum.h` (#31284)" (#31387)
This reverts commit 3981105be6.

Co-authored-by: Alisha Nanda <alishananda@google.com>
2022-10-18 10:27:04 -07:00
Cheng-Yu Chung 3981105be6
Remove `include/grpcpp/impl/codegen/status_code_enum.h` (#31284) 2022-10-18 11:34:24 -04:00
Cheng-Yu Chung ad04dc3766
Remove `include/grpcpp/impl/codegen/slice.h` (#31283) 2022-10-17 14:19:27 -04:00
Cheng-Yu Chung 7a2c28c7b9
Remove `include/grpcpp/impl/codegen/server_interceptor.h` (#31281) 2022-10-17 12:21:26 -04:00
Cheng-Yu Chung d699b574a8
Remove `include/grpcpp/impl/codegen/server_callback.h` (#31279) 2022-10-12 15:37:14 -04:00
Cheng-Yu Chung 9125b6ee66
Remove `include/grpcpp/impl/codegen/proto_buffer_writer.h` (#31268) 2022-10-11 10:57:28 -04:00
Cheng-Yu Chung 113422ff8b
Remove `include/grpcpp/impl/codegen/proto_buffer_reader.h` (#31261) 2022-10-10 11:35:37 -04:00
Cheng-Yu Chung d76c6f61f0
Remove `include/grpcpp/impl/codegen/method_handler.h` (#31249) 2022-10-06 15:50:54 -04:00
Cheng-Yu Chung 488f17eb46
Remove `include/grpcpp/impl/codegen/message_allocator.h` (#31246) 2022-10-06 13:18:24 -04:00
Cheng-Yu Chung 279ec5ab45
Remove `include/grpcpp/impl/codegen/interceptor.h` (#31245) 2022-10-06 13:18:11 -04:00
Cheng-Yu Chung a192f155b9
Remove `include/grpcpp/impl/codegen/config.h` (#31061)
* Remove `include/grpcpp/impl/codegen/config.h`

* Update
2022-10-06 13:14:16 -04:00
Cheng-Yu Chung 4ba0f9afb5
Revert "Revert "Remove `include/grpcpp/impl/codegen/client_callback.h` (#31005)" (#31079)" (#31087)
This reverts commit da08fe1d6f.
2022-10-04 13:59:32 -04:00
Craig Tiller da08fe1d6f
Revert "Remove `include/grpcpp/impl/codegen/client_callback.h` (#31005)" (#31079)
This reverts commit 17f515744f.
2022-09-20 18:58:54 -07:00
Cheng-Yu Chung 0cb5faf8e4
Remove `include/grpcpp/impl/codegen/client_interceptor.h` (#31054)
* Remove `include/grpcpp/impl/codegen/client_interceptor.h`

* Update comment
2022-09-20 14:03:46 -04:00
Cheng-Yu Chung 17f515744f
Remove `include/grpcpp/impl/codegen/client_callback.h` (#31005) 2022-09-20 13:51:55 -04:00
Cheng-Yu Chung 7cb9731e4e
Remove `include/grpcpp/impl/codegen/call_op_set_interface.h` (#30990) 2022-09-16 17:27:50 -04:00
Cheng-Yu Chung 3236174176
Remove `include/grpcpp/impl/codegen/byte_buffer.h` (#30948)
* Remove `include/grpcpp/impl/codegen/byte_buffer.h`

* Update
2022-09-14 16:47:17 -04:00
Cheng-Yu Chung b765b06155
Remove `include/grpcpp/impl/codegen/async_stream.h` (#30941)
* Remove `include/grpcpp/impl/codegen/async_stream.h`

* Fix

* Fix

* Update
2022-09-14 13:40:35 -04:00
Cheng-Yu Chung cb3d7a9e9e
Revert "Revert "Remove `include/grpcpp/impl/codegen/async_unary_call.h`"" (#30955)
* Revert "Revert "Remove `include/grpcpp/impl/codegen/async_unary_call.h` (#30945)" (#30950)"

This reverts commit 0c454fa875.

* Fix
2022-09-13 15:57:15 -04:00
Craig Tiller 0c454fa875
Revert "Remove `include/grpcpp/impl/codegen/async_unary_call.h` (#30945)" (#30950)
This reverts commit 7dbc73d4f3.
2022-09-12 16:44:07 -07:00