Commit Graph

13555 Commits

Author SHA1 Message Date
Sergii Tkachenko 02ceb72fcf
[Release] Add grpc-java 1.56.0 to client_matrix.py (#33433) 2023-06-14 16:38:44 -07:00
Craig Tiller 1bfcca66fe
Revert "[testing] Adjust port selection algorithm on RBE" (#33448)
Reverts grpc/grpc#33429
2023-06-14 14:51:23 -07:00
Sergii Tkachenko 181a24f546
[PSM Interop] Pip freeze breaks down into requirements and their deps (#33426)
This is a no-op, just reordering `requirements.lock`.

By providing `-r requirements.txt` to `pip freeze` it's able to break up
dependencies required via `requirements.txt`, and sub-dependencies
installed to satisfy them.
2023-06-14 13:15:29 -07:00
Craig Tiller 969c228934
[testing] Adjust port selection algorithm on RBE (#33429)
I've got a hypothesis that we're losing isolation between test shards
right now for "some reason".

This is a change to reflect test sharding in the port distribution that
we use, in an attempt to alleviate that.

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-06-14 12:21:59 -07:00
Craig Tiller 80dbe90c18
Revert "[resource quota] Fix bugs in iomgr and event engine endpoint interactions with resource quota" (#33417)
Reverts grpc/grpc#33375

Breaks import
2023-06-13 08:11:53 -07:00
Craig Tiller 7e6606f5a6
[windows] Add a check for too long path names (#33418)
We should probably cap this so that our customers have a chance of
cloning the repository.

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-06-13 07:41:06 -07:00
Vignesh Babu e6c1b13aed
[resource quota] Fix bugs in iomgr and event engine endpoint interactions with resource quota (#33375)
The following bugs are fixed:

* Missing ExecCtx in event engine endpoints and listeners
* Ref counting issue with iomgr endpoint which causes crashes in
overloaded situations

The PR includes a test which triggers these bugs by simulating an
overloaded system.
2023-06-12 16:20:08 -07:00
apolcyn 017786f151
[c-ares] Upgrade c-ares dependency to 1.19.1 (#33392)
WIP
2023-06-12 13:38:20 -07:00
Esun Kim 076f719286
Revert "Revert "[Test] Dedup vs2019 test in the Windows test" (#33393)" (#33394) 2023-06-09 16:10:29 -07:00
Sergii Tkachenko de6ed9ba9f
[Python] Migrate from yapf to black (#33138)
- Switched  from yapf to black
- Reconfigure isort for black
- Resolve black/pylint idiosyncrasies 

Note: I used `--experimental-string-processing` because black was
producing "implicit string concatenation", similar to what described
here: https://github.com/psf/black/issues/1837. While currently this
feature is experimental, it will be enabled by default:
https://github.com/psf/black/issues/2188. After running black with the
new string processing so that the generated code merges these `"hello" "
world"` strings concatenations, then I removed
`--experimental-string-processing` for stability, and regenerated the
code again.

To the reviewer: don't even try to open "Files Changed" tab 😄 It's
better to review commit-by-commit, and ignore `run black and isort`.
2023-06-09 15:08:55 -07:00
Esun Kim e9e5dc0cf6
Revert "[Test] Dedup vs2019 test in the Windows test" (#33393)
Reverts grpc/grpc#33385

Temporary revert to unblock https://github.com/grpc/grpc/pull/33138
2023-06-09 15:08:20 -07:00
Esun Kim 6b3949593d
[Test] Dedup vs2019 test in the Windows test (#33385)
`cmake_ninja_vs2019` and `default` are using the same
`cmake_ninja_vs2019` so having two tests are waste so this is removing
`cmake_ninja_vs2019` leaving `default` which does `cmake_ninja_vs2019`.

This change can cut the space consumption by half and with 250GB disc, 

- Pre-test: 267,770,322,944 bytes free 
- Post-test: 134,499,295,232 bytes free
2023-06-09 13:52:58 -07:00
Sergii Tkachenko a95e8c4ff4
[PSM Interop] Improve assertRpcStatusCodes before/after stats logging (#33360)
Do not clutter the final error we see at the end with the before/after
stats.

#### Examples

###### Expected only status A, but found status B for method M:

```
[  FAILED  ] CustomLbTest.test_custom_lb_config
======================================================================
FAIL: test_custom_lb_config (__main__.CustomLbTest)
CustomLbTest.test_custom_lb_config
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/sergiitk/Development/grpc/tools/run_tests/xds_k8s_test_driver/tests/custom_lb_test.py", line 113, in test_custom_lb_config
    self.assertRpcStatusCodes(test_client,
  File "/Users/sergiitk/Development/grpc/tools/run_tests/xds_k8s_test_driver/framework/xds_k8s_testcase.py", line 345, in assertRpcStatusCodes
    found_status = helpers_grpc.status_from_int(found_status_int)
AssertionError: Expected only status (15, DATA_LOSS), but found status (0, OK) for method UNARY_CALL.
Diff stats:
- method: UNARY_CALL
  rpcs_started: 251
  result:
    (0, OK): 251
```

###### Expected non-zero RPCs with status A for method M.
```
[  FAILED  ] AuthzTest.test_plaintext_allow
======================================================================
FAIL: test_plaintext_allow (__main__.AuthzTest)
AuthzTest.test_plaintext_allow
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/sergiitk/Development/grpc/tools/run_tests/xds_k8s_test_driver/tests/authz_test.py", line 224, in test_plaintext_allow
    self.configure_and_assert(test_client, 'host-wildcard',
  File "/Users/sergiitk/Development/grpc/tools/run_tests/xds_k8s_test_driver/tests/authz_test.py", line 204, in configure_and_assert
    self.assertRpcStatusCodes(test_client,
  File "/Users/sergiitk/Development/grpc/tools/run_tests/xds_k8s_test_driver/framework/xds_k8s_testcase.py", line 355, in assertRpcStatusCodes
    self.assertGreater(stats.result[expected_status_int],
AssertionError: 0 not greater than 0 : Expected non-zero completed RPCs with status (0, OK) for method EMPTY_CALL.
Diff stats:
- method: EMPTY_CALL
  rpcs_started: 13
  result: {}
```
2023-06-08 22:27:13 -07:00
Craig Tiller d8f3dab96c
[end2end] Binary & fuzzer per test .cc (#33374)
<!--

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-06-08 15:38:53 -07:00
Yousuk Seung c03cd744b2
[WRR] Prefer application_utilization to cpu_utilization (#33355)
<!--

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-06-07 17:38:29 -07:00
Yadong 18c42a21af
[core] Add support for vsock transport (#33309)
Revert "Revert "[core] Add support for vsock transport"
(https://github.com/grpc/grpc/pull/33276)"
This reverts commit
c5ade3011a.

And fix the issue which broke the python build.

@markdroth @drfloob please review this PR. Thank you very much.

---------

Co-authored-by: AJ Heller <hork@google.com>
2023-06-07 13:55:53 -07:00
Craig Tiller 1f85fb21f2
[metadata] Improve codegen for name lookups (#33237)
The approach of doing a recursive function call to expand the if checks
for known metadata names was tripping up an optimization clang has to
collapse that if/then tree into an optimized tree search over the set of
known strings. By unrolling that loop (with a code generator) we start
to present a pattern that clang *can* recognize, and hopefully get some
more stable and faster code generation as a benefit.

<!--

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.

-->

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-06-06 14:43:55 -07:00
Craig Tiller 683261d217
[experiments] Fix debug behavior (#33358)
<!--

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-06-06 14:25:57 -07:00
Xuan Wang 629b7a14da
[python O11Y] Initial Implementation (#32974)
Testing Command: `bazel test --cache_test_results=no
--test_output=streamed --runs_per_test=1 --test_timeout=10
"//src/python/grpcio_tests/tests/observability:_observability_test"`

### TODO:
 * Better error handling.
2023-06-05 16:11:52 -07:00
Sergii Tkachenko 805a0dd48b
[PSM Interop] Prettify LB stats output (#33261)
Improvements to the `LoadBalancerAccumulatedStatsRequest` output. Makes
it readable.

This greatly affects `assertRpcStatusCodes()` output, used in authz and
custom_lb.
No before and after stats, just useful diff stats from now. Minimal and
readable.
Also diff stats have `rpcs_started` now.


![image](https://github.com/grpc/grpc/assets/672669/a4e38d82-be5a-4f31-9d88-da2bf9712d9b)

Output example:
```
--- Starting subTest __main__.AuthzTest.test_plaintext_allow.01_host_wildcard ---
[psm-grpc-client-765bfbf868-jqjm7:51561] >> RPC LoadBalancerStatsService.GetClientAccumulatedStats(request=LoadBalancerAccumulatedStatsRequest({}), wait_for_ready=True, timeout=600)
[psm-grpc-client-765bfbf868-jqjm7:51561] >> RPC XdsUpdateClientConfigureService.Configure(request=ClientConfigureRequest({'types': ['EMPTY_CALL'], 'metadata': [{'key': 'test', 'value': 'host-wildcard'}]}), timeout=5, wait_for_ready=True)
[psm-grpc-client-765bfbf868-jqjm7:51561] >> RPC LoadBalancerStatsService.GetClientAccumulatedStats(request=LoadBalancerAccumulatedStatsRequest({}), wait_for_ready=True, timeout=600)
[psm-grpc-client-765bfbf868-jqjm7:51561] >> RPC LoadBalancerStatsService.GetClientAccumulatedStats(request=LoadBalancerAccumulatedStatsRequest({}), wait_for_ready=True, timeout=600)
[psm-grpc-client-765bfbf868-jqjm7] << Received accumulated stats difference. Expecting RPCs with status (0, OK) for method EMPTY_CALL.
- method: EMPTY_CALL
  rpcs_started: 13
  result:
    (0, OK): 14

--- Finished subTest __main__.AuthzTest.test_plaintext_allow.01_host_wildcard ---
```

In case of test failure, it'll still print all stats at the end,
including before and after:
```
AssertionError: Expected only status (15, DATA_LOSS), but found status (0, OK) for method UNARY_CALL.
Stats before:
- method: UNARY_CALL
  rpcs_started: 2153
  result:
    (14, UNAVAILABLE): 1674
    (0, OK): 479

Stats after:
- method: UNARY_CALL
  rpcs_started: 2404
  result:
    (0, OK): 730
    (14, UNAVAILABLE): 1674

Diff stats:
- method: UNARY_CALL
  rpcs_started: 251
  result:
    (0, OK): 251
```

And as I was at it, also made `LoadBalancerStatsResponse` nice:


![image](https://github.com/grpc/grpc/assets/672669/b15908a7-bae4-41a0-a2f7-c903e398432a)
2023-06-02 14:02:28 -07:00
Vignesh Babu 4adf95ca9e
[experiments] Fix experiment expiry and avoid failing BUILDS on expired experiments. (#33325) 2023-06-02 11:30:17 -07:00
Yijie Ma 5a0678001b
[Release] Bump version to 1.57.0-dev (on master branch) (#33311)
Change was created by the release automation script. See
go/grpc-release.
2023-06-01 10:55:31 -07:00
Vignesh Babu 173d225150
[experiments] Add a grpc_generate_one_off_internal_targets hook in the BUILD file (#33307)
This allows us to define and insert internal only targets.
2023-06-01 10:23:00 -07:00
Yijie Ma bde995281a
[Release] Bump core version to 33.0.0 for upcoming release (#33292)
Change was created by the release automation script. See
go/grpc-release.
2023-05-31 14:01:28 -07:00
Xuan Wang 40ee9084e9
[PSM interop] Don't fail target if sub-target already failed (#33222)
We configured TestGrid to file bug separately for each failed
sub-target, if we still fail the main target, TestGrid will fail
duplicate bugs.
2023-05-31 12:58:52 -07:00
Esun Kim 931c6e31fb
[Test] Disable gcc10.2_openssl102 from portability tests (#33287)
b/283304471: Currently h2_ssl_cert_test failing under openssl102 so this
is being disabled temporarily until it's fixed.
2023-05-31 11:34:02 -07:00
Vignesh Babu ad4d495570
[experiments] Fix bug in codegen for debug experiments (#33282)
Somehow this was missed earlier because none of the experiments were
enabled in debug builds.
2023-05-31 08:29:00 -07:00
Sergii Tkachenko 531a6be335
[PSM Interop] Fix an issue with restarting k8s runner (#33280)
Fixes the issue introduced in https://github.com/grpc/grpc/pull/33104,
where stopping the current run didn't reset `self.time_start_requested`,
`self.time_start_completed`, `self.time_start_stopped`. Because of this,
the subsetting test (the only one [redeploying the client
app](10001d16a9/tools/run_tests/xds_k8s_test_driver/tests/subsetting_test.py (L73C1-L74)))
started failing with:

```py
Traceback (most recent call last):
  File "xds_k8s_test_driver/tests/subsetting_test.py", line 76, in test_subsetting_basic
    test_client: _XdsTestClient = self.startTestClient(
  File "xds_k8s_test_driver/framework/xds_k8s_testcase.py", line 615, in startTestClient
    test_client = self.client_runner.run(server_target=test_server.xds_uri,
  File "xds_k8s_test_driver/framework/test_app/runners/k8s/k8s_xds_client_runner.py", line 110, in run
    super().run()
  File "xds_k8s_test_driver/framework/test_app/runners/k8s/k8s_base_runner.py", line 112, in run
    raise RuntimeError(
RuntimeError: Deployment psm-grpc-client: has already been started at 2023-05-27T13:47:15.262461
```

This PR:
1. Instead of relying on the `time_start_requested`,
`time_start_stopped` to produce GCP links, tracks the history run of
each deployment. This fixes the issue described above, and adds support
for listing all past runs executed by a k8s runner.
2. Minor: remove the unnecessary call to `test_client.cleanup()` when
there's no past deployment runs (e.g. at the first iteration of `for i
in range(_NUM_CLIENTS):`)
2023-05-30 19:58:49 -07:00
AJ Heller c5ade3011a
Revert "[core] Add support for vsock transport" (#33276)
Reverts grpc/grpc#32847. Breaks the Python build.
2023-05-30 14:31:26 -07:00
Richard Belleville ba3a5d762a
[codegen] Switch from yaml.load to yaml.safe_load (#33275) 2023-05-30 14:20:19 -07:00
Vignesh Babu d11a62e3d0
[experiments] Re-structure experiments codegen to make it more modular and re-usable (#33263) 2023-05-30 11:36:53 -07:00
Yadong 9d765860ef
[core] Add support for vsock transport (#32847)
This is another attempt to add support for vsock in grpc since previous
PRs(#24551, #21745) all closed without merging.

The VSOCK address family facilitates communication between
virtual machines and the host they are running on.
This patch will introduce new scheme: [vsock:cid:port] to
support VSOCK address family.

Fixes #32738.

---------

Signed-off-by: Yadong Qi <yadong.qi@intel.com>
Co-authored-by: AJ Heller <hork@google.com>
Co-authored-by: YadongQi <YadongQi@users.noreply.github.com>
2023-05-30 09:46:49 -07:00
Craig Tiller 272a89ad2b
[include-guards] Fix regular expression (#33270)
It's completely legitimate to have a zero in a filename/include guard.

<!--

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-05-30 09:22:24 -07:00
Sergii Tkachenko acbac3deee
[PSM Interop] Output GCP log links at the end of the test (#33104)
Output example:

```
I0512 21:33:09.879951 140704627381056 xds_k8s_testcase.py:482] ----- TestMethod __main__.BaselineTest.test_traffic_director_grpc_setup teardown -----
I0512 21:33:09.880299 140704627381056 traffic_director.py:582] Deleting Forwarding rule "sergiitk-forwarding-rule-20230513-0428-aolg9"
...
I0512 21:35:53.437206 140704627381056 xds_k8s_testcase.py:491] ----- Test client/server logs -----
I0512 21:35:53.437497 140704627381056 k8s_base_runner.py:491] GCP Logs Explorer link to psm-grpc-client:
https://pantheon.corp.google.com/logs/query;query=resource.type%3D%22k8s_container%22%0Aresource.labels.project_id%3D%22sergiitk-grpc-gke%22%0Aresource.labels.container_name%3D%22psm-grpc-client%22%0Aresource.labels.namespace_name%3D%22sergiitk-client-20230513-0428-aolg9%22;timeRange=2023-05-13T04:30:45.361596Z%2F2023-05-13T04:34:41.227014Z?project=sergiitk-grpc-gke
I0512 21:35:53.437677 140704627381056 k8s_base_runner.py:491] GCP Logs Explorer link to psm-grpc-server:
https://pantheon.corp.google.com/logs/query;query=resource.type%3D%22k8s_container%22%0Aresource.labels.project_id%3D%22sergiitk-grpc-gke%22%0Aresource.labels.container_name%3D%22psm-grpc-server%22%0Aresource.labels.namespace_name%3D%22sergiitk-server-20230513-0428-aolg9%22;timeRange=2023-05-13T04:29:41.171388Z%2F2023-05-13T04:35:53.437068Z?project=sergiitk-grpc-gke
[       OK ] BaselineTest.test_traffic_director_grpc_setup
```
2023-05-26 16:17:23 -07:00
Mark D. Roth 52d687ad42
[xDS] second attempt: clean up cert provider factory and registry APIs (#33249)
Original was #33226, reverted in #33248.
2023-05-25 12:59:21 -07:00
Craig Tiller 8cb7e610c3
[experiments] Make monitoring_experiment never expire (#33250)
<!--

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-05-25 11:52:21 -07:00
Paulo Castello da Costa 9e9468d621
[test] Make languages in OSS benchmarks easier to comment in and out. (#33238) 2023-05-25 11:36:55 -07:00
Craig Tiller 9faa39d88b
Revert "[xDS] clean up cert provider factory and registry APIs" (#33248)
Reverts grpc/grpc#33226

(looks to be creating some import problems)
2023-05-25 09:56:01 -07:00
Mark D. Roth eb2b1edd1c
[xDS] clean up cert provider factory and registry APIs (#33226)
- switch to json_object_loader for config parsing
- use `absl::string_view` instead of `const char*` for cert provider
names
- change cert provider registry to use a map instead of a vector
- remove unused mesh_ca cert provider factory
2023-05-24 15:38:39 -07:00
Vignesh Babu 4d85f514cb
[experiments] Split experiments into two separate experiment definition and rollout definition files (#33228)
The PR does the following:

* Splits the single experiments.yaml file into two files:
experiments.yaml and rollouts.yaml.
* The experiments.yaml will now only include experiment definitions. The
default values of the experiments must now be specified in rollouts.yaml
* Removes the 'release' default value because it is not used.
* Adds an additional_constraints character string to ExperimentMetadata.
* Introduces a hook in src/core/lib/experiments/config.h to allow
registering arbitrary experiment constraint validation callbacks. These
callbacks would take an ExperimentMetadata object as input and return
the correct value to use for an experiment subject to additional
constraints.
2023-05-24 13:41:22 -07:00
Paulo Castello da Costa ed2c7104f4
[test] Fix env vars in experimental benchmarks script. (#33232) 2023-05-24 10:45:52 -07:00
AJ Heller d58af7397f
[example] Move unix abstract domain sockets example (#33220)
A different scheme was decided upon for adding feature examples. This
moves the old UDS example and deletes the CI job.
2023-05-23 12:53:51 -07:00
Craig Tiller b71b3b410c
[memory] Trim down 'per-cpu' sharding a little (#33203)
Most of these data structures need to scale a bit like per-cpu, but not
entirely. We can have more than one cpu hit the same instance in most
cases, and probably want to cap out before the hundreds of shards some
platforms have.

<!--

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.

-->

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-05-22 09:14:34 -07:00
Wanlin Du 255d5bd875
[test] Add ENV to help running CI from forked repos. (#33189)
This PR updated some related ENV to allow use modify the repo where the
source code
can be pulled from when running an ephemeral kokoro test.
2023-05-19 17:47:10 -07:00
Craig Tiller 338c55978b
[threading] Implement thready-tsan mode (#33193)
This test mode tries to create threads wherever it legally can to
maximize the chances of TSAN finding errors in our codebase.

<!--

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.

-->

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-05-19 17:26:11 -07:00
Yash Tibrewal d14f5f78d7
[Release] Add 1.55.0 to interop matric for C++, ruby, php, python (#33198)
<!--

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-05-19 14:02:11 -07:00
Craig Tiller 95c57d9ff5
[config] Better comma separated list support (#33182)
Allow for multiple `--grpc_experiments`, `--grpc_trace` command line
arguments to be added, accumulate them, and provide them to gRPC as one
thing.

<!--

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.

-->

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-05-18 20:55:49 -07:00
Esun Kim a3dae00f89
[Deps] Upgrade Protobuf to v23.1 (#33164)
Along with the required Abseil & upb upgrade.
2023-05-18 14:46:59 -07:00
Craig Tiller 0526a51734
[channel-args] Reland UnionWith optimizations (#33163)
Same as yesterday, with a fix in
695e2e24ba.
2023-05-17 17:23:58 -07:00
Yijie Ma 004ddbea90
[BoringSSL] Update third_party/boringssl-with-bazel (#33150)
Change was created by the release automation script. See go/grpc-release
2023-05-17 09:20:54 -07:00