This gives grpc_endpoint the same destruction-is-shutdown semantic as
EventEngine::Endpoint, which will make the migration easier.
PiperOrigin-RevId: 639867616
[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 0a36bebcbc
PiperOrigin-RevId: 639729711
Also rename the class from `MetadataQuery` to `GcpMetadataQuery`.
Closes#36789
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36789 from markdroth:reorg_gcp_metadata_query d2b84f46be
PiperOrigin-RevId: 639256546
<!--
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#36791
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36791 from ctiller:san 692d74bffa
PiperOrigin-RevId: 639184328
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 b289c399fe
PiperOrigin-RevId: 639147583
Implement Python CSM observability.
Design: [go/grpc-python-opentelemetry](http://goto.google.com/grpc-python-opentelemetry)
<!--
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#36557
PiperOrigin-RevId: 639073741
Disable the ConfigVar because it wont work anymore.
As on 30 May 2024, about 40% of the instances of gpr_log are migrated to absl LOG.
The remaining instances will be migrated soon.
Given this situation, it would be a little weird to keep this ConfigVar.
Because half the things will log via gpr_log and the others will log through LOG directly.
For the same reason, the platform specific logging code has been deleted. https://github.com/grpc/grpc/pull/36120
This needs to be deleted too.
Closes#36761
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36761 from tanvi-jagtap:grpc_trace f2f987e625
PiperOrigin-RevId: 638893208
Add a dynamic registration mechanism for a new kind of context: one that lives in an arena.
An upcoming set of changes will move all of the legacy context types into this mechanism.
It's likely we'll move other promise based context types to this mechanism also, until the only promise-based context type is `Arena`.
Closes#36773
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36773 from ctiller:transport-refs-7.8 e6892031ca
PiperOrigin-RevId: 638810722
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 d1b672fe30
PiperOrigin-RevId: 638767768
Implements https://github.com/grpc/proposal/pull/429
Currently, the behavior of `GRPC_ARG_HTTP2_MAX_PINGS_WITHOUT_DATA` blocks more pings from being sent if we are sending too many pings without a data/header frame being sent as well. The original intention of this channel arg was to play nice with proxies that have restrictive settings when it comes to pings. This causes awkwardness when configuring keepalive pings for transports with long lived streams with sparse communication. In such a case, gRPC Core would stop sending keepalive pings since no data/header frame is being sent, resulting in a situation where we are unable to detect whether the transport is alive or not.
This change adds an experiment "max_pings_wo_data_throttle" to modify the behavior of `GRPC_ARG_HTTP2_MAX_PINGS_WITHOUT_DATA` to throttle pings to a frequency of 1 minute instead of completely blocking pings when too many pings have been sent without data/header frames.
Closes#36374
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36374 from yashykt:ThrottlePings b5bd42a019
PiperOrigin-RevId: 638110795
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 dac2789e10
PiperOrigin-RevId: 637993734
[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#36711
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36711 from tanvi-jagtap:trash e208603d68
PiperOrigin-RevId: 636858250
[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 81b8f4179f
PiperOrigin-RevId: 636410944
We decided to deprecate `target_attribute_filter` in https://github.com/grpc/proposal/pull/431.
This PR marks the attribute as deprecated.
<!--
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#36697
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36697 from XuanWang-Amos:deprecate_target_filter 9954bb4037
PiperOrigin-RevId: 636304089
Right now there's no ordering between the set context from the SetCall callback chain in server.cc, and the read context a few lines down from the new if statement inserted here -- that is if a call is cancelled whilst the server is initializing the context we see a tsan race.
Until https://github.com/grpc/grpc/pull/36598 this was a non-issue however because we were entirely discarding the cancellation edge. Now that we've gotten that back again, this race is appearing.
I'd like us to fix this properly, but to do so probably needs some deeper work on what contexts are and how they're initialized -- and that's not for this week (but maybe this month).
PiperOrigin-RevId: 636295078
Remove `@abc.abstractmethod` so we don't break backward compatibility.
Fix: https://github.com/grpc/grpc/issues/36683
<!--
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#36684
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36684 from XuanWang-Amos:remove_abstractmethod_for_registered_method f748fa6e7a
PiperOrigin-RevId: 636186951
In a follow-up PR, we will use these helper APIs to add validation checks when creating TLS credentials objects.
Closes#36357
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36357 from matthewstevenson88:pem-util dca4f2e6c5
PiperOrigin-RevId: 636162540