Move event engine context to be an arena based context, and have party host arena directly.
Now `Party` can directly inject all context necessary without needing to call out to the derived type; this makes `Party` instantiable by itself (no need to inherit from it - though we'll still want to for `CallSpine` to simplify some arena lifetime management), meaning we can start to consider eliminating the base class `Activity` and merging these types.
Closes#37015
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37015 from ctiller:chaotic-party 7f44b37b5d
PiperOrigin-RevId: 646963003
[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#36942
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36942 from tanvi-jagtap:src_core_lb 524b45fef1
PiperOrigin-RevId: 646311061
[Gpr_To_Absl_Logging] Remove gpr_log_severity_string
This function is not getting used anymore gpr_log_severity_string
Closes#37013
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37013 from tanvi-jagtap:gpr_log_severity_string_remove 3346face4c
PiperOrigin-RevId: 645796077
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 b84cab58c6
PiperOrigin-RevId: 645483183
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 2765da6121
PiperOrigin-RevId: 645451869
[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#36979
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36979 from tanvi-jagtap:src_core_util a160d9d7ec
PiperOrigin-RevId: 645397740
[Gpr_To_Absl_Logging] Cleaning up the allow list for deprecated functions.
This file has a list of deprecated functions.
Any new instance of a deprecated function being used in the code will be flagged by the script. If there is a new instance of a deprecated function in a Pull Request, then the Sanity tests will fail.
We are currently working on clearing out the usage of deprecated functions in our code base.
For that reason, while our cleaning is in progress we have a temporary allow list. The allow list has a list of files where clean up of deprecated functions is pending. As we clean up the deprecated function from files , we will remove them from the allow list.
Ideally, it would be wise to do the file clean up and the altering of the allow list int the same PR. This will make sure that any roll back of a clean up PR will alter the allow list and avoid build failures.
Closes#36977
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36977 from tanvi-jagtap:clean_allow_list_2024_06_19 9393244cee
PiperOrigin-RevId: 645325296
[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#36883
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36883 from tanvi-jagtap:large_file_01 43eb4880cf
PiperOrigin-RevId: 645281490
[Gpr_To_Absl_Logging] Removing incorrect entry from Sanity test
For now - we have decided to continue to keep this function.
So I am removing it from this list.
Closes#36987
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36987 from tanvi-jagtap:gpr_log_verbosity_init_removal cbfb969f34
PiperOrigin-RevId: 645274187
These are substitutes for language features and never warrant a new function being created. Significantly boosts the benchmarks in #36946Closes#36981
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36981 from ctiller:seqqy 1a075be7e9
PiperOrigin-RevId: 645169296
[Gpr_To_Absl_Logging] Remove custom logger from php. Not supported anymore.
While I am writing a custom absl LogSink to fix the issue in the next Pull Request,
I wanted to know if not having this LogSink is a release blocker or not.
Closes#36962
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36962 from tanvi-jagtap:fix_php_logging 1374cbc838
PiperOrigin-RevId: 645056513
[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#36980
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36980 from tanvi-jagtap:src_core_lib_promise_filter 19ed6234f4
PiperOrigin-RevId: 645050090
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 e7ad4c67a2
PiperOrigin-RevId: 644483948
<!--
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#36963
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36963 from XuanWang-Amos:add_csm_to_verify_python_release 3e64130771
PiperOrigin-RevId: 644470995
[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 9ab8de800d
PiperOrigin-RevId: 644229971
There's something new in the works, so it's time that this unmaintained & broken system got garbage collected.
Closes#36952
PiperOrigin-RevId: 644184198
Do not set `absl::MinLogLevel` if user does not set `GRPC_VERBOSITY`. Only set `absl::MinLogLevel` if the user has specified `GRPC_VERBOSITY`.
Background:
gRPC Core overrides the setting of `absl::MinLogLevel` based on the setting of `GRPC_VERBOSITY`.
`GRPC_VERBOSITY` defaults to the setting of `GPR_DEFAULT_LOG_VERBOSITY_STRING` if that env var is not set, resulting in the consequence that gRPC Core would override the setting of `absl::MinLogLevel` even if the user had previously modified it.
Note that even with this change, the minimum log severity that's printed remains at `ERROR` by default.
Closes#36931
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36931 from yashykt:ChangeDefaultGrpcVerbosity ee92404c35
PiperOrigin-RevId: 644127489
Ensure arena accounting is working, and add a test that a constant call size results in a constant call size estimate.
Closes#36933
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36933 from ctiller:arena-accounts 116c805633
PiperOrigin-RevId: 644102412
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 3e2a80b40d
PiperOrigin-RevId: 644034593
<!--
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.
-->
Similar to https://github.com/grpc/grpc/pull/36755, this PR updates the image used by Go for interop tests that run against master.
Closes#36917
PiperOrigin-RevId: 644024756
[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#36939
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36939 from tanvi-jagtap:src_core_client_channel 2dc26fe18a
PiperOrigin-RevId: 643966218
Change was created by the release automation script. See go/grpc-release.
Closes#36892
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36892 from XuanWang-Amos:bump_dev_version_202406112301 9b2898d716
PiperOrigin-RevId: 643027546
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 1cc0cbdc4b
PiperOrigin-RevId: 642774012
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 6a539fe320
PiperOrigin-RevId: 642755276
- 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 e3b88e7d86
PiperOrigin-RevId: 642702724
<!--
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#36874
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36874 from XuanWang-Amos:remove_common_proto_dep 51400c5aff
PiperOrigin-RevId: 642424550
Change was created by the release automation script. See go/grpc-release.
Closes#36887
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36887 from XuanWang-Amos:bump_core_version_202406111526 5df15650dd
PiperOrigin-RevId: 642358496
All TraceFlags are now configured in `src/core/lib/debug/trace_flags.yaml`. The format is:
```
my_flag:
default: false # the default value; default=false
description: Some Description
debug_only: false # debug_only flags only work in debug builds; default=false
internal: false # internal flags will not show up in documentation; default=false
```
To regenerate the trace flag source code, run `tools/codegen/core/gen_trace_flags.py` (requires mako). This script is also run when sanity checking.
This PR also adds two new features:
### Glob-based flag configuration
Trace flag configuration now supports `?` (single wildcard character) and `*` (one or more wildcard characters). For example, using `GRPC_TRACE='event_engine*'` will enable all flags that match that glob. It expands to:
* event_engine
* event_engine_client_channel_resolver
* event_engine_dns
* event_engine_endpoint
* event_engine_endpoint_data
* event_engine_poller
### A cleaner trace-logging macro in abseil logging format
If your goal is only to add log statements when the `fault_injection_filter` trace flag is enabled, you can use the macro:
```
GRPC_TRACE_LOG(fault_injection, INFO) << "Filtered:" << 42;
```
When the trace flag is enabled, the the log will show something like this:
```
I0000 00:00:1715733657.430042 16 file.cc:174] Filtered:42
```
----
Note: just like with the gpr_log to abseil logging conversion, the pre-existing trace logging usages can be replaced with the new tracing macro across multiple PRs.
Closes#36576
PiperOrigin-RevId: 641295215
Use the latest golang base image for Go interop tests. Presently the latest image points to Go 1.22.
<!--
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.
-->
## Commands run
To render the Dockerfile from its template
```sh
$ tools/buildgen/generate_projects.sh
```
To build and upload the base docker image.
```sh
$ tools/dockerfile/push_testing_images.sh
```
To build and upload the interop docker image for grpc-go 1.64.0
```sh
$ tools/interop_matrix/create_matrix_images.py --git_checkout --release=v1.64.0 --upload_images --language go
```
To verify the image is uploaded
```sh
$ gcloud container images list-tags gcr.io/grpc-testing/grpc_interop_go1.x
DIGEST TAGS TIMESTAMP
b36be4961ec4 infrastructure-public-image-v1.64.0,v1.64.0 2024-06-03T22:26:48
```
Verify the backward compatability tests pass
```sh
$ export docker_image=gcr.io/grpc-testing/grpc_interop_go1.x:v1.64.0
$ tools/interop_matrix/testcases/go__master
Testing gcr.io/grpc-testing/grpc_interop_go1.x:v1.64.0
```
Fixes: https://github.com/grpc/grpc/issues/36060Closes#36755
PiperOrigin-RevId: 641272572
This task was parallelized into 16 sub-tasks, but 32 cores are available. Let's see if this speeds up CI, the clang-tidy job usually takes about 30m to 40m.
Closes#36838
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36838 from drfloob:tidy-32 81edd68348
PiperOrigin-RevId: 641014003
Usage: `bazel build --config=clang-cl --build_tag_filters=-no_windows :all`
The highlight, for me anyway: thread safety annotation checking can now be done on Windows-only code.
clang-cl's interpretation of `-Wall` differs from that of clang on linux. This PR uses the set of warnings enabled on linux, and whittles down the list until all builds pass. I left comments in `copts.bzl` describing the warnings, many of which can be removed with targeted code cleanups.
Closes#36831
PiperOrigin-RevId: 641009783