Commit Graph

268 Commits

Author SHA1 Message Date
Yash Tibrewal 98417f3bd0
Revert "Revert "[otel] Add bazel dependency"" (#33560)
Reverts grpc/grpc#33559
2023-06-27 12:28:47 -07:00
Mark D. Roth 017153a0c5
Revert "[otel] Add bazel dependency" (#33559)
Reverts grpc/grpc#33548
2023-06-27 10:34:45 -07:00
Yash Tibrewal 875b7fdcff
[otel] Add bazel dependency (#33548)
Add bazel dependency on opentelemetry-cpp.
<!--

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-27 00:47:01 -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
Craig Tiller f1bba530a5
[infra] Make tools/buildgen/generate_projects.py non-executable (#33042)
This file does not contain a shebang, and whenever I try and run it it
wedges my console into some weird state.
There's a .sh file with the same name that should be run instead. Remove
the executable bit of the thing we shouldn't run directly so we, like,
don't.

<!--

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-08 17:01:20 -07:00
Jan Tattermusch 0f1afec5a8
[protobuf] Upgrade third_party/protobuf to 22.x (#32606)
The very non-trivial upgrade of third_party/protobuf to 22.x
This PR strives to be as small as possible and many changes that were
compatible with protobuf 21.x and didn't have to be merged atomically
with the upgrade were already merged.
Due to the complexity of the upgrade, this PR wasn't created
automatically by a tool, but manually. Subsequent upgraded of
third_party/protobuf with our OSS release script should work again once
this change is merged.

This is best reviewed commit-by-commit, I tried to group changes in
logical areas.

Notable changes:
- the upgrade of third_party/protobuf submodule, the bazel protobuf
dependency itself
- upgrade of UPB dependency to 22.x (in the past, we used to always
upgrade upb to "main", but upb now has release branch as well). UPB
needs to be upgraded atomically with protobuf since there's a de-facto
circular dependency (new protobuf depends on new upb, which depends on
new protobuf for codegen).
- some protobuf and upb bazel rules are now aliases, so `
extract_metadata_from_bazel_xml.py` and `gen_upb_api_from_bazel_xml.py`
had to be modified to be able to follow aliases and reach the actual
aliased targets.
- some protobuf public headers were renamed, so especially
`src/compiler` needed to be updated to use the new headers.
- protobuf and upb now both depend on utf8_range project, so since we
bundle upb with grpc in some languages, we now have to bundle utf8_range
as well (hence changes in build for python, PHP, objC, cmake etc).
- protoc now depends on absl and utf8_range (previously protobuf had
absl dependency, but not for the codegen part), so python's
make_grpcio_tools.py required partial rewrite to be able to handle those
dependencies in the grpcio_tools build.
- many updates and fixes required for C++ distribtests (currently they
all pass, but we'll probably need to follow up, make protobuf's and
grpc's handling of dependencies more aligned and revisit the
distribtests)
- bunch of other changes mostly due to overhaul of protobuf's and upb's
internal build layout.

TODOs:
- [DONE] make sure IWYU and clang_tidy_code pass
- create a list of followups (e.g. work to reenable the few tests I had
to disable and to remove workaround I had to use)
- [DONE in cl/523706129] figure out problem(s) with internal import

---------

Co-authored-by: Craig Tiller <ctiller@google.com>
2023-04-12 18:43:58 +02:00
Craig Tiller 724441d85b
[tests] Convert core e2e tests to gtest (#32603)
Notes:
- `+trace` fixtures haven't run since 2016, so they're disabled for now
(7ad2d0b463 (diff-780fce7267c34170c1d0ea15cc9f65a7f4b79fefe955d185c44e8b3251cf9e38R76))
- all current fixtures define `FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER`
and hence `authority_not_supported` has not been run in years - deleted
- bad_hostname similarly hasn't been triggered in a long while, so
deleted
- load_reporting_hook has never been enabled, so deleted
(f23fb4cf31/test/core/end2end/generate_tests.bzl (L145-L148))
- filter_latency & filter_status_code rely on global variables and so
don't convert particularly cleanly - and their value seems marginal, so
deleted

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-04-03 22:19:57 -07:00
Jan Tattermusch d812dc6757
Simplify tools/buildgen/extract_metadata_from_bazel_xml.py to prepare for protobuf upgrade. (#32590)
`bazel query deps(//src/proto/...)` seems unnecessary (regenerated
projects are identical) and causes trouble with protobuf 22.x (since it
basically breaks `tools/buildgen/generate_projects.sh` run and that
makes upgrade experiments painful).
2023-03-13 09:02:32 +01:00
Stanley Cheung db62c06171
GCP Observability testing for C++ (#32531)
Third try for #32466. 

This adds an interop client / server for GCP Observability integration
testing.

Everything is new here with no refactor. Plan is to get this in first
before trying to refactor out the flags.
2023-03-02 18:10:48 -08:00
Craig Tiller 78c799bce6
Revert "GCP Observability testing for C++" (#32518)
Reverts grpc/grpc#32466
2023-03-01 23:11:07 -08:00
Stanley Cheung f217a732d3
GCP Observability testing for C++ (#32466)
This PR enables GCP Observability testing for C++.

This re-uses the existing interop test client and server and adds an
`--enable_observability=true` flag.

This also adds a `Dockerfile` and `run.sh` script to allow the test
framework to execute the test.


Framework PR:
https://github.com/GoogleCloudPlatform/grpc-gcp-tools/pull/18
Java PR: https://github.com/grpc/grpc-java/pull/9858
Golang PR: https://github.com/grpc/grpc-go/pull/5979
2023-03-01 14:25:02 -08:00
Yash Tibrewal ad6f6c49e0
Logging filter (#31755)
* initial

* Intermediate

* Another try

* Try multiple necesary pulls

* Filter works other than client half close

* Fixes

* Add a cancelled RPC test

* Handle trailer only responses

* Tests for disabled logging and truncated payloads

* Fix authority and peer

* Add TODOs and asserts for half-close

* Fix tests for half-close and cancel

* 2d748fcb1cf45cac62729b8346ad15e6abc79e97

* Fix sanity checks

* Strict bazel build

* Fix package

* IWYU

* Fix cmake

* Explicit cast to string

* Size casts

* Fix Arena leak and disable macos build for now

* Reviewer comments
2023-01-06 13:52:15 -08:00
Cheng-Yu Chung 384982ba2b
[bugfixes] Fix vulnerability for PyYAML (#32007)
* Fix vulnerability for PyYAML

* Fix

* Revert "Fix"

This reverts commit 5522d226c4.

* Fix

* Fix format
2023-01-04 12:33:29 +08:00
Craig Tiller 72c296a3c2
[event_engine] Add SliceCast (#31831)
* [event_engine] Add SliceCast

* Automated change: Fix sanity tests

* windows-fix

* comments

* comments

* comments

* build-fix

* fix

* Update port_platform.h

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-12-20 19:46:27 -08:00
Stanley Cheung fa42edef83
Update PHP docker images PHP versions (#31779) 2022-12-07 13:20:48 -08:00
Valentin c45e4f003d
gRPC: Add grpc_authorization_provider to CMake (#31308)
* gRPC: Add grpc_authorization_provider to CMake

* Added _gRPC_RE2_LIBRARIES

* Added _gRPC_RE2_LIBRARIES

* Undo formattig

* Changed .template

* change commit message for CLA
2022-11-15 09:30:41 -08:00
AJ Heller 95aeffcb73
Pythonify extract_metadata_from_bazel_xml.py (#30796)
Autodetected improvements.
2022-09-12 13:07:02 -07:00
Yash Tibrewal 60a1b4ad6f
Revert "Revert "GCP Observability: Add plugin registry API"" (#30766)
* Revert "Revert "GCP Observability: Add plugin registry API (#30571)" (#30765)"

This reverts commit b8fde2ab47.

* Remove gcp observability target from header
2022-08-29 17:22:03 -07:00
Craig Tiller b8fde2ab47
Revert "GCP Observability: Add plugin registry API (#30571)" (#30765)
This reverts commit 486710317f.
2022-08-26 09:42:19 -07:00
Yash Tibrewal 486710317f
GCP Observability: Add plugin registry API (#30571)
* GCP Observability: Add plugin registry API

* Restrict visibility for now

* Move GcpObservability to its own thing

* Reviewer comments
2022-08-26 09:22:48 -07:00
Craig Tiller ef6a5b92c9
[build] Automatic BUILD dependency generation (#29597)
* [build] Automatic dependency analysis

* add to sanity

* Automated change: Fix sanity tests

* review feedback

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-05-19 13:42:52 -07:00
Jan Tattermusch e8404698d5
Remove C# implementation (individual packages will continue to be maintained through v2.46.x patches or moved to grpc-dotnet) (#29225)
* remove examples/csharp

* remove reference to examples/csharp

* remove C# references from doc/

* remove src/csharp

* update test_creds locations

* remove C# distribtests

* remove buildgen templates for files under src/csharp

* remove grpc_csharp_ext C build target

* regenerate projects

* update tools/run_tests/README.md

* change many C# test/build scripts to noop

* unbreak run_tests.py -l csharp

* unbreak C# build_package targets

* unbreak C# distribtests

* remove C# pre-build steps from prepare_build_windows.bat

* remove src/csharp from clang_format

* remove csharp and csharpcoreclr from run_interop_tests.py

* remove C# interop test docker images

* Revert "remove src/csharp"

This reverts commit 97f2b6d707.

* remove src/csharp, but keep Grpc.Tools

* add back templates/src/csharp/build/dependencies.props.template

* remove everything but Grpc.Tools and Grpc.Tools.Tests from sln

* Revert "unbreak run_tests.py -l csharp"

This reverts commit 529b5e2ec1.

* revive Grpc.Tools.Tests through run_tests.py

* Revert "unbreak C# build_package targets"

This reverts commit 79d8d83c8b.

* experiment with build_nuget.sh fixes

* simplify create_fake_native_artifacts.sh

* building of Grpc.Tools in package_targets.py

* move shared files from Grpc.Core to Grpc.Tools

* yapf format: distribtest_targets.py

* Revert "remove C# pre-build steps from prepare_build_windows.bat"

This reverts commit bd38956a2b.

* update C# README.md

* disable C# in gke OSS benchmarks
2022-04-28 12:00:34 +02:00
Lidi Zheng ec5b3b22c3
Remove var type annotations in extract_metadata_from_bazel_xml (#29463)
* Remove var type annotations in extract_metadata_from_bazel_xml

* Use plain-old Python class to store data

* No more f-string

* Remove version check in generate_projects.py
2022-04-21 12:53:20 -07:00
Lidi Zheng b3ded99cd4
Add a raise for generate_projects if Python is too old (#29432)
* Add a raise for generate_projects if Python is too old

* Update the comment

* Resolve the YAPF difference between local 0.30 and kokoro's 0.30

* YAPF
2022-04-18 15:24:48 -07:00
Lidi Zheng 99752b173c
[xDS Proto] Enhence gRPC buildgen for 3rd party proto compilation (#29254)
* [xDS Proto] Enhence gRPC buildgen for 3rd party proto compilation

* Rebase from master to update envoy-api version

* Address reviewer's comments

* Address reviewer's comment

* Regenerate project

* Rename external_library

* Address reviewer's comments

* Add comments for the internals of generate C++ proto code

* Add proto file as a dependency to the custom command
2022-04-13 14:26:08 -07:00
Richard Belleville e79b2a9b32
Add Documentation for Supported Bazel Versions (#29191)
* Create Bazel support range docs

* Review comments

* Move supported versions file
2022-03-25 10:45:06 -07:00
AJ Heller 762cde4d24
Delete end2end nosec tests (#28946)
* rm nosec tests (TODO: identify coverage differences)

* grpc::load_reporter

* delete unused nosec test files & config

* trigger build

* re-delete nosec test file (snuck in with a merge)

* revert TODO deletion
2022-03-07 08:52:30 -08:00
Craig Tiller 7c74d58cbe
Disable memory_usage test on cmake builds (#28948) 2022-02-23 17:21:55 +01:00
Esun Kim f1e79853ed
Revert "Revert "Buildify Envoy upb (#28558)" (#28648)" (#28649)
This reverts commit 01011ab259.
2022-01-25 11:19:41 -08:00
Esun Kim 01011ab259
Revert "Buildify Envoy upb (#28558)" (#28648)
This reverts commit 97584d8346.
2022-01-21 08:35:13 -08:00
Esun Kim 97584d8346
Buildify Envoy upb (#28558)
* Buildigy xds

* Generate project

* Buildify envoy

* Added new upb files

* Removed unused upb targets

* Fix grpc_cel_engine

* Update envoy-api to the latest

* Regen upb

* Regen projects

* Fix bazel build on MacOS

* More fix on bazel mac

* Disable grpc_tool_test on Mac

* Regen projects
2022-01-20 22:29:58 -08:00
Esun Kim e0a3a513a9
Buildify upb targets for validate & udpa (#28531)
* Buildify upb targets for validate & udpa

* Fix sanity test
2022-01-13 16:11:56 -08:00
Esun Kim 779701ab76
google/api/... (#27928) 2021-11-30 21:36:34 -08:00
Esun Kim 9be7ca5a55
Roll-forward #27780 (#27951)
* Revert "Revert #27780 (#27944)"

This reverts commit 26e7560309.

* Fix google_api_upbdefs
2021-11-18 18:18:02 -08:00
Richard Belleville 59693b7e72
Migrate Infrastructure Scripts to Python 3 (#27135)
* Run 2to3 on tools directory

* Delete github_stats_tracking

* Re-run 2to3

* Remove unused script

* Remove unused script

* Remove unused line count utility

* Yapf. Isort

* Remove accidentally included file

* Migrate tools/distrib directory to python 3

* Remove unnecessary shebang

* Restore line_count directory

* Immediately convert subprocess.check_output output to string

* Take care of Python 2 shebangs

* Invoke scripts using a Python 3 interpreter

* Yapf. Isort

* Try installing Python 3 first

* See if we have any Python 3 versions installed

* Add Python 3.7 to Windows path

* Try adding a symlink

* Try to symlink differently

* Install six for Python 3

* Run run_interop_tests with python 3

* Try installing six in python3.7 explicitly

* Revert "Try installing six in python3.7 explicitly"

This reverts commit 2cf60d72f3.

* And debug some more

* Fix issue with jobset.py

* Add debug for CI failure

* Revert microbenchmark changes
2021-11-08 08:55:25 -08:00
Esun Kim 26e7560309
Revert #27780 (#27944) 2021-11-04 15:00:37 -07:00
Esun Kim d5971f49c4
Added a new bazel-integrated upb code-gen (#27780)
* Added bazel-integrated upb code-gen

* Update by review

* Update by review
2021-11-01 12:51:48 -07:00
Yash Tibrewal 6d2a641dd3
XdsChannelStackModifier class (#27744)
* ChannelStackModifier class

* Regenerate projects

* clang-tidy

* Use CoreConfiguration for inserting xDS HTTP filters

* New lines

* Move test to test/core/xds

* Add comment for placement of filter stack

* Fix sanity

* Fix memory leak - destroy builder

* Don't build xds_channel_stack_modifier_test on non-bazel build systems due to census dependency
2021-10-22 13:48:30 -07:00
Craig Tiller a67a9a5cd5
Exclude microbenchmarks from cmake (#27588)
* Exclude microbenchmarks from cmake

* Trigger automation

* fix
2021-10-05 10:13:57 -07:00
Craig Tiller 87a973f01d
Add structurally aware fuzzing support (#27405)
* Add a dependency on libprotobuf-mutator

* Changes for structured fuzzing

* fuzznificent

* add a config that will build fuzzers

* bazel run --config=fuzzer_asan //path/to:fuzzer fuzzes!

* fixes

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* fixes

* fix

* sanitizer fix

* fix directory

* regen stuff

* compile error

* remove fuzzers from cmake build

* Automated change: Fix sanity tests

* review feedback

* remove unnecessary load

* review feedback

* review feedback

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2021-09-22 14:40:43 -07:00
AJ Heller 2d16865693
Delete libuv-iomgr implementation and GRPC_UV build option (#27188)
This has been unmaintained for years, last supported in gRPC-core v1.24.
2021-08-31 13:26:43 -07:00
Richard Belleville b6cc72f129
Revert "Run 2to3 on tools directory (#26002)" (#27183)
This reverts commit a388361c3d.
2021-08-30 12:29:20 -07:00
Richard Belleville a388361c3d
Run 2to3 on tools directory (#26002)
* Run 2to3 on tools directory

* Delete github_stats_tracking

* Re-run 2to3

* Remove unused script

* Remove unused script

* Remove unused line count utility

* Yapf. Isort

* Remove accidentally included file

* Restore line_count directory
2021-08-30 09:25:21 -07:00
Lidi Zheng 2231c2ba77
Introduce Python import sorting to our sanity test suite (#26768)
* Add isort_code.sh to sanity tests

* Run tools/distrib/isort_code.sh

* Fine tune the import order for relative imports

* Make pylint and project generation happy

* Fix a few corner cases

* Use --check instead of --diff

* The import order impacts test result somehow

* Make isort print diff and check output at the same time

* Let tools/run_tests/python_utils be firstparty library

* Run isort against latest HEAD
2021-07-26 12:31:21 -07:00
AJ Heller 4d4ee609c1
gRPC EventEngine Interface (#25795) 2021-04-05 09:26:16 -07:00
Jan Tattermusch 8cae49174c
extract_metadata_from_bazel_xml.py changes from #25272 (#25758)
* tools/buildgen/extract_metadata_from_bazel_xml.py changes from #25272

* regenerate projects

* get rid of useless _deduplicate_append

* extract_deps worked for both collapsed_sources and collapsed_deps only due to mismatch of bazel label vs target name mismatch

* special handling for absl has no effect

* improve comments

* remove changes that are not needed yet
2021-03-18 12:07:53 -07:00
Lidi Zheng e7d9cccf9a
Fix build abseil/boringssl/protobuf at head (#25638)
* Update PyYAML install steps

* F-string is 3.6+

* Regenerate project
2021-03-05 14:00:32 -08:00
Jan Tattermusch a2697e4592
simplify build.yaml: get rid of the "secure" field (#25547)
* get rid of useless "secure" field from build.yaml

* remove nonsensical "liblibssl.a" dependency from makefile

* regenerate projects
2021-03-04 15:07:24 +01:00
Lidi Zheng 39cc797025
[xDS Proto] Modernize buildgen scripts (#25512)
* [xDS Proto] Modernize buildgen scripts

* This PR only covers some buildgen scripts that will be used by xDS
proto
* This PR also improves the debuggability of some scripts
* Merge with master

* Adopt reviewer's advices
2021-03-02 11:25:01 -08:00
Lidi Zheng d515270e86
Fix the generated_projects.sh again (#25572)
* Double quote for shell string comparison
2021-02-26 13:21:31 -08:00