Commit Graph

6535 Commits

Author SHA1 Message Date
GitHub Actions
45cf4a77a9 Update artifacts branch 2025-05-19 22:57:59 +00:00
GitHub Actions
5eb934cfc2 Update artifacts branch 2025-04-23 17:17:45 +00:00
GitHub Actions
51a1502d93 Update artifacts branch 2025-01-06 17:47:35 +00:00
GitHub Actions
d99d7c87c0 Update artifacts branch 2024-10-14 23:02:09 +00:00
GitHub Actions
e21af55824 Update artifacts branch 2024-08-09 17:18:02 +00:00
Mark D. Roth
947c18d232 [xDS] fix re-resolution for logical DNS clusters (#37211)
Fixes a bug from https://github.com/grpc/grpc/pull/35011.

Closes #37211

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37211 from markdroth:xds_logical_dns_reresolution_fix 666f1df81a66cd51856913abd7ae47ee57667125
PiperOrigin-RevId: 652505521
2024-07-15 09:29:25 -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
Mark D. Roth
660101a2c9 [xDS] implement system root cert support (#37185)
As per gRFC A82 (https://github.com/grpc/proposal/pull/436).

Closes #37185

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37185 from markdroth:xds_system_root_certs 9ee1e825586688f1bc4aad5c5d915c30dc4369b8
PiperOrigin-RevId: 651896612
2024-07-12 15:06:50 -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
Mark D. Roth
952d6276b4 [CallTracer] report transport byte counts directly to CallTracer
Instead of passing the transport byte counts back up through the filter
stack to be reported to the `CallTracer`, we now have the transport
pass the transport byte counts directly to the `CallTracer` itself.
This will eventually allow us to avoid unnecessarily storing these byte
counts in cases where no `CallTracer` actually cares about the data, which
will reduce per-call memory.  (In the short term, it actually increases
memory usage, but we can separately do some work to avoid the memory
usage in the transport by removing the `grpc_transport_stream_stats`
struct from the legacy filter API.)

This is a prereq for supporting `CallTracer` in the new call v3 stack,
which does not include the transport byte counts as part of the
receieve-trailing-metadata hook, unlike the legacy filter stack.

This change is controlled by the `call_tracer_in_transport` experiment,
which is enabled by default.

As part of this experiment, we also fix a couple of related bugs:
- On the client side, the chttp2 transport was incorrectly adding
  annotations to the parent `ClientCallTracer` instead of the
  `CallAttemptTracer`.
- The OpenCensus `ServerCallTracer` was incorrectly swapping the values
  of sent and received bytes.

PiperOrigin-RevId: 650728181
2024-07-09 12:55:33 -07:00
Mark D. Roth
e5c99ad94b [xDS] implement authority rewriting (#37087)
As per gRFC A81 (https://github.com/grpc/proposal/pull/435).

A few small improvements along the way:
- Use `DownCast<>` instead of `static_cast<>` in `ServiceConfigCallData::GetCallAttribute()`.
- Add a convenient templated wrapper for `ClientChannelLbCallState::GetCallAttribute()`, similar to the one on `ServiceConfigCallData`.
- Added a `ParseBoolValue()` helper to xds_common_types_parser, and use it in various places in xDS resource parsing.

Closes #37087

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37087 from markdroth:xds_authority_rewriting 3679d2b061cf12b398c7662dee6d1fc408425aeb
PiperOrigin-RevId: 650293912
2024-07-08 10:25:04 -07:00
Mark D. Roth
1761685fc1 [xDS e2e tests] set channel/server creds in tests instead of as a test parameter (#37156)
As part of the xDS authority rewriting implementation in #37087, I need to write some tests showing the authority being rewritten.  However, the fake security connector currently crashes on unexpected authorities.  (As a side note, I think the fake security connector is very cumbersome and should be redesigned, but that's a separate project.)  As a result, I need a way to use InsecureCreds on a per-test basis.

I thought about just adding an option to `XdsTestType` to trigger use of InsecureCreds, but the logic we use for determining which creds type to use for what is already very cumbersome, and adding another option there would have just made that worse.  Instead, I have switched to a simpler approach where the individual tests can decide what creds type to use directly.  This both unblocks my other PR and makes the existing code more maintainable.

Closes #37156

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37156 from markdroth:xds_e2e_test_creds_improvement 2e813834d09ccdf858868f7f47100d150e92490b
PiperOrigin-RevId: 649225248
2024-07-03 16:04:30 -07:00
Tanvi Jagtap
7091890ae7 [Gpr_To_Absl_Logging] [Gpr_To_Absl_Logging] Minor log formatting fixes
PiperOrigin-RevId: 648665041
2024-07-02 04:05:42 -07:00
Craig Tiller
69006e0c30 [benchmarks] Enable callback microbenchmarks (#37077)
Since these were disabled they stopped working, and we really need to be tracking overheads here.

Closes #37077

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37077 from ctiller:it-must-work aa19a4aa89e8e706b60928abfd2501f5f4a99a07
PiperOrigin-RevId: 648469428
2024-07-01 13:34:08 -07:00
Eugene Ostroukhov
5ff56f6bcf [test] Increase timeout in pre_stop_hook_server_test (#37126)
Closes #37126

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37126 from eugeneo:increase-timeout-hook-test 190cd3d60ca219660985958e132c7e7bf6072837
PiperOrigin-RevId: 648415617
2024-07-01 10:38:26 -07:00
Mark D. Roth
24318054bc [LB policy API] change metadata mutations to overwrite instead of append (#37075)
Closes #37075

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37075 from markdroth:lb_metadata_overwrite 1f56d2001e64e336df1615b4804a83419d911414
PiperOrigin-RevId: 647761256
2024-06-28 12:18:40 -07:00
Mark D. Roth
80d9cba5bc [StatsPlugin] Plumb channel args through StatsPluginChannelScope
This allows CallTracers to be created with parameters dictated by
channel args.

For the moment, I've used the EventEngine `EndpointConfig` API to expose
the channel args here, so as to avoid directly exposing
`grpc_core::ChannelArgs`.  We should determine a better API here before
we de-experimentalize the stats APIs.

Also add an experiment to be used in a subsequent PR.

PiperOrigin-RevId: 647730284
2024-06-28 10:44:26 -07:00
Mark D. Roth
fa84360551 Automated rollback of commit af492ae70a.
PiperOrigin-RevId: 646224695
2024-06-24 14:39:23 -07:00
Craig Tiller
83ee2cd631 [benchmark] Add an opinionated macro for gRPC benchmark targets (#37012)
As we've learned what configuration is needed for our benchmarks the settings have been growing more and more bespoke for each binary. Try to consolidate that into some useful defaults.

Also ensure we always `linkstatic=1`. `cc_binary` defaults to this, so it's reasonable to assume that's the performance our customers see. It also deeply impacts performance for small microbenchmarks, and so enabling it gives us more apples:apples, and saves chasing things that don't matter.

Closes #37012

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37012 from ctiller:benchmark-bin b84cab58c61c75fc286c2ed7c0b393f2048915b6
PiperOrigin-RevId: 645483183
2024-06-21 13:25:55 -07:00
Mark D. Roth
34a0318dbf [LB policy API] change metadata mutation API to handle discarded picks (#36968)
Previously, metadata mutations were made by the picker directly, which meant that they would be applied even if the channel winds up discarding the pick due to the returned subchannel having been disconnected by the time the pick result is returned.  This changes the API such that pickers return metadata mutations along with the pick result, so that the mutations won't get applied unless the pick result is actually used.

Closes #36968

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36968 from markdroth:lb_metadata_api 2765da61214f3ae63da3fdb8e362fac625b51c5a
PiperOrigin-RevId: 645451869
2024-06-21 11:35:39 -07:00
Mark D. Roth
af492ae70a Automated rollback of commit f1ab1d8cf3.
PiperOrigin-RevId: 645167659
2024-06-20 15:05:51 -07:00
Mark D. Roth
f1ab1d8cf3 [handshaker API] update handshaker API to use modern types
Specifically:
- use `OrphanablePtr<>` for `grpc_endpoint`
- use `absl::AnyInvocable<>` instead of `grpc_closure`
- use `EventEngine::Run()` instead of `ExecCtx::Run()`
- use `SliceBuffer` instead of `grpc_slice_buffer`
- use `absl::Status` instead of `grpc_error_handle`
- use `absl::string_view` instead of `const char*` for handshaker names

Also pass acceptor via `HandshakerArgs` instead of as a separate parameter.

Also changed chttp2 and httpcli to use `OrphanablePtr<>` for the endpoint.

PiperOrigin-RevId: 644551906
2024-06-18 16:49:51 -07:00
Mark D. Roth
22322fe7df [e2e tests] fix regex for connection failures to catch a missed case (#36969)
Closes #36969

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36969 from markdroth:e2e_test_regex_fix 043e5fdadbf85efdd9886224b1743f3a9b7e5e4c
PiperOrigin-RevId: 644540986
2024-06-18 16:10:31 -07:00
Craig Tiller
8dac453a71 [ares] Try to fix test (#36960)
Attempt to fix the crash https://btx.cloud.google.com/invocations/91d5ed2d-da79-493d-b619-7371709b976b/targets/%2F%2Ftest%2Fcpp%2Fnaming:cancel_ares_query_test@poller%3Dpoll@experiment%3Dno_event_engine_dns;config=c4863158611888768eb9ed489660f2d7d62f599869f7919a2897d8450d8abc0b/log

It looks like the work serializer is still performing actions that refer to args when we destroy it; instead add an extra event to the end that we can delay on.

Closes #36960

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36960 from ctiller:aressss 834f02ff09af41c5f209d8bed01446099ba0d44c
PiperOrigin-RevId: 644525540
2024-06-18 15:16:15 -07:00
Craig Tiller
104078e8d2 [resource_quota] Clear wait for ready bit in e2e test (#36967)
We don't have a guarantee of timeliness for connectivity issues to clear up with resource quota, and so this wait for ready setting is causing very long delays for the test to complete.

Closes #36967

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36967 from ctiller:rq 4e76af9bdaeba36eb77ab128b1f99c30c682871b
PiperOrigin-RevId: 644502087
2024-06-18 13:58:12 -07:00
Craig Tiller
a3b66f02d7 [channel_filter] Use UniqueTypeName for channel filter names (#36907)
Preparation for switching away from `grpc_channel_filter*` to identify channel filters.

Closes #36907

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36907 from ctiller:type-name e7ad4c67a2ebe40f8bbf95198dd84562c47d99b9
PiperOrigin-RevId: 644483948
2024-06-18 12:59:40 -07:00
Tanvi Jagtap
abcd95a955 [grpc][Gpr_To_Absl_Logging] Migrating from gpr to absl logging - gpr_log (#36941)
[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 #36941

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36941 from tanvi-jagtap:src_core_xds 9ab8de800d2f46080b296a4a875c91c78333e4f1
PiperOrigin-RevId: 644229971
2024-06-17 21:04:02 -07:00
Craig Tiller
b0063e8345 [experiments] Add benchmark (#36937)
Closes #36937

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36937 from ctiller:experiments e26b188b1922b115b4823a220e1bd81794228946
PiperOrigin-RevId: 644048741
2024-06-17 10:11:57 -07:00
Craig Tiller
e21467475f [call-v3] Direct channel implementation (#36734)
This change brings up the direct channel, and inproc promise based transports.

This work exposed a bug that was very difficult to fix with the current call_filters.cc implementation, so I've substantially revamped that - instead of having a pipe-like object per call element, we now have a big ol' combined state machine for the entire call. It's a touch more code, but substantially easier to reason about individual cases, so I much prefer this form (it's also a slight memory improvement: 12 bytes total to track call state, and 10 of those are wakeup bitmasks...).

Closes #36734

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36734 from ctiller:transport-refs-9 3e2a80b40d77e093c3d1aabedc16015478ee4bee
PiperOrigin-RevId: 644034593
2024-06-17 09:29:46 -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
Mark D. Roth
dee3cf6e34 [e2e tests] fix connection failure regex (#36922)
Closes #36922

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36922 from markdroth:e2e_test_flake_fix 1bcc04aaa73cb883ceb9107a65c0323707254884
PiperOrigin-RevId: 643176629
2024-06-13 17:46:45 -07:00
Mark D. Roth
f7ce3ee9d5 [call v3] add dynamic filter support to client channel (#36877)
Also made some minor improvements to the `ConfigSelector` API.

Closes #36877

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36877 from markdroth:client_channel_v3_dynamic_filters 6a539fe3200dd81b8ca6fd1aa3955ecc8f75666a
PiperOrigin-RevId: 642755276
2024-06-12 15:22:29 -07:00
Craig Tiller
fdac9ebfdf [thready_tsan] Grab bag of improvements (#36886)
- ensure ordering of `OnAccept` and `Shutdown` callbacks from thready event engine (previously these could be reordered and this caused spurious failures)
- enable thready_tsan for one C++ e2e test
- don't filter thready_tsan for local builds (only CI)

Closes #36886

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36886 from ctiller:erm e3b88e7d86aff7707819ddd010850123e730a91a
PiperOrigin-RevId: 642702724
2024-06-12 12:43:06 -07:00
Tanvi Jagtap
905c2b25fc [grpc][Gpr_To_Absl_Logging] Deleting all instances of gpr_set_log_verbosity (#36859)
Deleting all instances of gpr_set_log_verbosity

Closes #36859

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36859 from tanvi-jagtap:remove_gpr_set_log_verbosity_01 d7a74d06245bcfd7febfc72cbda3acca09003f8c
PiperOrigin-RevId: 642297195
2024-06-11 09:36:55 -07:00
Tanvi Jagtap
03e91b6811 [Gpr_To_Absl_Logging] Move function to test header form log.h (#36860)
[Gpr_To_Absl_Logging] Move function to test header form log.h
This is not really needed in log.h

Closes #36860

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36860 from tanvi-jagtap:move_function_to_test_header e6494bd06f2e4a08c91eb41f420607f9568b22ac
PiperOrigin-RevId: 642080756
2024-06-10 17:52:44 -07:00
Yijie Ma
87321f08b3 [OTPlugin] Per-channel OpenTelemetry plugin (#36729)
<!--

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

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36729 from yijiem:per-channel-stats-plugin 4786bed42f11b0a164f21e040439c3145f5d1e3d
PiperOrigin-RevId: 642030366
2024-06-10 14:52:57 -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
Mark D. Roth
9b1bb788aa [endpoint] Remove grpc_endpoint_shutdown().
This gives grpc_endpoint the same destruction-is-shutdown semantic as
EventEngine::Endpoint, which will make the migration easier.
PiperOrigin-RevId: 639867616
2024-06-03 12:10:56 -07:00
Mark D. Roth
34ac4ee5de [grpc_error] remove unnecessary status attributes (#36523)
The following attributes were completely unused:
- kOffset
- kIndex
- kSize
- kFilename
- kKey
- kValue

The following attributes were added but never programmatically accessed, and I've moved them into the status messages themselves, which is another step toward #22883:
- kErrorNo
- kTsiCode
- kWsaError
- kHttpStatus
- kOsError
- kSyscall
- kTargetAddress
- kRawBytes
- kTsiError

Closes #36523

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36523 from markdroth:grpc_error_attribute_cleanup b289c399fed67322ac4f3de24b5cec5e81663886
PiperOrigin-RevId: 639147583
2024-05-31 14:11:42 -07:00
Craig Tiller
53540ae5d6 [context] Move legacy tracing contexts to arena contexts (#36776)
Closes #36776

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36776 from ctiller:ctx2 8be4cdcf43f00a371dfd4ce0fb01594ecd5483a8
PiperOrigin-RevId: 639133808
2024-05-31 13:26:08 -07:00
Yash Tibrewal
7ccb51e2ea [StatsPlugin] Add API to check if an instrument is enabled (#36757)
Closes #36757

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36757 from yashykt:CheckIfMetricsAreEnabled 7755e98e6039d33220348ea8ccb777f0d2be549b
PiperOrigin-RevId: 639067118
2024-05-31 09:57:34 -07:00
Craig Tiller
53c42e9dae [arena] Make arena refcounted (#36758)
Make `Arena` be a refcounted object.

Solves a bunch of issues: our stack right now needs a very complicated dance between transport and surface to destroy a call, but with this scheme we can just hold a ref to what we need in each place and everything works out.

Removes some `ifdef`'d out code that had been sitting dormant for a year or two also -- I'd left it in as a hedge against it being maybe a bad idea, but it looks like it's not needed.

Closes #36758

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36758 from ctiller:arena-counting d1b672fe30cd9c3ad4c20a05dbdc1969cb2804ef
PiperOrigin-RevId: 638767768
2024-05-30 13:43:21 -07:00
Yash Tibrewal
c495d2aa1f [CSM] Stop using xDS enabled server for CSM observability tests (#36725)
Closes #36725

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36725 from yashykt:RemoveXdsEnabledServerFromCsmInterop 91f3120f078068979274881bc02b7cd5905c61e5
PiperOrigin-RevId: 638313782
2024-05-29 09:36:43 -07:00
Mark D. Roth
2395bb1b86 [xDS] fix "tls" channel cred in bootstrap to actually work (#36726)
This fixes a fairly embarrassing bug and lack of testing from #33234.  Prior to this fix, attempting to use the "tls" creds type would always cause a crash.

@gtcooke94 @matthewstevenson88 Note that the root cause of this bug was that when I wrote this code, I assumed that `grpc_tls_credentials_options` had a reasonable default for the cert verifier.  But it turns out that it doesn't do that directly; instead, we are only imposing that default in [`CredentialOptionSanityCheck()`](621aa4e5ce/src/core/lib/security/credentials/tls/tls_credentials.cc (L85)), which is called only when we call [`grpc_tls_credentials_create()`](621aa4e5ce/src/core/lib/security/credentials/tls/tls_credentials.cc (L160)), not when we directly instantiate `TlsCredentials` as my code was doing.  As part of the TlsCreds API cleanup you're working on, we should fix this so that callers get the right behavior even if they are internal callers that instantiate the TlsCreds object directly rather than calling the C-core API.

Closes #36726

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36726 from markdroth:xds_bootstrap_mtls_creds_fix dac2789e104a7cdc22efbfe5be0a4da4a4ad13a1
PiperOrigin-RevId: 637993734
2024-05-28 13:00:28 -07:00
Tanvi Jagtap
d148728588 Use LOG_IF(FATAL, ...) instead of gpr_assertion_failed() in interop_client.cc
gpr_assertion_failed() will be deprecated soon.

LOG_IF(FATAL, condition) will terminate if condition is true.

PiperOrigin-RevId: 636770885
2024-05-23 20:48:30 -07:00
Mark D. Roth
fe817c8ab1 [reorg] move lib/json -> util/json (#36645)
Closes #36645

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36645 from markdroth:reorg_json 5b6434dd44a0d147731db08b7c2154f61d3b0ef9
PiperOrigin-RevId: 636757495
2024-05-23 19:51:49 -07:00
Mark D. Roth
6c08d36c3b [reorg] move telemetry code to src/core/telemetry (#36644)
Closes #36644

PiperOrigin-RevId: 636702732
2024-05-23 15:54:07 -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
Esun Kim
f4ac0a3093 [Clean-up] Fix deprecated protobuf function usages (#36640)
Resolved the use of deprecated protobuf functions that would have caused clang-tidy issues with the upcoming protobuf release. The error encountered was:

```
2024-05-15 16:47:15,874 9074 warnings generated.
test/cpp/end2end/message_allocator_end2end_test.cc:330:38: error: 'CreateMessage' is deprecated: Use Create [clang-diagnostic-deprecated-declarations,-warnings-as-errors]
  330 |             google::protobuf::Arena::CreateMessage(&arena_));
      |                                      ^
bazel-out/k8-fastbuild/bin/external/com_google_protobuf/src/google/protobuf/_virtual_includes/protobuf_lite/google/protobuf/arena.h:179:3: note: 'CreateMessage' has been explicitly marked deprecated here
  179 |   ABSL_DEPRECATED("Use Create")
      |   ^
external/com_google_absl/absl/base/attributes.h:683:49: note: expanded from macro 'ABSL_DEPRECATED'
  683 | #define ABSL_DEPRECATED(message) __attribute__((deprecated(message)))
      |                                                 ^
test/cpp/end2end/message_allocator_end2end_test.cc:332:38: error: 'CreateMessage' is deprecated: Use Create [clang-diagnostic-deprecated-declarations,-warnings-as-errors]
  332 |             google::protobuf::Arena::CreateMessage(&arena_));
      |                                      ^
bazel-out/k8-fastbuild/bin/external/com_google_protobuf/src/google/protobuf/_virtual_includes/protobuf_lite/google/protobuf/arena.h:179:3: note: 'CreateMessage' has been explicitly marked deprecated here
  179 |   ABSL_DEPRECATED("Use Create")
      |   ^
external/com_google_absl/absl/base/attributes.h:683:49: note: expanded from macro 'ABSL_DEPRECATED'
  683 | #define ABSL_DEPRECATED(message) __attribute__((deprecated(message)))
      |
```

Closes #36640

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36640 from veblush:protobuf-arena-create 522591a6ee21f8d873becfd9ec0019951b4bd5db
PiperOrigin-RevId: 635912826
2024-05-21 13:39:52 -07:00
Tanvi Jagtap
4dc1097d04 [grpc][Gpr_To_Absl_Logging] Migrating from gpr to absl logging - gpr_log (#36677)
[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 #36677

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36677 from tanvi-jagtap:regex_test_end2end dfb803ebffe4ddc68698a91ee6e84be4bd49d4cd
PiperOrigin-RevId: 635807701
2024-05-21 08:03:45 -07:00