Compare commits

..

32 Commits

Author SHA1 Message Date
Sergii Tkachenko 8f07bd14f1
[PSM Interop] Simplify PSM Interop Kokoro buildscripts (v1.56.x backport) (#36541)
Backport of #36450 to v1.56.x.
---
Integrates the new features of the the Kokoro PSM Interop install
library introduced in grpc/psm-interop#73.

Nearly all common functionality was moved from per-language/per-branch
PSM Interop build scripts to
[psm_interop_kokoro_lib.sh](https://github.com/grpc/psm-interop/blob/main/.kokoro/psm_interop_kokoro_lib.sh):
1. The list of tests in the each test suite 
2. Per-test-suite flag customization
3. `run_test` methods
4. `build_docker_images_if_needed` methods
5. Generic `build_test_app_docker_images` methods (simple docker build +
docker push + docker tag). grpc-java is one exception, as it doesn't run
docker directly, but a cloudbuild flow.

Now all PSM Interop jobs share the same buildscripts by all test suites:
1. buildscript that invokes the test: `psm-interop-test-{language}.sh`
(configured as `build_file` in the build cfg)
2. buildscript that builds the xDS test client/server and publishes them
as a Docker image: `psm-interop-build-{language}.sh` (conventional name
called from `psm_interop_kokoro_lib.sh`)

`psm-interop-test-{language}.sh`:
1. Sets `GRPC_LANGUAGE`, `BUILD_SCRIPT_DIR` environment variables.
2. Downloads the shared `psm_interop_kokoro_lib.sh` from the main branch
of the psm-interop repo.
3. Sources `psm-interop-build-{language}.sh`
4. Calls `psm::run "${PSM_TEST_SUITE}"` (`PSM_TEST_SUITE` configured in
the cfg file).

`psm-interop-build-{language}.sh`:
1. Defines `psm::lang::build_docker_images` which is called from
`psm_interop_kokoro_lib.sh`.
2. Invokes any repo-specific logic.
3. May use `psm::build::docker_images_generic` for generic Docker build,
tag, push, or provide implement its own build/publish method.

References:
- b/288578634
- See the full list of the new features at grpc/psm-interop#73.
- Additional fixes to the shared lib: grpc/psm-interop#78,
grpc/psm-interop#79
2024-05-06 15:14:55 -07:00
Sergii Tkachenko 73741a55c5
[PSM Interop] Migrate to Artifact Registry (v1.56.x backport) (#36317)
Backport of #36273 to v1.56.x.
---
Migrate PSM Interop images from Container Registry (gcr.io) to Artifact
Registry (pkg.dev).
2024-04-09 14:03:17 -07:00
Esun Kim 614d26a86d
[Release] Bump version to 1.56.4 (on v1.56.x branch) (#35815)
Change was created by the release automation script. See go/grpc-release
2024-02-05 15:00:20 -08:00
Matthew Stevenson eece0c034a
[tls] Backport of #34861 to v1.56.x. (#35795)
Co-authored-by: Luwei Ge <lwge@google.com>
2024-02-05 11:04:00 -08:00
Xuan Wang 04dd012962
[PSM Interop] Use the Kokoro shared install lib from the new repo (v1.56.x backport) (#35339)
Backport of #35327 to v1.56.x.
---
Source:
4f7ead2c7b/tools/internal_ci/linux/grpc_xds_k8s_install_test_driver.sh
New repo: https://github.com/grpc/psm-interop
New path: `.kokoro/psm_interop_kokoro_lib.sh`

Ref https://github.com/grpc/psm-interop/pull/16

Co-authored-by: Sergii Tkachenko <sergiitk@google.com>
2023-12-20 10:14:18 -08:00
Esun Kim 06021d9184
[Release] Bump version to 1.56.3 (on v1.56.x branch) (#34622)
Change was created by the release automation script. See go/grpc-release
2023-10-09 10:08:36 -07:00
Esun Kim 2456bf2d22
[Cord] Backport-1.56: Fix MakeCordFromSlice memory bug (#34558)
Backport of https://github.com/grpc/grpc/pull/34549
2023-10-06 16:01:00 -07:00
Eugene Ostroukhov f8d4a0bcc8
[Interop Tests][v1.56] Update Docker images (#34351) 2023-09-15 10:23:38 -07:00
Eugene Ostroukhov f0f5ed4dd3
[v1.56.x][Interop] Backport Python image update (#33867)
Update Phusion base image to address security issues. Original PR:
#33847
2023-07-25 13:28:50 -07:00
Eugene Ostroukhov 7536d8a849
[v1.56][Build] Update Phusion baseimage (#33767) (#33838) 2023-07-24 16:09:07 -07:00
Richard Belleville 4d24d6476e
[Backport] [dependency] Restrict cython to less than 3.X (#33773)
*Beep boop. This is an automatically generated backport of #33738.*

This should resolve breakage on master caused by the jump to Cython
3.0.0 this morning.
2023-07-24 15:44:27 -07:00
Sergii Tkachenko c9000c07ef
[PSM Interop] Legacy tests: fix xDS test client build (v1.56.x backport) (#33807)
Backport of #33796 to v1.56.x.
---
https://github.com/grpc/grpc/pull/33699 incorrectly changed the legacy
builds to not just use the test driver from the master, but also to
build from it. This PR fixes the issue, and also updates the python job
to work use the driver from master.
2023-07-21 13:38:31 -07:00
Sergii Tkachenko cebd1cb6bb
[PSM Interop] Legacy test builds always pull the driver from master (v1.56.x backport) (#33723)
Backport of #33699 to v1.56.x.
---
Similar to https://github.com/grpc/grpc-java/pull/8982.
All other languages already to this.

Needed for easier deployment of https://github.com/grpc/grpc/pull/33685.

ref b/274944592
2023-07-14 17:30:55 -07:00
apolcyn c0d1c393d9
[release] Bump release version to 1.56.2 (#33705)
Generated by release script
2023-07-14 10:18:24 -07:00
Mark D. Roth 484820a800
[WRR] backport #33694 to 1.56 (#33698) 2023-07-13 17:42:40 -07:00
github-actions[bot] 6425ed25d6
Automated fix for refs/heads/v1.56.x (#33681)
PanCakes to the rescue!

We noticed that our 'sanity' test was going to fail, but we think we can
fix that automatically, so we put together this PR to do just that!

If you'd like to opt-out of these PR's, add yourself to NO_AUTOFIX_USERS
in .github/workflows/pr-auto-fix.yaml

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-07-12 17:25:20 -07:00
AJ Heller d4b53c70b9
[backport][iomgr][EventEngine] Improve server handling of file descriptor exhaustion (#33667)
Backport of #33656
2023-07-12 15:12:46 -07:00
Yijie Ma 8a59ef0632
[Release] Bump version to 1.56.1 (on v1.56.x branch) (#33651)
Change was created by the release automation script. See
go/grpc-release.
2023-07-10 16:02:08 -07:00
Yijie Ma 67df2b3f49
[Release] Bump version to 1.56.1-pre1 (on v1.56.x branch) (#33619)
Change was created by the release automation script. See
go/grpc-release.
2023-07-06 13:18:41 -07:00
Esun Kim e46dda5c7d
[Core] Backport:1.56 Improve HPACK (#33603)
Cherry-pick https://github.com/grpc/grpc/pull/33597
2023-07-06 08:02:16 +09:00
Matthew Stevenson 53e637c18a
[tls] Backport - Remove use of SSL_CTX_set_client_CA_list for TLS server credentials. (#33583)
See #33558.
2023-07-05 09:26:03 -07:00
Xuan Wang 45480ddd92
[PSM interop] Don't fail url_map target if sub-target already failed (v1.56.x backport) (#33523)
Backport of #33520 to v1.56.x.
---
Follow up change of #33222.

We don't want file multiple bugs if any of the sub-tests of the
`url_map` test fails.

<!--

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-22 16:48:06 -07:00
Yijie Ma 6e85620c7e
[Release] Bump version to 1.56.0 (on v1.56.x branch) (#33440)
Change was created by the release automation script. See
go/grpc-release.
2023-06-14 13:21:16 -07:00
Yijie Ma eccf68abef
[Release] Bump version to 1.56.0-pre3 (on v1.56.x branch) (#33390)
Change was created by the release automation script. See
go/grpc-release.
2023-06-12 17:09:00 -07:00
apolcyn d5bafa4755
[c-ares] Backport "[c-ares] Upgrade c-ares dependency to 1.19.1 (#33392)" to v1.56.x (#33411)
Backports https://github.com/grpc/grpc/pull/33392
2023-06-12 16:27:07 -07:00
Esun Kim d9d47b5a18
[WRR] Backport 1.56: Prefer application_utilization to cpu_utilization (#33378)
Backport of #33355

Co-authored-by: Yousuk Seung <ysseung@google.com>
2023-06-09 12:18:31 -07:00
Yijie Ma fc64109383
[Release] Bump version to 1.56.0-pre2 (on v1.56.x branch) (#33350)
Change was created by the release automation script. See
go/grpc-release.
2023-06-05 13:43:55 -07:00
Mark D. Roth ded9a15723
[outlier detection] backport to 1.56: hack to prevent OD from working with pick_first (#33347)
Back-port #33336 to 1.56.
2023-06-05 13:01:58 -07:00
Yijie Ma 4ad81d3da5
[channelz] Backport "[channelz] Make the cacheline stuff work properly for C++14 (#33327)" to v1.56.x (#33331)
Backport https://github.com/grpc/grpc/pull/33327 to v1.56.x

<!--

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: Craig Tiller <ctiller@google.com>
2023-06-02 16:55:01 -07:00
apolcyn 91ff8b2bca
[Rls] Backport "[Rls] de-experimentalize RLS in XDS (#33290)" to v1.56.x (#33330)
Backport #33290 to 1.56.x.
2023-06-02 14:05:54 -07:00
Xuan Wang a05e2e3bd2
[Bazel Python3.11] Update Bazel dependencies for Python 3.11 (v1.56.x backport) (#33329)
Backport of #33318 to v1.56.x.
---
We just found out that our current Bazel setup does not support Python
3.11.

This PR updates some dependencies to allow using Bazel in Python 3.11.

Cython:
* Cython [backported Python 3.11 support change to
0.29x](https://github.com/cython/cython/issues/4500), but it appears
that the Cython version we are using in Bazel does not include the fix,
so we're using the latest stable version instead.

Gevent:
* The first version of gevent that supports [Python 3.11 is
22.08.0](https://github.com/gevent/gevent/issues/1903#issuecomment-1303227507).

#### Testing
* Tested locally using Python 3.11 virtual environment, was able to
reproduce the issue and verified that those changes were able to fix it.
2023-06-02 12:56:39 -07:00
Yijie Ma b39e015f34
[Release] Bump version to 1.56.0-pre1 (on v1.56.x branch) (#33312)
Change was created by the release automation script. See
go/grpc-release.
2023-06-01 10:55:53 -07:00
8601 changed files with 380134 additions and 1345818 deletions

View File

@ -12,7 +12,7 @@
---
# TODO(yannic): Ideally, we should also enable buildifier and all platforms should test `//...`.
tasks:
ubuntu2004:
ubuntu1804:
build_targets:
- //:all
- //src/proto/...

View File

@ -14,12 +14,10 @@ third_party/envoy-api
third_party/googleapis
third_party/googletest
third_party/opencensus-proto
third_party/opentelemetry-cpp
third_party/protobuf
third_party/protoc-gen-validate
third_party/re2
third_party/upb
third_party/utf8_range
third_party/xds
test/distrib/bazel/cpp

View File

@ -1 +0,0 @@
7.1.0

View File

@ -5,6 +5,9 @@ DerivePointerAlignment: false
PointerAlignment: Left
IncludeBlocks: Regroup
IncludeCategories:
# port_platform.h is before almost everything
- Regex: '^<grpc/(support|impl/codegen)/port_platform.h>'
Priority: -100
# ruby.h is even more first if it's included
- Regex: '^<ruby/ruby.h>'
Priority: -200
@ -43,8 +46,4 @@ Language: ObjC
BasedOnStyle: Google
ColumnLimit: 100
ObjCBlockIndentWidth: 2
---
Language: Proto
BasedOnStyle: Google
ColumnLimit: 100
...

View File

@ -1,24 +1,15 @@
---
# Note on checks are disabled on purpose
#
# - abseil-cleanup-ctad
# Requires C++17 and higher.
#
# - abseil-no-namespace
# https://bugs.llvm.org/show_bug.cgi?id=47947
#
# - bugprone-exception-escape
# https://github.com/llvm/llvm-project/issues/54668 (seems to be fixed in LLVM17)
#
# - bugprone-reserved-identifier
# Some macros need to be defined for portability purpose; e.g. _BSD_SOURCE.
#
# - modernize-redundant-void-arg
# Some source should be strictly C99 and func(void) should be used.
#
# - google-readability-casting
# https://github.com/llvm/llvm-project/issues/57959
#
# Note on checks which will be enabled in future. These are good to have but
# it's not activated yet due to the existing issues with the checks.
# Once those issues are clear, these checks can be enabled later.
@ -32,7 +23,6 @@
# - bugprone-not-null-terminated-result
# - bugprone-signed-char-misuse
# - bugprone-sizeof-expression
# - bugprone-switch-missing-default-case
# - bugprone-too-small-loop-variable
# - bugprone-unchecked-optional-access
# - clang-diagnostic-deprecated-declarations
@ -51,27 +41,21 @@
# - modernize-use-equals-default
# - modernize-use-equals-delete
# - modernize-use-using
# - performance-avoid-endl
# - performance-no-automatic-move
# - performance-no-int-to-ptr
# - performance-noexcept-swap
# - performance-unnecessary-copy-initialization
# - performance-unnecessary-value-param
# - readability-else-after-return
# - readability-implicit-bool-conversion
# - readability-redundant-declaration
# - readability-redundant-string-cstr
#
Checks: '-*,
abseil-*,
-abseil-cleanup-ctad,
-abseil-no-namespace,
bugprone-*,
-bugprone-assignment-in-if-condition,
-bugprone-branch-clone,
-bugprone-easily-swappable-parameters,
-bugprone-empty-catch,
-bugprone-exception-escape,
-bugprone-implicit-widening-of-multiplication-result,
-bugprone-infinite-loop,
-bugprone-narrowing-conversions,
@ -79,21 +63,16 @@ Checks: '-*,
-bugprone-reserved-identifier,
-bugprone-signed-char-misuse,
-bugprone-sizeof-expression,
-bugprone-switch-missing-default-case,
-bugprone-too-small-loop-variable,
-bugprone-unchecked-optional-access,
google-*,
-google-readability-casting,
-google-runtime-int,
-google-runtime-references,
performance-*,
-performance-avoid-endl,
-performance-no-automatic-move,
-performance-no-int-to-ptr,
-performance-noexcept-swap,
-performance-unnecessary-copy-initialization,
-performance-unnecessary-value-param,
clang-diagnostic-deprecated-declarations,
clang-diagnostic-deprecated-register,
clang-diagnostic-expansion-to-defined,
clang-diagnostic-ignored-attributes,
@ -141,7 +120,7 @@ Checks: '-*,
readability-redundant-control-flow,
readability-redundant-function-ptr-dereference,
readability-redundant-smartptr-get,
-readability-redundant-string-cstr,
readability-redundant-string-cstr,
readability-redundant-string-init,
readability-simplify-boolean-expr,
readability-static-definition-in-anonymous-namespace,

View File

@ -1,6 +0,0 @@
bazel-bin
bazel-grpc
bazel-out
build
.cache
.git

View File

@ -1,3 +0,0 @@
# .git-blame-ignore-revs
# Migrated python code style from yapf to black
de6ed9ba9fd59f753bbfd4c9a88ff15e03a89de7

20
.gitattributes vendored
View File

@ -1,5 +1,5 @@
src/core/ext/upb-gen/** linguist-generated=true
src/core/ext/upbdefs-gen/** linguist-generated=true
src/core/ext/upb-generated/** linguist-generated=true
src/core/ext/upbdefs-generated/** linguist-generated=true
Makefile linguist-generated=true
BUILD.gn linguist-generated=true
CMakeLists.txt linguist-generated=true
@ -12,9 +12,10 @@ gRPC-ProtoRPC.podspec linguist-generated=true
gRPC-RxLibrary.podspec linguist-generated=true
gRPC.podspec linguist-generated=true
grpc.gemspec linguist-generated=true
grpc.gyp linguist-generated=true
grpc.def linguist-generated=true
package.xml linguist-generated=true
Package.swift linguist-generated=true
binding.gyp linguist-generated=true
src/python/grpcio/grpc_core_dependencies.py linguist-generated=true
src/ruby/ext/grpc/rb_grpc_imports.generated.h linguist-generated=true
src/ruby/ext/grpc/rb_grpc_imports.generated.c linguist-generated=true
@ -29,13 +30,8 @@ tools/run_tests/tests.json linguist-generated=true
tools/run_tests/generated/tests.json linguist-generated=true
tools/run_tests/generated/sources_and_headers.json linguist-generated=true
src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h linguist-generated=true
src/core/telemetry/stats_data.h linguist-generated=true
src/core/telemetry/stats_data.cc linguist-generated=true
src/core/lib/experiments/experiments.h linguist-generated=true
src/core/lib/experiments/experiments.cc linguist-generated=true
src/core/debug/stats_data.h linguist-generated=true
src/core/debug/stats_data.cc linguist-generated=true
src/core/experiments/experiments.h linguist-generated=true
src/core/experiments/experiments.cc linguist-generated=true
bazel/experiments.bzl linguist-generated=true
test/cpp/microbenchmarks/huffman_geometries/** linguist-generated=true
doc/trace_flags.md linguist-generated=true
src/core/lib/debug/trace_flags.h linguist-generated=true
src/core/lib/debug/trace_flags.cc linguist-generated=true
src/python/grpcio_observability/observability_lib_deps.py linguist-generated=true

25
.github/CODEOWNERS vendored
View File

@ -1,12 +1,15 @@
/bazel/** @veblush @gnossen
/bazel/experiments.yaml
/cmake/** @veblush @apolcyn
/src/core/client_channel/** @markdroth
# Auto-generated by the tools/mkowners/mkowners.py tool
# Uses OWNERS files in different modules throughout the
# repository as the source of truth for module ownership.
/**/OWNERS @markdroth @a11r
/bazel/** @jtattermusch @veblush @gnossen
/cmake/** @jtattermusch @apolcyn
/src/core/ext/filters/client_channel/** @markdroth
/src/core/ext/transport/chttp2/transport/** @ctiller
/src/core/load_balancing/** @markdroth
/src/core/resolver/** @markdroth
/src/core/server/xds* @markdroth
/src/core/service_config/** @markdroth
/src/core/xds/** @markdroth
/tools/dockerfile/** @drfloob @apolcyn @gnossen
/tools/run_tests/xds_k8s_test_driver/** @sergiitk @XuanWang-Amos @gnossen
/src/core/ext/xds/** @markdroth
/src/core/lib/resolver/** @markdroth
/src/core/lib/service_config/** @markdroth
/src/core/lib/surface/** @ctiller
/src/core/lib/transport/** @ctiller
/test/core/transport/** @ctiller
/tools/dockerfile/** @jtattermusch @apolcyn

View File

@ -2,7 +2,7 @@
name: Report a gRPC C# bug
about: Create a report to help us improve
labels: kind/bug, priority/P2, lang/C#
assignees: apolcyn
assignees: jtattermusch
---

View File

@ -2,7 +2,7 @@
name: Request a gRPC C# feature
about: Suggest an idea for this project
labels: kind/enhancement, priority/P2, lang/C#
assignees: apolcyn
assignees: jtattermusch
---

View File

@ -1,15 +0,0 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
groups:
github-actions:
patterns:
- "*"

109
.github/labeler.yml vendored
View File

@ -1,65 +1,60 @@
lang/core:
- changed-files:
- any-glob-to-any-file:
- src/abseil-cpp/**
- src/boringssl/**
- src/c-ares/**
- src/core/**
- src/proto/**
- src/re2/**
- src/upb/**
- src/zlib/**
- include/grpc/**
- test/core/**
- tools/codegen/core/**
- src/abseil-cpp/**
- src/boringssl/**
- src/c-ares/**
- src/core/**
- src/proto/**
- src/re2/**
- src/upb/**
- src/zlib/**
- include/grpc/**
- test/core/**
- tools/codegen/core/**
lang/c++:
- changed-files:
- any-glob-to-any-file:
- examples/cpp/**
- src/cpp/**
- include/grpc++/**
- include/grpcpp/**
- test/cpp/**
- examples/cpp/**
- src/cpp/**
- include/grpc++/**
- include/grpcpp/**
- test/cpp/**
area/infra:
- changed-files:
- any-glob-to-any-file:
- .github/**
- .github/**
lang/node:
- changed-files:
- any-glob-to-any-file:
- examples/node/**
- src/compiler/node*
- examples/node/**
- src/compiler/node*
lang/ObjC:
- changed-files:
- any-glob-to-any-file:
- examples/objective-c/**
- src/compiler/objective_c*
- src/objective-c/**
- examples/objective-c/**
- src/compiler/objective_c*
- src/objective-c/**
lang/php:
- changed-files:
- any-glob-to-any-file:
- examples/php/**
- src/compiler/php*
- src/php/**
- examples/php/**
- src/compiler/php*
- src/php/**
lang/python:
- changed-files:
- any-glob-to-any-file:
- bazel/python_rules.bzl
- examples/python/**
- requirements.bazel.txt
- src/compiler/python*
- all-globs-to-any-file:
- src/python/**
- '!src/python/grpcio/grpc_core_dependencies.py'
- '!src/python/grpcio_observability/observability_lib_deps.py'
- bazel/python_rules.bzl
- examples/python/**
- requirements.bazel.txt
- src/compiler/python*
- any:
- src/python/**
- "!src/python/grpcio/grpc_core_dependencies.py"
lang/ruby:
- changed-files:
- any-glob-to-any-file:
- examples/ruby/**
- src/compiler/ruby*
- src/ruby/**
'lang/C#':
- changed-files:
- any-glob-to-any-file:
- src/compiler/csharp*
- src/csharp/**
- examples/ruby/**
- src/compiler/ruby*
- src/ruby/**
"lang/C#":
- src/compiler/csharp*
- src/csharp/**
"disposition/Needs Internal Changes":
- src/core/lib/event_engine/windows/**
- src/core/lib/gpr/windows/**
- src/core/lib/gprpp/windows/**
- test/core/event_engine/windows/**

View File

@ -12,24 +12,24 @@ jobs:
steps:
# Cache bazel build
- name: Get current time
uses: srfrnk/current-time@5a4163ad035ccd9a407ec9e519c3b6ba1b633d1e # v1.1.0
uses: srfrnk/current-time@master
id: current-time
with:
format: YYYYWW
- name: Get current time
uses: srfrnk/current-time@5a4163ad035ccd9a407ec9e519c3b6ba1b633d1e # v1.1.0
uses: srfrnk/current-time@master
id: current-time-with-day
with:
format: YYYYWWd
- name: Cache bazel
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
uses: actions/cache@v3
env:
cache-name: bazel-cache
with:
path: ~/.cache/bazel
# formattedTime here is like 2021323 - the year concatenated with the week then
# the day of that week.
# As this changes every day, we cycle to a new cache once per day, with lookup
# As this changes every day, we cycle to a new cache once per day, with lookup
# across the week (and then the year).
key: ${{ runner.os }}-${{ steps.current-time-with-day.outputs.formattedTime }}
restore-keys: |
@ -38,23 +38,22 @@ jobs:
# Cancel current runs if they're still running
# (saves processing on fast pushes)
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # 0.12.1
uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}
# Allow opt-out for some users
- name: Should I Stay Or Should I Go
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
uses: actions/github-script@v4
id: check
with:
script: |
// If you'd like not to run this code on your commits, add your github user id here:
const NO_AUTOFIX_USERS = ["copybara-service[bot]"];
const { owner, repo } = context.repo;
console.log("Actor: " + context.actor);
NO_AUTOFIX_USERS = []
const { owner, repo } = context.repo
if (NO_AUTOFIX_USERS.includes(context.actor)) {
console.log('Cancelling');
const run_id = "${{ github.run_id }}";
await github.rest.actions.cancelWorkflowRun({ owner, repo, run_id });
await github.actions.cancelWorkflowRun({ owner, repo, run_id });
return 'go';
} else {
return 'stay';
@ -66,7 +65,7 @@ jobs:
run: test "${{ steps.check.outputs.result }}" = "stay"
# Setup to run sanity suite
- name: Install Python Interpreter
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install Python Packages
@ -75,7 +74,7 @@ jobs:
sudo apt-get update
sudo apt-get install python3-dev
- name: Check out repository code
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
uses: actions/checkout@v3
with:
submodules: True
- name: Get the upstream code
@ -90,7 +89,7 @@ jobs:
run: ANDROID_NDK_HOME= ${{ github.workspace }}/tools/distrib/sanitize.sh
# Report back with a PR if things are broken
- name: Create Pull Request
uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e # v6.0.5
uses: peter-evans/create-pull-request@v3
with:
delete-branch: true
branch-suffix: short-commit-hash

View File

@ -0,0 +1,32 @@
name: PR Title Check & Tag
on:
pull_request_target:
types: [opened, reopened, synchronize, edited]
permissions:
contents: read # to determine modified files (actions/labeler)
jobs:
triage:
permissions:
contents: read # to determine modified files (actions/labeler)
pull-requests: write # to add labels to PRs (actions/labeler)
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v3
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
sync-labels: ""
title-check:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: thehanimo/pr-title-checker@v1.3.5
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
pass_on_octokit_error: false
configuration_path: ".github/pr_title_checker_config.json"

View File

@ -1,19 +0,0 @@
name: PR Auto Tag
on:
pull_request_target:
types: [opened, reopened, synchronize, edited]
permissions:
contents: read # to determine modified files (actions/labeler)
jobs:
triage:
permissions:
contents: read # to determine modified files (actions/labeler)
pull-requests: write # to add labels to PRs (actions/labeler)
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5.0.0
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
sync-labels: false

8
.gitignore vendored
View File

@ -17,13 +17,13 @@ cython_debug/
dist/
htmlcov/
py3*/
pyb/
python_build/
python_pylint_venv/
src/python/grpcio_*/=*
src/python/grpcio_*/build/
src/python/grpcio_*/LICENSE
src/python/grpcio_status/grpc_status/google/rpc/status.proto
black_virtual_environment/
yapf_virtual_environment/
isort_virtual_environment/
# Node installation output
@ -55,7 +55,6 @@ coverage
# vim temp files
.*.swp
.*.swo
# Makefile's cache
cache.mk
@ -181,6 +180,3 @@ iwyu_build/
# fuzzer logs
fuzz-*.log
# bazel module files (MODULE.bazel will need to be removed here)
MODULE.bazel
MODULE.bazel.lock

6
.gitmodules vendored
View File

@ -22,6 +22,9 @@
[submodule "third_party/googletest"]
path = third_party/googletest
url = https://github.com/google/googletest.git
[submodule "third_party/libuv"]
path = third_party/libuv
url = https://github.com/libuv/libuv.git
[submodule "third_party/opencensus-proto"]
path = third_party/opencensus-proto
url = https://github.com/census-instrumentation/opencensus-proto.git
@ -47,6 +50,3 @@
# generated file that makes Git consider the submodule dirty. This
# state can be ignored for day-to-day development on gRPC.
ignore = dirty
[submodule "third_party/opentelemetry-cpp"]
path = third_party/opentelemetry-cpp
url = https://github.com/open-telemetry/opentelemetry-cpp

1744
BUILD

File diff suppressed because it is too large Load Diff

View File

@ -112,9 +112,6 @@ $ bazel build :all
$ bazel test --config=dbg //test/...
```
NOTE: If you're using Bazel 7 or newer and working with gRPC, you'll need to turn off bzlmod.
This is because gRPC isn't fully compatible with bzlmod yet. To do this, add --enable_bzlmod=false to your Bazel commands.
NOTE: If you are a gRPC maintainer and you have access to our test cluster, you should use our [gRPC's Remote Execution environment](tools/remote_build/README.md)
to get significant improvement to the build and test speed (and a bunch of other very useful features).

View File

@ -1,323 +0,0 @@
// swift-tools-version:5.5
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
import Foundation
let basePath = "third_party/boringssl-with-bazel"
let privacyInfoPath = "../../src/objective-c/PrivacyInfo.xcprivacy"
let testPath = "test/boringssl_spm_build"
let package = Package(
name: "BoringSSL-GRPC",
products: [
.library(
name: "openssl_grpc",
targets: ["openssl_grpc"]
)
],
targets: [
.target(
name: "openssl_grpc",
path: basePath,
exclude: [
],
sources: [
"src/crypto/asn1/a_bitstr.c",
"src/crypto/asn1/a_bool.c",
"src/crypto/asn1/a_d2i_fp.c",
"src/crypto/asn1/a_dup.c",
"src/crypto/asn1/a_gentm.c",
"src/crypto/asn1/a_i2d_fp.c",
"src/crypto/asn1/a_int.c",
"src/crypto/asn1/a_mbstr.c",
"src/crypto/asn1/a_object.c",
"src/crypto/asn1/a_octet.c",
"src/crypto/asn1/a_strex.c",
"src/crypto/asn1/a_strnid.c",
"src/crypto/asn1/a_time.c",
"src/crypto/asn1/a_type.c",
"src/crypto/asn1/a_utctm.c",
"src/crypto/asn1/asn1_lib.c",
"src/crypto/asn1/asn1_par.c",
"src/crypto/asn1/asn_pack.c",
"src/crypto/asn1/f_int.c",
"src/crypto/asn1/f_string.c",
"src/crypto/asn1/posix_time.c",
"src/crypto/asn1/tasn_dec.c",
"src/crypto/asn1/tasn_enc.c",
"src/crypto/asn1/tasn_fre.c",
"src/crypto/asn1/tasn_new.c",
"src/crypto/asn1/tasn_typ.c",
"src/crypto/asn1/tasn_utl.c",
"src/crypto/base64/base64.c",
"src/crypto/bio/bio.c",
"src/crypto/bio/bio_mem.c",
"src/crypto/bio/connect.c",
"src/crypto/bio/errno.c",
"src/crypto/bio/fd.c",
"src/crypto/bio/file.c",
"src/crypto/bio/hexdump.c",
"src/crypto/bio/pair.c",
"src/crypto/bio/printf.c",
"src/crypto/bio/socket.c",
"src/crypto/bio/socket_helper.c",
"src/crypto/blake2/blake2.c",
"src/crypto/bn_extra/bn_asn1.c",
"src/crypto/bn_extra/convert.c",
"src/crypto/buf/buf.c",
"src/crypto/bytestring/asn1_compat.c",
"src/crypto/bytestring/ber.c",
"src/crypto/bytestring/cbb.c",
"src/crypto/bytestring/cbs.c",
"src/crypto/bytestring/unicode.c",
"src/crypto/chacha/chacha.c",
"src/crypto/cipher_extra/cipher_extra.c",
"src/crypto/cipher_extra/derive_key.c",
"src/crypto/cipher_extra/e_aesctrhmac.c",
"src/crypto/cipher_extra/e_aesgcmsiv.c",
"src/crypto/cipher_extra/e_chacha20poly1305.c",
"src/crypto/cipher_extra/e_des.c",
"src/crypto/cipher_extra/e_null.c",
"src/crypto/cipher_extra/e_rc2.c",
"src/crypto/cipher_extra/e_rc4.c",
"src/crypto/cipher_extra/e_tls.c",
"src/crypto/cipher_extra/tls_cbc.c",
"src/crypto/conf/conf.c",
"src/crypto/cpu_aarch64_apple.c",
"src/crypto/cpu_aarch64_fuchsia.c",
"src/crypto/cpu_aarch64_linux.c",
"src/crypto/cpu_aarch64_openbsd.c",
"src/crypto/cpu_aarch64_sysreg.c",
"src/crypto/cpu_aarch64_win.c",
"src/crypto/cpu_arm_freebsd.c",
"src/crypto/cpu_arm_linux.c",
"src/crypto/cpu_intel.c",
"src/crypto/crypto.c",
"src/crypto/curve25519/curve25519.c",
"src/crypto/curve25519/curve25519_64_adx.c",
"src/crypto/curve25519/spake25519.c",
"src/crypto/des/des.c",
"src/crypto/dh_extra/dh_asn1.c",
"src/crypto/dh_extra/params.c",
"src/crypto/digest_extra/digest_extra.c",
"src/crypto/dilithium/dilithium.c",
"src/crypto/dsa/dsa.c",
"src/crypto/dsa/dsa_asn1.c",
"src/crypto/ec_extra/ec_asn1.c",
"src/crypto/ec_extra/ec_derive.c",
"src/crypto/ec_extra/hash_to_curve.c",
"src/crypto/ecdh_extra/ecdh_extra.c",
"src/crypto/ecdsa_extra/ecdsa_asn1.c",
"src/crypto/engine/engine.c",
"src/crypto/err/err.c",
"src/crypto/evp/evp.c",
"src/crypto/evp/evp_asn1.c",
"src/crypto/evp/evp_ctx.c",
"src/crypto/evp/p_dh.c",
"src/crypto/evp/p_dh_asn1.c",
"src/crypto/evp/p_dsa_asn1.c",
"src/crypto/evp/p_ec.c",
"src/crypto/evp/p_ec_asn1.c",
"src/crypto/evp/p_ed25519.c",
"src/crypto/evp/p_ed25519_asn1.c",
"src/crypto/evp/p_hkdf.c",
"src/crypto/evp/p_rsa.c",
"src/crypto/evp/p_rsa_asn1.c",
"src/crypto/evp/p_x25519.c",
"src/crypto/evp/p_x25519_asn1.c",
"src/crypto/evp/pbkdf.c",
"src/crypto/evp/print.c",
"src/crypto/evp/scrypt.c",
"src/crypto/evp/sign.c",
"src/crypto/ex_data.c",
"src/crypto/fipsmodule/bcm.c",
"src/crypto/fipsmodule/fips_shared_support.c",
"src/crypto/hpke/hpke.c",
"src/crypto/hrss/hrss.c",
"src/crypto/keccak/keccak.c",
"src/crypto/kyber/kyber.c",
"src/crypto/lhash/lhash.c",
"src/crypto/mem.c",
"src/crypto/obj/obj.c",
"src/crypto/obj/obj_xref.c",
"src/crypto/pem/pem_all.c",
"src/crypto/pem/pem_info.c",
"src/crypto/pem/pem_lib.c",
"src/crypto/pem/pem_oth.c",
"src/crypto/pem/pem_pk8.c",
"src/crypto/pem/pem_pkey.c",
"src/crypto/pem/pem_x509.c",
"src/crypto/pem/pem_xaux.c",
"src/crypto/pkcs7/pkcs7.c",
"src/crypto/pkcs7/pkcs7_x509.c",
"src/crypto/pkcs8/p5_pbev2.c",
"src/crypto/pkcs8/pkcs8.c",
"src/crypto/pkcs8/pkcs8_x509.c",
"src/crypto/poly1305/poly1305.c",
"src/crypto/poly1305/poly1305_arm.c",
"src/crypto/poly1305/poly1305_vec.c",
"src/crypto/pool/pool.c",
"src/crypto/rand_extra/deterministic.c",
"src/crypto/rand_extra/forkunsafe.c",
"src/crypto/rand_extra/getentropy.c",
"src/crypto/rand_extra/ios.c",
"src/crypto/rand_extra/passive.c",
"src/crypto/rand_extra/rand_extra.c",
"src/crypto/rand_extra/trusty.c",
"src/crypto/rand_extra/windows.c",
"src/crypto/rc4/rc4.c",
"src/crypto/refcount.c",
"src/crypto/rsa_extra/rsa_asn1.c",
"src/crypto/rsa_extra/rsa_crypt.c",
"src/crypto/rsa_extra/rsa_print.c",
"src/crypto/siphash/siphash.c",
"src/crypto/spx/address.c",
"src/crypto/spx/fors.c",
"src/crypto/spx/merkle.c",
"src/crypto/spx/spx.c",
"src/crypto/spx/spx_util.c",
"src/crypto/spx/thash.c",
"src/crypto/spx/wots.c",
"src/crypto/stack/stack.c",
"src/crypto/thread.c",
"src/crypto/thread_none.c",
"src/crypto/thread_pthread.c",
"src/crypto/thread_win.c",
"src/crypto/trust_token/pmbtoken.c",
"src/crypto/trust_token/trust_token.c",
"src/crypto/trust_token/voprf.c",
"src/crypto/x509/a_digest.c",
"src/crypto/x509/a_sign.c",
"src/crypto/x509/a_verify.c",
"src/crypto/x509/algorithm.c",
"src/crypto/x509/asn1_gen.c",
"src/crypto/x509/by_dir.c",
"src/crypto/x509/by_file.c",
"src/crypto/x509/i2d_pr.c",
"src/crypto/x509/name_print.c",
"src/crypto/x509/policy.c",
"src/crypto/x509/rsa_pss.c",
"src/crypto/x509/t_crl.c",
"src/crypto/x509/t_req.c",
"src/crypto/x509/t_x509.c",
"src/crypto/x509/t_x509a.c",
"src/crypto/x509/v3_akey.c",
"src/crypto/x509/v3_akeya.c",
"src/crypto/x509/v3_alt.c",
"src/crypto/x509/v3_bcons.c",
"src/crypto/x509/v3_bitst.c",
"src/crypto/x509/v3_conf.c",
"src/crypto/x509/v3_cpols.c",
"src/crypto/x509/v3_crld.c",
"src/crypto/x509/v3_enum.c",
"src/crypto/x509/v3_extku.c",
"src/crypto/x509/v3_genn.c",
"src/crypto/x509/v3_ia5.c",
"src/crypto/x509/v3_info.c",
"src/crypto/x509/v3_int.c",
"src/crypto/x509/v3_lib.c",
"src/crypto/x509/v3_ncons.c",
"src/crypto/x509/v3_ocsp.c",
"src/crypto/x509/v3_pcons.c",
"src/crypto/x509/v3_pmaps.c",
"src/crypto/x509/v3_prn.c",
"src/crypto/x509/v3_purp.c",
"src/crypto/x509/v3_skey.c",
"src/crypto/x509/v3_utl.c",
"src/crypto/x509/x509.c",
"src/crypto/x509/x509_att.c",
"src/crypto/x509/x509_cmp.c",
"src/crypto/x509/x509_d2.c",
"src/crypto/x509/x509_def.c",
"src/crypto/x509/x509_ext.c",
"src/crypto/x509/x509_lu.c",
"src/crypto/x509/x509_obj.c",
"src/crypto/x509/x509_req.c",
"src/crypto/x509/x509_set.c",
"src/crypto/x509/x509_trs.c",
"src/crypto/x509/x509_txt.c",
"src/crypto/x509/x509_v3.c",
"src/crypto/x509/x509_vfy.c",
"src/crypto/x509/x509_vpm.c",
"src/crypto/x509/x509cset.c",
"src/crypto/x509/x509name.c",
"src/crypto/x509/x509rset.c",
"src/crypto/x509/x509spki.c",
"src/crypto/x509/x_algor.c",
"src/crypto/x509/x_all.c",
"src/crypto/x509/x_attrib.c",
"src/crypto/x509/x_crl.c",
"src/crypto/x509/x_exten.c",
"src/crypto/x509/x_name.c",
"src/crypto/x509/x_pubkey.c",
"src/crypto/x509/x_req.c",
"src/crypto/x509/x_sig.c",
"src/crypto/x509/x_spki.c",
"src/crypto/x509/x_val.c",
"src/crypto/x509/x_x509.c",
"src/crypto/x509/x_x509a.c",
"src/gen/crypto/err_data.c",
"src/ssl/bio_ssl.cc",
"src/ssl/d1_both.cc",
"src/ssl/d1_lib.cc",
"src/ssl/d1_pkt.cc",
"src/ssl/d1_srtp.cc",
"src/ssl/dtls_method.cc",
"src/ssl/dtls_record.cc",
"src/ssl/encrypted_client_hello.cc",
"src/ssl/extensions.cc",
"src/ssl/handoff.cc",
"src/ssl/handshake.cc",
"src/ssl/handshake_client.cc",
"src/ssl/handshake_server.cc",
"src/ssl/s3_both.cc",
"src/ssl/s3_lib.cc",
"src/ssl/s3_pkt.cc",
"src/ssl/ssl_aead_ctx.cc",
"src/ssl/ssl_asn1.cc",
"src/ssl/ssl_buffer.cc",
"src/ssl/ssl_cert.cc",
"src/ssl/ssl_cipher.cc",
"src/ssl/ssl_credential.cc",
"src/ssl/ssl_file.cc",
"src/ssl/ssl_key_share.cc",
"src/ssl/ssl_lib.cc",
"src/ssl/ssl_privkey.cc",
"src/ssl/ssl_session.cc",
"src/ssl/ssl_stat.cc",
"src/ssl/ssl_transcript.cc",
"src/ssl/ssl_versions.cc",
"src/ssl/ssl_x509.cc",
"src/ssl/t1_enc.cc",
"src/ssl/tls13_both.cc",
"src/ssl/tls13_client.cc",
"src/ssl/tls13_enc.cc",
"src/ssl/tls13_server.cc",
"src/ssl/tls_method.cc",
"src/ssl/tls_record.cc",
],
resources: [
.copy(privacyInfoPath),
],
publicHeadersPath: "src/include",
cSettings: [
.define("OPENSSL_NO_ASM", to: "1"),
.headerSearchPath("./"),
.headerSearchPath("include/"),
]
),
.testTarget(
name: "build-test",
dependencies: [
"openssl_grpc",
],
path: testPath
),
],
cxxLanguageStandard: .cxx14
)

27331
CMakeLists.txt generated

File diff suppressed because it is too large Load Diff

View File

@ -1,137 +0,0 @@
# Contributing to gRPC: A Step-By-Step Guide
Note: This document is not meant for Google employees.
## Prerequisites
To contribute to the gRPC codebase, you need the following:
1. An
[active GitHub account](https://docs.github.com/en/get-started/quickstart/creating-an-account-on-github)
1. [An understanding of Git and GitHub](https://docs.github.com/en/get-started/using-git/about-git)
1. [Knowledge of how to fork a repository, clone a repository, merge, rebase,
resolve, push, pull, fetch
etc.](https://docs.github.com/en/get-started/using-git/about-git)
1. [git installed and working on your machine](https://github.com/git-guides/install-git)
1. Knowledge of the language being used, which can be C++, Python, Ruby,
Objective-C, PHP, or C#.
## Steps to Contribute gRPC C++ Code
The GitHub repository for the C-based gRPC (C++, Python, Ruby, Objective-C, PHP, C#)
is at https://github.com/grpc/grpc.
### Fork and Clone the Repository
If you want to contribute to the gRPC code base, you need to make a fork of the
repository.
1. Create your
[own fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo)
from https://github.com/grpc/grpc.
![Screenshot of creating fork using a non-google account.](doc/images/img/grpc-create-fork.png)
1. [Clone your fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo#cloning-your-forked-repository)
on your local machine.
### Prepare and Push Your Commit
1. In your cloned repository, create a new branch from `master`.
1. Then prepare a commit for the files that you want to contribute.
1. Commit to this branch.
1. Push the commit to your fork on GitHub.
Take care that your commits are aligned with these
[guidelines](https://github.com/grpc/grpc/blob/master/CONTRIBUTING.md#guidelines-for-pull-requests).
### Prepare a Pull Request
After pushing your commit, visit https://github.com/grpc/grpc . If the
forking, branch creation, commit and push have been successful, you will see
the following message:
![Screenshot of Github UI to help to create a pull request.](doc/images/img/grpc-compare-and-pull-request.png)
Take care to allow edits by maintainers. If there is a specific issue
with your pull request, the maintainer can help if needed. This access to help will reduce
the turnaround time for your submission.
![Screenshot of Github UI to help to create a Pull Request.](doc/images/img/grpc-pull-request-details.png)
Create a pull request.
### Pull Request Status - Safe Review
Once the pull request is ready, you must wait for a reviewer to be
assigned to your pull request.
If you see *Not Covered* in the EasyCLA screen, as shown in the following image,
click on the mentioned link to start the authorization process.
![Screenshot of waiting for safe review](doc/images/img/grpc-tests.png)
You will see a series of screens:
1. Select *Authorize LF-Engineering:
![Screenshot of EasyCLA Step 1](doc/images/img/grpc-easycla-authorize.png)
1. Select your contributor type:
![Screenshot of EasyCLA Step 2](doc/images/img/grpc-contributor-type.png)
1. Select *SIGN CLA*:
![Screenshot of EasyCLA Step 3](doc/images/img/grpc-sign-cla.png)
Some time after you've digitally signed the document, the EasyCLA will appear as
*Covered*.
![Screenshot of EasyCLA Step 5](doc/images/img/grpc-easycla-covered.png)
After a few hours, you will notice a new "assignee" assigned to the pull request.
![Screenshot after an assignee is added](doc/images/img/grpc-assignee.png)
After a reviewer is assigned to you, they will help with the next
steps, which are as follows:
1. You complete the code review and address the comments.
1. Your reviewer may add a few labels as needed.
### Pull Request Status - Green
Once you have approval from the reviewer, check if the tests are running. After
the tests are complete, look at the status of all the tests. If
everything is green, everything is good. But usually some failures exist. If
there are failures, select each failure. The selection will take you to a page
that has error details. Try to fix the issue.
### Pull Request Approval
For pull requests that are non-trivial, there is a thorough code review process.
You can read more about the process and requirements
[here](https://github.com/grpc/grpc/blob/master/CONTRIBUTING.md#guidelines-for-pull-requests).
After you fix the code review, you will finally get an approval. After getting
approval, you can submit the pull request.
![Pull request approved and labelled](doc/images/img/grpc-review-complete.png)
### Submission
You **cannot** do submission or merge of a pull request through Github.
![Pull request approved and labelled](doc/images/img/grpc-wait-for-merge.png)
After you have approval from a reviewer, a Google employee will trigger
the submission process. When the submission happens:
1. A commit with your changes, along with a few additional formatting changes, will
be committed to the `grpc/master` branch.
![Copybara commit](doc/images/img/grpc-copybara-commit.png)
1. The pull request you originally created will be closed.
![Pull request closed by copybara](doc/images/img/grpc-pr-closed-by-copybara.png)

View File

@ -8,12 +8,12 @@ See [CONTRIBUTING.md](https://github.com/grpc/grpc-community/blob/master/CONTRIB
for general contribution guidelines.
## Maintainers (in alphabetical order)
<!-- go/keep-sorted start case=no -->
- [a11r](https://github.com/a11r), Google LLC
- [apolcyn](https://github.com/apolcyn), Google LLC
- [arjunroy](https://github.com/arjunroy), Google LLC
- [ctiller](https://github.com/ctiller), Google LLC
- [daniel-j-born](https://github.com/daniel-j-born), Google LLC
- [dapengzhang0](https://github.com/dapengzhang0), Google LLC
- [dfawley](https://github.com/dfawley), Google LLC
- [dklempner](https://github.com/dklempner), Google LLC
- [drfloob](https://github.com/drfloob), Google LLC
@ -22,36 +22,32 @@ for general contribution guidelines.
- [guantaol](https://github.com/guantaol), Google LLC
- [hcaseyal](https://github.com/hcaseyal), Google LLC
- [jtattermusch](https://github.com/jtattermusch), Google LLC
- [kevinnilson](https://github.com/kevinnilson), Google LLC
- [LittleCVR](https://github.com/littlecvr), Google LLC
- [markdroth](https://github.com/markdroth), Google LLC
- [matthewstevenson88](https://github.com/matthewstevenson88), Google LLC
- [medinandres](https://github.com/medinandres), Google LLC
- [murgatroid99](https://github.com/murgatroid99), Google LLC
- [nanahpang](https://github.com/nanahpang), Google LLC
- [pfreixes](https://github.com/pfreixes), Skyscanner Ltd
- [ran-su](https://github.com/ran-su), Google LLC
- [sanjaypujare](https://github.com/sanjaypujare), Google LLC
- [sastryvp](https://github.com/sastryvp), Google LLC
- [sergiitk](https://github.com/sergiitk), Google LLC
- [soheilhy](https://github.com/soheilhy), Google LLC
- [stanley-cheung](https://github.com/stanley-cheung), Google LLC
- [thisisnotapril](https://github.com/thisisnotapril), Google LLC
- [tjagtap](https://github.com/tjagtap), Google LLC
- [veblush](https://github.com/veblush), Google LLC
- [vishalpowar](https://github.com/vishalpowar), Google LLC
- [Vizerai](https://github.com/Vizerai), Google LLC
- [wenbozhu](https://github.com/wenbozhu), Google LLC
- [yashykt](https://github.com/yashykt), Google LLC
- [yijiem](https://github.com/yijiem), Google LLC
- [yihuazhang](https://github.com/yihuazhang), Google LLC
- [ZhenLian](https://github.com/ZhenLian), Google LLC
- [ZhouyihaiDing](https://github.com/ZhouyihaiDing), Google LLC
<!-- go/keep-sorted end -->
## Emeritus Maintainers (in alphabetical order)
<!-- go/keep-sorted start case=no -->
- [adelez](https://github.com/adelez), Google LLC
- [AspirinSJL](https://github.com/AspirinSJL), Google LLC
- [billfeng327](https://github.com/billfeng327), Google LLC
- [bogdandrutu](https://github.com/bogdandrutu), Google LLC
- [dapengzhang0](https://github.com/dapengzhang0), Google LLC
- [dgquintas](https://github.com/dgquintas), Google LLC
- [ericgribkoff](https://github.com/ericgribkoff), Google LLC
- [fengli79](https://github.com/fengli79), Google LLC
@ -67,7 +63,6 @@ for general contribution guidelines.
- [lidizheng](https://github.com/lidizheng), Google LLC
- [lyuxuan](https://github.com/lyuxuan), Google LLC
- [matt-kwong](https://github.com/matt-kwong), Google LLC
- [medinandres](https://github.com/medinandres), Google LLC
- [mehrdada](https://github.com/mehrdada), Dropbox, Inc.
- [mhaidrygoog](https://github.com/mhaidrygoog), Google LLC
- [mit-mit](https://github.com/mit-mit), Google LLC
@ -86,11 +81,7 @@ for general contribution guidelines.
- [srini100](https://github.com/srini100), Google LLC
- [summerxyt](https://github.com/summerxyt), Google LLC
- [vjpai](https://github.com/vjpai), Google LLC
- [Vizerai](https://github.com/Vizerai), Google LLC
- [wcevans](https://github.com/wcevans), Google LLC
- [y-zeng](https://github.com/y-zeng), Google LLC
- [yang-g](https://github.com/yang-g), Google LLC
- [yihuazhang](https://github.com/yihuazhang), Google LLC
- [zpencer](https://github.com/zpencer), Google LLC
- [ZhenLian](https://github.com/ZhenLian), Google LLC
<!-- go/keep-sorted end -->

2955
Makefile generated

File diff suppressed because it is too large Load Diff

3
OWNERS Normal file
View File

@ -0,0 +1,3 @@
# Top level ownership
@markdroth **/OWNERS
@a11r **/OWNERS

File diff suppressed because it is too large Load Diff

View File

@ -26,21 +26,20 @@ runtime comes as a package available in a user's language package manager.
For instructions on how to use the language-specific gRPC runtime for a project,
please refer to these documents
- [C++](src/cpp): follow the instructions under the `src/cpp` directory
- [C#/.NET](https://github.com/grpc/grpc-dotnet): NuGet packages
`Grpc.Net.Client`, `Grpc.AspNetCore.Server`
- [Dart](https://github.com/grpc/grpc-dart): pub package `grpc`
- [Go](https://github.com/grpc/grpc-go): `go get google.golang.org/grpc`
- [Java](https://github.com/grpc/grpc-java): Use JARs from Maven Central
Repository
- [Kotlin](https://github.com/grpc/grpc-kotlin): Use JARs from Maven Central
Repository
- [Node](https://github.com/grpc/grpc-node): `npm install @grpc/grpc-js`
- [Objective-C](src/objective-c): Add `gRPC-ProtoRPC` dependency to podspec
- [PHP](src/php): `pecl install grpc`
- [Python](src/python/grpcio): `pip install grpcio`
- [Ruby](src/ruby): `gem install grpc`
- [WebJS](https://github.com/grpc/grpc-web): follow the grpc-web instructions
- [C++](src/cpp): follow the instructions under the `src/cpp` directory
- [C#/.NET](https://github.com/grpc/grpc-dotnet): NuGet packages `Grpc.Net.Client`, `Grpc.AspNetCore.Server`
- [Dart](https://github.com/grpc/grpc-dart): pub package `grpc`
- [Go](https://github.com/grpc/grpc-go): `go get google.golang.org/grpc`
- [Java](https://github.com/grpc/grpc-java): Use JARs from Maven Central
Repository
- [Kotlin](https://github.com/grpc/grpc-kotlin): Use JARs from Maven Central
Repository
- [Node](https://github.com/grpc/grpc-node): `npm install @grpc/grpc-js`
- [Objective-C](src/objective-c): Add `gRPC-ProtoRPC` dependency to podspec
- [PHP](src/php): `pecl install grpc`
- [Python](src/python/grpcio): `pip install grpcio`
- [Ruby](src/ruby): `gem install grpc`
- [WebJS](https://github.com/grpc/grpc-web): follow the grpc-web instructions
Per-language quickstart guides and tutorials can be found in the
[documentation section on the grpc.io website](https://grpc.io/docs/). Code
@ -67,7 +66,8 @@ gRPC.
## Performance
See the [Performance dashboard](https://grafana-dot-grpc-testing.appspot.com/)
See the
[Performance dashboard](https://grafana-dot-grpc-testing.appspot.com/)
for performance numbers of master branch daily builds.
## Concepts
@ -77,28 +77,28 @@ See [gRPC Concepts](CONCEPTS.md)
## About This Repository
This repository contains source code for gRPC libraries implemented in multiple
languages written on top of a shared C++ core library [src/core](src/core).
languages written on top of a shared C core library [src/core](src/core).
Libraries in different languages may be in various states of development. We are
seeking contributions for all of these libraries:
Language | Source
------------------------- | ----------------------------------
Shared C++ [core library] | [src/core](src/core)
C++ | [src/cpp](src/cpp)
Ruby | [src/ruby](src/ruby)
Python | [src/python](src/python)
PHP | [src/php](src/php)
C# (core library based) | [src/csharp](src/csharp)
Objective-C | [src/objective-c](src/objective-c)
| Language | Source |
| ----------------------- | ---------------------------------- |
| Shared C [core library] | [src/core](src/core) |
| C++ | [src/cpp](src/cpp) |
| Ruby | [src/ruby](src/ruby) |
| Python | [src/python](src/python) |
| PHP | [src/php](src/php) |
| C# (core library based) | [src/csharp](src/csharp) |
| Objective-C | [src/objective-c](src/objective-c) |
Language | Source repo
-------------------- | --------------------------------------------------
Java | [grpc-java](https://github.com/grpc/grpc-java)
Kotlin | [grpc-kotlin](https://github.com/grpc/grpc-kotlin)
Go | [grpc-go](https://github.com/grpc/grpc-go)
NodeJS | [grpc-node](https://github.com/grpc/grpc-node)
WebJS | [grpc-web](https://github.com/grpc/grpc-web)
Dart | [grpc-dart](https://github.com/grpc/grpc-dart)
.NET (pure C# impl.) | [grpc-dotnet](https://github.com/grpc/grpc-dotnet)
Swift | [grpc-swift](https://github.com/grpc/grpc-swift)
| Language | Source repo |
| -------------------- | -------------------------------------------------- |
| Java | [grpc-java](https://github.com/grpc/grpc-java) |
| Kotlin | [grpc-kotlin](https://github.com/grpc/grpc-kotlin) |
| Go | [grpc-go](https://github.com/grpc/grpc-go) |
| NodeJS | [grpc-node](https://github.com/grpc/grpc-node) |
| WebJS | [grpc-web](https://github.com/grpc/grpc-web) |
| Dart | [grpc-dart](https://github.com/grpc/grpc-dart) |
| .NET (pure C# impl.) | [grpc-dotnet](https://github.com/grpc/grpc-dotnet) |
| Swift | [grpc-swift](https://github.com/grpc/grpc-swift) |

View File

@ -4,7 +4,6 @@ require 'rspec/core/rake_task'
require 'rubocop/rake_task'
require 'bundler/gem_tasks'
require 'fileutils'
require 'tmpdir'
require_relative 'build_config.rb'
@ -30,8 +29,9 @@ Rake::ExtensionTask.new('grpc_c', spec) do |ext|
ext.cross_compile = true
ext.cross_platform = [
'x86-mingw32', 'x64-mingw32', 'x64-mingw-ucrt',
'x86_64-linux', 'x86-linux', 'aarch64-linux',
'x86_64-linux', 'x86-linux',
'x86_64-darwin', 'arm64-darwin',
'universal-darwin'
]
ext.cross_compiling do |spec|
spec.files = spec.files.select {
@ -109,6 +109,7 @@ task 'dlls', [:plat] do |t, args|
env += 'SYSTEM=MINGW32 '
env += 'EMBED_ZLIB=true '
env += 'EMBED_OPENSSL=true '
env += 'EMBED_CARES=true '
env += 'BUILDDIR=/tmp '
env += "V=#{verbose} "
env += "GRPC_RUBY_BUILD_PROCS=#{nproc_override} "
@ -143,7 +144,7 @@ task 'gem:native', [:plat] do |t, args|
verbose = ENV['V'] || '0'
grpc_config = ENV['GRPC_CONFIG'] || 'opt'
ruby_cc_versions = ['3.3.0', '3.2.0', '3.1.0', '3.0.0', '2.7.0'].join(':')
ruby_cc_versions = ['3.2.0', '3.1.0', '3.0.0', '2.7.0', '2.6.0'].join(':')
selected_plat = "#{args[:plat]}"
# use env variable to set artifact build paralellism
@ -157,7 +158,7 @@ task 'gem:native', [:plat] do |t, args|
prepare_ccache_cmd += "source tools/internal_ci/helper_scripts/prepare_ccache_symlinks_rc "
supported_windows_platforms = ['x86-mingw32', 'x64-mingw32', 'x64-mingw-ucrt']
supported_unix_platforms = ['x86_64-linux', 'x86-linux', 'aarch64-linux', 'x86_64-darwin', 'arm64-darwin']
supported_unix_platforms = ['x86_64-linux', 'x86-linux', 'x86_64-darwin', 'arm64-darwin']
supported_platforms = supported_windows_platforms + supported_unix_platforms
if selected_plat.empty?
@ -200,25 +201,12 @@ task 'gem:native', [:plat] do |t, args|
File.truncate('grpc_c.64-msvcrt.ruby', 0)
File.truncate('grpc_c.64-ucrt.ruby', 0)
`mkdir -p src/ruby/nativedebug/symbols`
# TODO(apolcyn): make debug symbols work on apple platforms.
# Currently we hit "objcopy: grpc_c.bundle: file format not recognized"
# TODO(apolcyn): make debug symbols work on aarch64 linux.
# Currently we hit "objcopy: Unable to recognise the format of the input file `grpc_c.so'"
unix_platforms_without_debug_symbols = ['x86_64-darwin', 'arm64-darwin', 'aarch64-linux']
unix_platforms.each do |plat|
if unix_platforms_without_debug_symbols.include?(plat)
debug_symbols_dir = ''
else
debug_symbols_dir = File.join(Dir.pwd, 'src/ruby/nativedebug/symbols')
end
run_rake_compiler(plat, <<~EOT)
#{prepare_ccache_cmd} && \
gem update --system --no-document && \
bundle && \
bundle exec rake clean && \
export GRPC_RUBY_DEBUG_SYMBOLS_OUTPUT_DIR=#{debug_symbols_dir} && \
bundle exec rake native:#{plat} pkg/#{spec.full_name}-#{plat}.gem pkg/#{spec.full_name}.gem \
RUBY_CC_VERSION=#{ruby_cc_versions} \
V=#{verbose} \
@ -226,13 +214,6 @@ task 'gem:native', [:plat] do |t, args|
GRPC_RUBY_BUILD_PROCS=#{nproc_override}
EOT
end
# Generate debug symbol packages to complement the native libraries we just built
unix_platforms.each do |plat|
unless unix_platforms_without_debug_symbols.include?(plat)
`bash src/ruby/nativedebug/build_package.sh #{plat}`
`cp src/ruby/nativedebug/pkg/*.gem pkg/`
end
end
end
# Define dependencies between the suites.

View File

@ -4,27 +4,16 @@ This guide is for troubleshooting gRPC implementations based on C core library (
## Enabling extra logging and tracing
Extra logging can be very useful for diagnosing problems. It can be used to increase the amount of information
Extra logging can be very useful for diagnosing problems. All gRPC implementations based on C core library support
the `GRPC_VERBOSITY` and `GRPC_TRACE` environment variables that can be used to increase the amount of information
that gets printed to stderr.
## GRPC_VERBOSITY
<!-- BEGIN_GOOGLE_INTERNAL_DOCUMENTATION
GRPC_VERBOSITY has been disabled for internal usage and will not work anymore.
If anyone wants to debug, we need to set verbose logs using absl.
END_GOOGLE_INTERNAL_DOCUMENTATION -->
<!-- BEGIN_OPEN_SOURCE_DOCUMENTATION -->
`GRPC_VERBOSITY` is used to set the minimum level of log messages printed by gRPC (supported values are `DEBUG`, `INFO` and `ERROR`). If this environment variable is unset, only `ERROR` logs will be printed. `ERROR` is recomeded for production systems.
<!-- END_OPEN_SOURCE_DOCUMENTATION -->
`GRPC_VERBOSITY` is used to set the minimum level of log messages printed by gRPC (supported values are `DEBUG`, `INFO` and `ERROR`). If this environment variable is unset, only `ERROR` logs will be printed.
## GRPC_TRACE
<!-- BEGIN_GOOGLE_INTERNAL_DOCUMENTATION
GRPC_VERBOSITY has been disabled for internal usage and will not work anymore.
If anyone wants to debug, we need to set verbose logs using absl.
END_GOOGLE_INTERNAL_DOCUMENTATION -->
`GRPC_TRACE` can be used to enable extra logging for some internal gRPC components. Enabling the right traces can be invaluable
for diagnosing for what is going wrong when things aren't working as intended. Possible values for `GRPC_TRACE` are listed in [Environment Variables Overview](doc/environment_variables.md).
Multiple traces can be enabled at once (use comma as separator).

View File

@ -27,34 +27,19 @@ custom_exec_properties(
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "platforms",
sha256 = "8150406605389ececb6da07cbcb509d5637a3ab9a24bc69b1101531367d89d74",
urls = ["https://github.com/bazelbuild/platforms/releases/download/0.0.8/platforms-0.0.8.tar.gz"],
name = "build_bazel_rules_android",
sha256 = "cd06d15dd8bb59926e4d65f9003bfc20f9da4b2519985c27e190cddc8b7a7806",
strip_prefix = "rules_android-0.1.1",
urls = ["https://github.com/bazelbuild/rules_android/archive/v0.1.1.zip"],
)
RULES_ANDROID_NDK_COMMIT = "010f4f17dd13a8baaaacc28ba6c8c2c75f54c68b"
load("//third_party/android:android_configure.bzl", "android_configure")
RULES_ANDROID_NDK_SHA = "2ab6a97748772f289331d75caaaee0593825935d1d9d982231a437fb8ab5a14d"
android_configure(name = "local_config_android")
http_archive(
name = "rules_android_ndk",
sha256 = RULES_ANDROID_NDK_SHA,
strip_prefix = "rules_android_ndk-%s" % RULES_ANDROID_NDK_COMMIT,
url = "https://github.com/bazelbuild/rules_android_ndk/archive/%s.zip" % RULES_ANDROID_NDK_COMMIT,
)
load("@local_config_android//:android_configure.bzl", "android_workspace")
android_sdk_repository(
name = "androidsdk",
build_tools_version = "34.0.0",
)
load("@rules_android_ndk//:rules.bzl", "android_ndk_repository")
android_ndk_repository(name = "androidndk")
# Note that we intentionally avoid calling `register_toolchains("@androidndk//:all")`
# here, because the toolchain rule fails when $ANDROID_NDK_HOME is not set.
# Use `--extra_toolchains=@androidndk//:all` to manually register it when building for Android.
android_workspace()
# Prevents bazel's '...' expansion from including the following folder.
# This is required because the BUILD file in the following folder
@ -63,7 +48,7 @@ android_ndk_repository(name = "androidndk")
# be invoked by binder transport implementation through JNI.
local_repository(
name = "binder_transport_android_helper",
path = "src/core/ext/transport/binder/java",
path = "./src/core/ext/transport/binder/java",
)
# Prevents bazel's '...' expansion from including the following folder.
@ -74,31 +59,27 @@ local_repository(
path = "third_party/utf8_range",
)
load("@rules_python//python:pip.bzl", "pip_parse")
load("@io_bazel_rules_python//python:pip.bzl", "pip_install")
pip_parse(
pip_install(
name = "grpc_python_dependencies",
requirements_lock = "@com_github_grpc_grpc//:requirements.bazel.txt",
requirements = "@com_github_grpc_grpc//:requirements.bazel.txt",
)
load("@grpc_python_dependencies//:requirements.bzl", "install_deps")
install_deps()
load("@com_google_protobuf//bazel:system_python.bzl", "system_python")
load("@upb//bazel:system_python.bzl", "system_python")
system_python(
name = "system_python",
minimum_python_version = "3.7",
)
load("@system_python//:pip.bzl", system_pip_parse = "pip_parse")
load("@system_python//:pip.bzl", "pip_parse")
system_pip_parse(
pip_parse(
name = "pip_deps",
requirements = "@com_google_protobuf//python:requirements.txt",
requirements = "@upb//python:requirements.txt",
requirements_overrides = {
"3.11": "@com_google_protobuf//python:requirements_311.txt",
"3.11": "@upb//python:requirements_311.txt",
},
)
@ -108,13 +89,6 @@ http_archive(
url = "https://github.com/bazelbuild/rules_swift/releases/download/1.7.1/rules_swift.1.7.1.tar.gz",
)
load(
"@build_bazel_apple_support//lib:repositories.bzl",
"apple_support_dependencies",
)
apple_support_dependencies()
load(
"@build_bazel_rules_swift//swift:repositories.bzl",
"swift_rules_dependencies",
@ -122,32 +96,6 @@ load(
swift_rules_dependencies()
# This loads the libpfm transitive dependency.
# See https://github.com/google/benchmark/pull/1520
load("@com_github_google_benchmark//:bazel/benchmark_deps.bzl", "benchmark_deps")
benchmark_deps()
# This is a transitive dependency from google_cloud_cpp
bind(
name = "cares",
actual = "@com_github_cares_cares//:ares",
)
load("@io_opentelemetry_cpp//bazel:repository.bzl", "opentelemetry_cpp_deps")
opentelemetry_cpp_deps()
load("@io_opentelemetry_cpp//bazel:extra_deps.bzl", "opentelemetry_extra_deps")
opentelemetry_extra_deps()
# Transitive dependency of opentelemetry_extra_deps()
bind(
name = "madler_zlib",
actual = "@zlib//:zlib",
)
# TODO: Enable below once https://github.com/bazel-xcode/PodToBUILD/issues/232 is resolved
#
#http_archive(

View File

@ -14,4 +14,4 @@
# AUTO-GENERATED FROM `$REPO_ROOT/templates/_metadata.py.template`!!!
__version__ = """1.65.0.dev0"""
__version__ = """1.56.4"""

5
bazel/OWNERS Normal file
View File

@ -0,0 +1,5 @@
set noparent
@jtattermusch
@veblush
@gnossen

View File

@ -42,7 +42,6 @@ import unittest
import sys
import os
import pkgutil
import importlib
def trace_callback(event, args):
if event in ("switch", "throw"):
@ -74,9 +73,7 @@ class SingleLoader(object):
tests = []
for importer, module_name, is_package in pkgutil.walk_packages([os.path.dirname(os.path.relpath(__file__))]):
if pattern in module_name:
spec = importer.find_spec(module_name)
module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(module)
module = importer.find_module(module_name).load_module(module_name)
tests.append(loader.loadTestsFromModule(module))
if len(tests) != 1:
raise AssertionError("Expected only 1 test module. Found {}".format(tests))

View File

@ -57,107 +57,7 @@ GRPC_LLVM_WARNING_FLAGS = [
"-Wno-unused-function",
]
GRPC_LLVM_WINDOWS_WARNING_FLAGS = GRPC_LLVM_WARNING_FLAGS + [
### Some checks that are missing with clang-cl
"-Wthread-safety",
"-Wreorder-ctor",
### Avoid some checks that are default on clang-cl
"-Wno-c++98-compat-pedantic",
"-Wno-missing-prototypes",
"-Wno-thread-safety-precise", # too many aliases
# abseil offenses
"-Wno-comma",
"-Wno-deprecated-redundant-constexpr-static-def",
"-Wno-deprecated", # remove when the above works in all clang versions we test with
"-Wno-float-equal",
"-Wno-gcc-compat",
"-Wno-reserved-identifier",
"-Wno-thread-safety-negative",
"-Wno-sign-compare",
# re2 offenses
"-Wno-zero-as-null-pointer-constant",
# ares offenses
"-Wno-macro-redefined",
# protobuf offenses
"-Wno-cast-align",
"-Wno-inconsistent-missing-destructor-override",
# xxhash offenses
"-Wno-disabled-macro-expansion",
# benchmark offenses
"-Wno-shift-sign-overflow",
# Evidently nodiscard is inappropriately pinned as a C++17 feature
"-Wno-c++17-attribute-extensions",
# declarations are not used in many places
"-Wno-missing-variable-declarations",
# TODO: delete iomgr
"-Wno-old-style-cast",
"-Wno-cast-qual",
"-Wno-unused-member-function",
"-Wno-unused-template",
# TODO(hork): see if the TraceFlag offense can be removed
"-Wno-global-constructors",
# TODO(hork): clean up EE offenses
"-Wno-missing-field-initializers",
"-Wno-non-virtual-dtor",
"-Wno-thread-safety-reference-return",
# TODO(ctiller): offense: dump_args. signed to unsigned
"-Wno-sign-conversion",
"-Wno-shorten-64-to-32",
# TODO: general cleanup required. Maybe new developer or rainy day projects.
"-Wno-unreachable-code-break",
"-Wno-unreachable-code-return",
"-Wno-unreachable-code",
"-Wno-used-but-marked-unused",
"-Wno-newline-eof",
"-Wno-unused-const-variable",
"-Wno-extra-semi",
"-Wno-extra-semi-stmt",
"-Wno-suggest-destructor-override",
"-Wno-shadow",
"-Wno-missing-noreturn",
"-Wno-nested-anon-types",
"-Wno-gnu-anonymous-struct",
"-Wno-nonportable-system-include-path",
"-Wno-microsoft-cast",
"-Wno-exit-time-destructors",
"-Wno-undef", # #if <MACRO_NAME> to #ifdef <MACRO_NAME>
"-Wno-unused-macros",
"-Wno-redundant-parens",
"-Wno-undefined-func-template",
"-Wno-gnu-zero-variadic-macro-arguments",
"-Wno-double-promotion",
"-Wno-implicit-float-conversion",
"-Wno-implicit-int-conversion",
"-Wno-float-conversion",
"-Wno-unused-parameter",
"-Wno-suggest-override",
"-Wno-documentation",
"-Wno-documentation-unknown-command",
"-Wno-unsafe-buffer-usage",
### possibly bad warnings for this codebase
"-Wno-covered-switch-default",
"-Wno-switch-default",
"-Wno-switch-enum",
"-Wno-c99-extensions",
"-Wno-unused-private-field", # GRPC_UNUSED does not appear to work for private fields
]
GRPC_DEFAULT_COPTS = select({
"//:use_strict_warning": GRPC_LLVM_WARNING_FLAGS + ["-DUSE_STRICT_WARNING=1"],
"//:use_strict_warning_windows": GRPC_LLVM_WINDOWS_WARNING_FLAGS + ["-DUSE_STRICT_WARNING=1"],
"//conditions:default": [],
})

209
bazel/experiments.bzl generated
View File

@ -16,175 +16,50 @@
"""Dictionary of tags to experiments so we know when to test different experiments."""
EXPERIMENT_ENABLES = {
"call_status_override_on_cancellation": "call_status_override_on_cancellation",
"canary_client_privacy": "canary_client_privacy",
"client_privacy": "client_privacy",
"event_engine_client": "event_engine_client",
"event_engine_dns": "event_engine_dns",
"event_engine_listener": "event_engine_listener",
"free_large_allocator": "free_large_allocator",
"http2_stats_fix": "http2_stats_fix",
"keepalive_fix": "keepalive_fix",
"keepalive_server_fix": "keepalive_server_fix",
"max_pings_wo_data_throttle": "max_pings_wo_data_throttle",
"monitoring_experiment": "monitoring_experiment",
"multiping": "multiping",
"peer_state_based_framing": "peer_state_based_framing",
"pick_first_new": "pick_first_new",
"promise_based_inproc_transport": "promise_based_inproc_transport",
"rstpit": "rstpit",
"schedule_cancellation_over_write": "schedule_cancellation_over_write",
"server_privacy": "server_privacy",
"tcp_frame_size_tuning": "tcp_frame_size_tuning",
"tcp_rcv_lowat": "tcp_rcv_lowat",
"trace_record_callops": "trace_record_callops",
"unconstrained_max_quota_buffer_size": "unconstrained_max_quota_buffer_size",
"work_serializer_clears_time_cache": "work_serializer_clears_time_cache",
"work_serializer_dispatch": "work_serializer_dispatch",
}
EXPERIMENT_POLLERS = [
"event_engine_client",
"event_engine_dns",
"event_engine_listener",
]
EXPERIMENTS = {
"windows": {
"dbg": {
},
"off": {
"endpoint_test": [
"tcp_frame_size_tuning",
"tcp_rcv_lowat",
],
"flow_control_test": [
"multiping",
"peer_state_based_framing",
"rstpit",
"tcp_frame_size_tuning",
"tcp_rcv_lowat",
],
"resource_quota_test": [
"free_large_allocator",
"unconstrained_max_quota_buffer_size",
],
},
"on": {
"cancel_ares_query_test": [
"event_engine_dns",
],
"core_end2end_test": [
"event_engine_client",
"event_engine_listener",
],
"cpp_lb_end2end_test": [
"pick_first_new",
],
"event_engine_client_test": [
"event_engine_client",
],
"event_engine_listener_test": [
"event_engine_listener",
],
"lb_unit_test": [
"pick_first_new",
],
"resolver_component_tests_runner_invoker": [
"event_engine_dns",
],
"xds_end2end_test": [
"pick_first_new",
],
},
"dbg": {
},
"ios": {
"dbg": {
},
"off": {
"endpoint_test": [
"tcp_frame_size_tuning",
"tcp_rcv_lowat",
],
"flow_control_test": [
"multiping",
"peer_state_based_framing",
"rstpit",
"tcp_frame_size_tuning",
"tcp_rcv_lowat",
],
"resource_quota_test": [
"free_large_allocator",
"unconstrained_max_quota_buffer_size",
],
},
"on": {
"cpp_lb_end2end_test": [
"pick_first_new",
],
"lb_unit_test": [
"pick_first_new",
],
"xds_end2end_test": [
"pick_first_new",
],
},
"off": {
"census_test": [
"transport_supplies_client_latency",
],
"core_end2end_test": [
"event_engine_client",
"event_engine_listener",
"promise_based_client_call",
"promise_based_server_call",
"work_stealing",
],
"cpp_end2end_test": [
"promise_based_server_call",
],
"endpoint_test": [
"tcp_frame_size_tuning",
"tcp_rcv_lowat",
],
"event_engine_client_test": [
"event_engine_client",
],
"event_engine_listener_test": [
"event_engine_listener",
],
"flow_control_test": [
"peer_state_based_framing",
"tcp_frame_size_tuning",
"tcp_rcv_lowat",
],
"lame_client_test": [
"promise_based_client_call",
],
"resource_quota_test": [
"free_large_allocator",
"memory_pressure_controller",
"unconstrained_max_quota_buffer_size",
],
"xds_end2end_test": [
"promise_based_server_call",
],
},
"posix": {
"dbg": {
},
"off": {
"core_end2end_test": [
"event_engine_client",
],
"endpoint_test": [
"tcp_frame_size_tuning",
"tcp_rcv_lowat",
],
"event_engine_client_test": [
"event_engine_client",
],
"flow_control_test": [
"multiping",
"peer_state_based_framing",
"rstpit",
"tcp_frame_size_tuning",
"tcp_rcv_lowat",
],
"resource_quota_test": [
"free_large_allocator",
"unconstrained_max_quota_buffer_size",
],
},
"on": {
"cancel_ares_query_test": [
"event_engine_dns",
],
"core_end2end_test": [
"event_engine_listener",
"work_serializer_dispatch",
],
"cpp_end2end_test": [
"work_serializer_dispatch",
],
"cpp_lb_end2end_test": [
"pick_first_new",
],
"event_engine_listener_test": [
"event_engine_listener",
],
"lb_unit_test": [
"pick_first_new",
"work_serializer_dispatch",
],
"resolver_component_tests_runner_invoker": [
"event_engine_dns",
],
"xds_end2end_test": [
"pick_first_new",
"work_serializer_dispatch",
],
},
"on": {
},
}

View File

@ -175,7 +175,7 @@ _generate_cc = rule(
"plugin": attr.label(
executable = True,
providers = ["files_to_run"],
cfg = "exec",
cfg = "host",
),
"flags": attr.string_list(
mandatory = False,
@ -187,9 +187,9 @@ _generate_cc = rule(
mandatory = False,
),
"_protoc": attr.label(
default = Label("@com_google_protobuf//:protoc"),
default = Label("//external:protocol_compiler"),
executable = True,
cfg = "exec",
cfg = "host",
),
},
# We generate .h files, so we need to output to genfiles.

View File

@ -166,7 +166,7 @@ generate_objc = rule(
default = "@com_github_grpc_grpc//src/compiler:grpc_objective_c_plugin",
executable = True,
providers = ["files_to_run"],
cfg = "exec",
cfg = "host",
),
"srcs": attr.string_list(
mandatory = False,
@ -180,9 +180,9 @@ generate_objc = rule(
default = "@com_google_protobuf//:well_known_type_protos",
),
"_protoc": attr.label(
default = Label("@com_google_protobuf//:protoc"),
default = Label("//external:protocol_compiler"),
executable = True,
cfg = "exec",
cfg = "host",
),
},
output_to_genfiles = True,

View File

@ -1,28 +0,0 @@
# Copyright 2023 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
licenses(["notice"])
package(
default_visibility = ["//visibility:public"],
)
# This is needed for the dependency on google_cloud_cpp to work.
# Taken from https://github.com/googleapis/google-cloud-cpp/blob/2839e9dba793ca023e11ea67f201f66f74fa7d3e/bazel/googleapis.BUILD
cc_library(
name = "googleapis_system_includes",
includes = [
".",
],
)

View File

@ -27,13 +27,12 @@
Contains macros used throughout the repo.
"""
load("@build_bazel_rules_apple//apple:ios.bzl", "ios_unit_test")
load("@build_bazel_rules_apple//apple/testing/default_runner:ios_test_runner.bzl", "ios_test_runner")
load("@com_google_protobuf//bazel:upb_proto_library.bzl", "upb_proto_library", "upb_proto_reflection_library")
load("//bazel:cc_grpc_library.bzl", "cc_grpc_library")
load("//bazel:copts.bzl", "GRPC_DEFAULT_COPTS")
load("//bazel:experiments.bzl", "EXPERIMENTS", "EXPERIMENT_ENABLES", "EXPERIMENT_POLLERS")
load("//bazel:test_experiments.bzl", "TEST_EXPERIMENTS", "TEST_EXPERIMENT_ENABLES", "TEST_EXPERIMENT_POLLERS")
load("//bazel:experiments.bzl", "EXPERIMENTS")
load("@upb//bazel:upb_proto_library.bzl", "upb_proto_library", "upb_proto_reflection_library")
load("@build_bazel_rules_apple//apple:ios.bzl", "ios_unit_test")
load("@build_bazel_rules_apple//apple/testing/default_runner:ios_test_runner.bzl", "ios_test_runner")
# The set of pollers to test against if a test exercises polling
POLLERS = ["epoll1", "poll"]
@ -45,7 +44,6 @@ def if_not_windows(a):
return select({
"//:windows": [],
"//:windows_msvc": [],
"//:windows_clang": [],
"//conditions:default": a,
})
@ -53,23 +51,20 @@ def if_windows(a):
return select({
"//:windows": a,
"//:windows_msvc": a,
"//:windows_clang": a,
"//conditions:default": [],
})
def _get_external_deps(external_deps):
ret = []
for dep in external_deps:
if dep.startswith("@"):
ret.append(dep)
elif dep == "address_sorting":
if dep == "address_sorting":
ret.append("//third_party/address_sorting")
elif dep == "xxhash":
ret.append("//third_party/xxhash")
elif dep == "cares":
ret += select({
"//:grpc_no_ares": [],
"//conditions:default": ["//third_party:cares"],
"//conditions:default": ["//external:cares"],
})
elif dep == "cronet_c_for_grpc":
ret.append("//third_party/objective_c/Cronet:cronet_c_for_grpc")
@ -77,14 +72,8 @@ def _get_external_deps(external_deps):
ret.append("@com_google_absl//" + dep)
elif dep.startswith("google/"):
ret.append("@com_google_googleapis//" + dep)
elif dep.startswith("otel/"):
ret.append(dep.replace("otel/", "@io_opentelemetry_cpp//"))
elif dep.startswith("google_cloud_cpp"):
ret.append(dep.replace("google_cloud_cpp", "@google_cloud_cpp//"))
elif dep == "libprotobuf_mutator":
ret.append("@com_google_libprotobuf_mutator//:libprotobuf_mutator")
else:
ret.append("//third_party:" + dep)
ret.append("//external:" + dep)
return ret
def _update_visibility(visibility):
@ -101,40 +90,29 @@ def _update_visibility(visibility):
"alt_grpc++_base_unsecure_legacy": PRIVATE,
"alts_frame_protector": PRIVATE,
"channelz": PRIVATE,
"chaotic_good": PRIVATE,
"client_channel": PRIVATE,
"cli": PRIVATE,
"core_credentials": PRIVATE,
"debug_location": PRIVATE,
"endpoint_tests": PRIVATE,
"exec_ctx": PRIVATE,
"gpr_public_hdrs": PRIVATE,
"grpclb": PRIVATE,
"grpc_experiments": PRIVATE,
"grpc_opencensus_plugin": PUBLIC,
"grpc_public_hdrs": PRIVATE,
"grpcpp_gcp_observability": PUBLIC,
"grpc_resolver_fake": PRIVATE,
"grpc++_public_hdrs": PUBLIC,
"grpc++_test": PRIVATE,
"http": PRIVATE,
"httpcli": PRIVATE,
"iomgr_timer": PRIVATE,
"iomgr_internal_errqueue": PRIVATE,
"iomgr_buffer_list": PRIVATE,
"json_reader_legacy": PRIVATE,
"otel_plugin": PRIVATE,
"public": PUBLIC,
"ref_counted_ptr": PRIVATE,
"tcp_tracer": PRIVATE,
"trace": PRIVATE,
"tsi_interface": PRIVATE,
"tsi": PRIVATE,
"xds": PRIVATE,
"xds_client_core": PRIVATE,
"xds_end2end_test_utils": PRIVATE,
"grpc_python_observability": PRIVATE,
"event_engine_base_hdrs": PRIVATE,
"useful": PRIVATE,
}
final_visibility = []
for rule in visibility:
@ -217,8 +195,8 @@ def grpc_cc_library(
linkopts = linkopts,
includes = [
"include",
"src/core/ext/upb-gen", # Once upb code-gen issue is resolved, remove this.
"src/core/ext/upbdefs-gen", # Once upb code-gen issue is resolved, remove this.
"src/core/ext/upb-generated", # Once upb code-gen issue is resolved, remove this.
"src/core/ext/upbdefs-generated", # Once upb code-gen issue is resolved, remove this.
],
alwayslink = alwayslink,
data = data,
@ -237,7 +215,6 @@ def grpc_proto_library(
name,
srcs = [],
deps = [],
visibility = None,
well_known_protos = False,
has_services = True,
use_external = False,
@ -246,7 +223,6 @@ def grpc_proto_library(
name = name,
srcs = srcs,
deps = deps,
visibility = visibility,
well_known_protos = well_known_protos,
proto_only = not has_services,
use_external = use_external,
@ -293,10 +269,8 @@ def ios_cc_test(
deps = ios_test_deps,
)
def expand_poller_config(name, srcs, deps, tags, args, exclude_pollers, uses_polling, uses_event_engine, flaky):
"""Common logic used to parameterize tests for every poller and EventEngine.
Used by expand_tests (repeatedly) to form base lists of pollers for each experiment.
def expand_tests(name, srcs, deps, tags, args, exclude_pollers, uses_polling, uses_event_engine, flaky):
"""Common logic used to parameterize tests for every poller and EventEngine and experiment.
Args:
name: base name of the test
@ -313,12 +287,8 @@ def expand_poller_config(name, srcs, deps, tags, args, exclude_pollers, uses_pol
Returns:
A list of dictionaries containing modified values of name, srcs, deps, tags, and args.
"""
poller_config = []
# See work_stealing_thread_pool.cc for details.
default_env = {"GRPC_THREAD_POOL_VERBOSE_FAILURES": "true"}
if not uses_polling:
tags = tags + ["no_uses_polling"]
@ -329,7 +299,7 @@ def expand_poller_config(name, srcs, deps, tags, args, exclude_pollers, uses_pol
"tags": tags,
"args": args,
"flaky": flaky,
"env": default_env,
"env": {},
})
else:
# On linux we run the same test with the default EventEngine, once for each
@ -349,7 +319,7 @@ def expand_poller_config(name, srcs, deps, tags, args, exclude_pollers, uses_pol
"args": args,
"env": {
"GRPC_POLL_STRATEGY": poller,
} | default_env,
},
"flaky": flaky,
})
@ -366,7 +336,7 @@ def expand_poller_config(name, srcs, deps, tags, args, exclude_pollers, uses_pol
"deps": deps,
"tags": tags + ["no_linux"],
"args": args,
"env": default_env,
"env": {},
"flaky": flaky,
})
else:
@ -386,52 +356,23 @@ def expand_poller_config(name, srcs, deps, tags, args, exclude_pollers, uses_pol
"deps": deps,
"tags": test_tags,
"args": test_args,
"env": default_env,
"env": {},
"flaky": flaky,
})
return poller_config
def expand_tests(name, srcs, deps, tags, args, exclude_pollers, uses_polling, uses_event_engine, flaky):
"""Common logic used to parameterize tests for every poller and EventEngine and experiment.
Args:
name: base name of the test
srcs: source files
deps: base deps
tags: base tags
args: base args
flaky: base flaky
exclude_pollers: list of poller names to exclude for this set of tests.
uses_polling: set to False if the test is not sensitive to polling methodology.
uses_event_engine: set to False if the test is not sensitive to
EventEngine implementation differences
Returns:
A list of dictionaries containing modified values of name, srcs, deps, tags, and args.
"""
experiments = {}
# buildifier: disable=uninitialized
def _populate_experiments_platform_config(config, platform_experiments_map):
for platform, experiments_on_platform in platform_experiments_map.items():
for mode, tag_to_experiments in experiments_on_platform.items():
if mode not in config:
config[mode] = {}
for tag in tags:
if tag not in tag_to_experiments:
continue
for experiment in tag_to_experiments[tag]:
if experiment not in config[mode]:
config[mode][experiment] = []
config[mode][experiment].append(platform)
_populate_experiments_platform_config(experiments, EXPERIMENTS)
_populate_experiments_platform_config(experiments, TEST_EXPERIMENTS)
for mode, tag_to_experiments in EXPERIMENTS.items():
experiments[mode] = {}
for tag in tags:
if tag not in tag_to_experiments:
continue
for experiment in tag_to_experiments[tag]:
experiments[mode][experiment] = 1
experiments[mode] = list(experiments[mode].keys())
mode_config = {
# format: <mode>: (enabled_target_tags, disabled_target_tags)
"dbg": (["noopt"], ["nodbg"]),
"on": (None, []),
"off": ([], None),
}
@ -439,77 +380,44 @@ def expand_tests(name, srcs, deps, tags, args, exclude_pollers, uses_polling, us
must_have_tags = [
# We don't run experiments on cmake builds
"bazel_only",
# Nor on windows
"no_windows",
# Nor on mac
"no_mac",
# Nor on arm64
"no_arm64",
]
def _update_experiments_platform_test_tags(tags, platforms):
if "posix" not in platforms:
if "no_linux" not in tags:
tags.append("no_linux")
if "no_mac" not in tags:
tags.append("no_mac")
if "windows" not in platforms:
if "no_windows" not in tags:
tags.append("no_windows")
if "ios" not in platforms:
if "no_test_ios" not in tags:
tags.append("no_test_ios")
return tags
base_params = {
"name": name,
"srcs": srcs,
"deps": deps,
"tags": tags,
"args": args,
"exclude_pollers": exclude_pollers,
"uses_polling": uses_polling,
"uses_event_engine": uses_event_engine,
"flaky": flaky,
}
experiment_config = expand_poller_config(**base_params)
experiment_enables = {k: v for k, v in EXPERIMENT_ENABLES.items() + TEST_EXPERIMENT_ENABLES.items()}
experiment_pollers = EXPERIMENT_POLLERS + TEST_EXPERIMENT_POLLERS
experiment_config = list(poller_config)
for mode, config in mode_config.items():
enabled_tags, disabled_tags = config
if enabled_tags != None:
for experiment in experiments[mode].keys():
experiment_params = dict(base_params)
experiment_params["uses_polling"] = uses_polling and (experiment in experiment_pollers)
for config in expand_poller_config(**experiment_params):
for experiment in experiments[mode]:
for config in poller_config:
config = dict(config)
config["name"] = config["name"] + "@experiment=" + experiment
env = dict(config["env"])
env["GRPC_EXPERIMENTS"] = experiment_enables[experiment]
env["GRPC_CI_EXPERIMENTS"] = "1"
env["GRPC_EXPERIMENTS"] = experiment
config["env"] = env
tags = config["tags"] + ["experiment_variation"]
tags = config["tags"]
for tag in must_have_tags + enabled_tags:
if tag not in tags:
tags = tags + [tag]
config["tags"] = _update_experiments_platform_test_tags(tags, experiments[mode][experiment])
config["tags"] = tags
config["flaky"] = True
experiment_config.append(config)
if disabled_tags != None:
for experiment in experiments[mode].keys():
experiment_params = dict(base_params)
experiment_params["uses_polling"] = uses_polling and (experiment in experiment_pollers)
for config in expand_poller_config(**experiment_params):
for experiment in experiments[mode]:
for config in poller_config:
config = dict(config)
config["name"] = config["name"] + "@experiment=no_" + experiment
env = dict(config["env"])
env["GRPC_EXPERIMENTS"] = "-" + experiment
env["GRPC_CI_EXPERIMENTS"] = "1"
config["env"] = env
tags = config["tags"] + ["experiment_variation"]
tags = config["tags"]
for tag in must_have_tags + disabled_tags:
if tag not in tags:
tags = tags + [tag]
config["tags"] = _update_experiments_platform_test_tags(tags, experiments[mode][experiment])
config["tags"] = tags
experiment_config.append(config)
return experiment_config
@ -543,7 +451,7 @@ def grpc_cc_test(name, srcs = [], deps = [], external_deps = [], args = [], data
if language.upper() == "C":
copts = copts + if_not_windows(["-std=c11"])
core_deps = deps + _get_external_deps(external_deps) + ["//test/core/test_util:grpc_suppressions"]
core_deps = deps + _get_external_deps(external_deps) + ["//test/core/util:grpc_suppressions"]
# Test args for all tests
test_args = {
@ -565,26 +473,15 @@ def grpc_cc_test(name, srcs = [], deps = [], external_deps = [], args = [], data
tags = tags,
deps = core_deps,
args = args,
flaky = True,
flaky = flaky,
**test_args
)
native.cc_library(
name = "%s_TEST_LIBRARY" % name,
testonly = 1,
srcs = srcs,
deps = core_deps,
tags = tags,
)
for poller_config in expand_tests(name, srcs, core_deps, tags, args, exclude_pollers, uses_polling, uses_event_engine, flaky):
if poller_config["srcs"] != srcs:
fail("srcs changed")
if poller_config["deps"] != core_deps:
fail("deps changed: %r --> %r" % (deps, poller_config["deps"]))
native.cc_test(
name = poller_config["name"],
deps = ["%s_TEST_LIBRARY" % name],
srcs = poller_config["srcs"],
deps = poller_config["deps"],
tags = poller_config["tags"],
args = poller_config["args"],
env = poller_config["env"],
@ -621,7 +518,7 @@ def grpc_cc_binary(name, srcs = [], deps = [], external_deps = [], args = [], da
data = data,
testonly = testonly,
linkshared = linkshared,
deps = deps + _get_external_deps(external_deps) + ["//test/core/test_util:grpc_suppressions"],
deps = deps + _get_external_deps(external_deps) + ["//test/core/util:grpc_suppressions"],
copts = GRPC_DEFAULT_COPTS + copts,
linkopts = if_not_windows(["-pthread"]) + linkopts,
tags = tags,
@ -643,9 +540,6 @@ def grpc_generate_one_off_targets():
def grpc_generate_objc_one_off_targets():
pass
def grpc_generate_one_off_internal_targets():
pass
def grpc_sh_test(name, srcs = [], args = [], data = [], uses_polling = True, size = "medium", timeout = None, tags = [], exec_compatible_with = [], exec_properties = {}, shard_count = None, flaky = None, exclude_pollers = [], uses_event_engine = True):
"""Execute an sh_test for every <poller> x <EventEngine> combination
@ -739,13 +633,6 @@ def grpc_package(name, visibility = "private", features = []):
features = features,
)
def grpc_filegroup(name, srcs, **kwargs):
native.filegroup(
name = name,
srcs = srcs,
**kwargs
)
def grpc_objc_library(
name,
srcs = [],
@ -804,22 +691,3 @@ def python_config_settings():
name = "python3",
flag_values = {"@bazel_tools//tools/python:python_version": "PY3"},
)
# buildifier: disable=unnamed-macro
def grpc_clang_cl_settings():
native.platform(
name = "x64_windows-clang-cl",
constraint_values = [
"@platforms//cpu:x86_64",
"@platforms//os:windows",
"@bazel_tools//tools/cpp:clang-cl",
],
)
native.config_setting(
name = "windows_clang",
constraint_values = [
"@platforms//cpu:x86_64",
"@platforms//os:windows",
"@bazel_tools//tools/cpp:clang-cl",
],
)

View File

@ -14,32 +14,227 @@
"""Load dependencies needed to compile and test the grpc library as a 3rd-party consumer."""
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("//bazel:grpc_python_deps.bzl", "grpc_python_deps")
load("@com_github_grpc_grpc//bazel:grpc_python_deps.bzl", "grpc_python_deps")
# buildifier: disable=unnamed-macro
def grpc_deps():
"""Loads dependencies need to compile and test the grpc library."""
if "platforms" not in native.existing_rules():
http_archive(
name = "platforms",
sha256 = "8150406605389ececb6da07cbcb509d5637a3ab9a24bc69b1101531367d89d74",
urls = [
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/bazelbuild/platforms/releases/download/0.0.8/platforms-0.0.8.tar.gz",
"https://github.com/bazelbuild/platforms/releases/download/0.0.8/platforms-0.0.8.tar.gz",
],
)
native.bind(
name = "upb_lib",
actual = "@upb//:upb",
)
native.bind(
name = "upb_collections_lib",
actual = "@upb//:collections",
)
native.bind(
name = "upb_reflection",
actual = "@upb//:reflection",
)
native.bind(
name = "upb_lib_descriptor",
actual = "@upb//:descriptor_upb_proto",
)
native.bind(
name = "upb_lib_descriptor_reflection",
actual = "@upb//:descriptor_upb_proto_reflection",
)
native.bind(
name = "upb_textformat_lib",
actual = "@upb//:textformat",
)
native.bind(
name = "upb_json_lib",
actual = "@upb//:json",
)
native.bind(
name = "upb_generated_code_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me",
actual = "@upb//:generated_code_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me",
)
native.bind(
name = "libssl",
actual = "@boringssl//:ssl",
)
native.bind(
name = "libcrypto",
actual = "@boringssl//:crypto",
)
native.bind(
name = "madler_zlib",
actual = "@zlib//:zlib",
)
native.bind(
name = "protobuf",
actual = "@com_google_protobuf//:protobuf",
)
native.bind(
name = "protobuf_clib",
actual = "@com_google_protobuf//:protoc_lib",
)
native.bind(
name = "protobuf_headers",
actual = "@com_google_protobuf//:protobuf_headers",
)
native.bind(
name = "protocol_compiler",
actual = "@com_google_protobuf//:protoc",
)
native.bind(
name = "cares",
actual = "@com_github_cares_cares//:ares",
)
native.bind(
name = "gtest",
actual = "@com_google_googletest//:gtest",
)
native.bind(
name = "fuzztest",
actual = "@com_google_fuzztest//fuzztest",
)
native.bind(
name = "fuzztest_main",
actual = "@com_google_fuzztest//fuzztest:fuzztest_gtest_main",
)
native.bind(
name = "benchmark",
actual = "@com_github_google_benchmark//:benchmark",
)
native.bind(
name = "re2",
actual = "@com_googlesource_code_re2//:re2",
)
native.bind(
name = "grpc_cpp_plugin",
actual = "@com_github_grpc_grpc//src/compiler:grpc_cpp_plugin",
)
native.bind(
name = "grpc++_codegen_proto",
actual = "@com_github_grpc_grpc//:grpc++_codegen_proto",
)
native.bind(
name = "opencensus-context",
actual = "@io_opencensus_cpp//opencensus/context:context",
)
native.bind(
name = "opencensus-trace",
actual = "@io_opencensus_cpp//opencensus/trace:trace",
)
native.bind(
name = "opencensus-trace-context_util",
actual = "@io_opencensus_cpp//opencensus/trace:context_util",
)
native.bind(
name = "opencensus-trace-propagation",
actual = "@io_opencensus_cpp//opencensus/trace:grpc_trace_bin",
)
native.bind(
name = "opencensus-trace-span_context",
actual = "@io_opencensus_cpp//opencensus/trace:span_context",
)
native.bind(
name = "opencensus-stats",
actual = "@io_opencensus_cpp//opencensus/stats:stats",
)
native.bind(
name = "opencensus-stats-test",
actual = "@io_opencensus_cpp//opencensus/stats:test_utils",
)
native.bind(
name = "opencensus-with-tag-map",
actual = "@io_opencensus_cpp//opencensus/tags:with_tag_map",
)
native.bind(
name = "opencensus-tags",
actual = "@io_opencensus_cpp//opencensus/tags:tags",
)
native.bind(
name = "opencensus-tags-context_util",
actual = "@io_opencensus_cpp//opencensus/tags:context_util",
)
native.bind(
name = "opencensus-trace-stackdriver_exporter",
actual = "@io_opencensus_cpp//opencensus/exporters/trace/stackdriver:stackdriver_exporter",
)
native.bind(
name = "opencensus-stats-stackdriver_exporter",
actual = "@io_opencensus_cpp//opencensus/exporters/stats/stackdriver:stackdriver_exporter",
)
native.bind(
name = "libuv",
actual = "@com_github_libuv_libuv//:libuv",
)
native.bind(
name = "libuv_test",
actual = "@com_github_libuv_libuv//:libuv_test",
)
native.bind(
name = "googleapis_trace_grpc_service",
actual = "@com_google_googleapis//google/devtools/cloudtrace/v2:cloudtrace_cc_grpc",
)
native.bind(
name = "googleapis_monitoring_grpc_service",
actual = "@com_google_googleapis//google/monitoring/v3:monitoring_cc_grpc",
)
native.bind(
name = "googleapis_logging_grpc_service",
actual = "@com_google_googleapis//google/logging/v2:logging_cc_grpc",
)
native.bind(
name = "googleapis_logging_cc_proto",
actual = "@com_google_googleapis//google/logging/v2:logging_cc_proto",
)
if "boringssl" not in native.existing_rules():
http_archive(
name = "boringssl",
# Use github mirror instead of https://boringssl.googlesource.com/boringssl
# to obtain a boringssl archive with consistent sha256
sha256 = "9f441d72fccb9a3faf96470478c8ccfaaeb8db1cffd4d78b698f782124dad1b0",
strip_prefix = "boringssl-b8a2bffc598f230484ff48a247526a9820facfc2",
sha256 = "f150aa2d73017fe8576a8a335f29030488d851c94368a79ac56142d107bf9e9a",
strip_prefix = "boringssl-e46383fc18d08def901b2ed5a194295693e905c7",
urls = [
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/google/boringssl/archive/b8a2bffc598f230484ff48a247526a9820facfc2.tar.gz",
"https://github.com/google/boringssl/archive/b8a2bffc598f230484ff48a247526a9820facfc2.tar.gz",
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/google/boringssl/archive/e46383fc18d08def901b2ed5a194295693e905c7.tar.gz",
"https://github.com/google/boringssl/archive/e46383fc18d08def901b2ed5a194295693e905c7.tar.gz",
],
)
@ -47,27 +242,26 @@ def grpc_deps():
http_archive(
name = "zlib",
build_file = "@com_github_grpc_grpc//third_party:zlib.BUILD",
sha256 = "18337cdb32562003c39d9f7322b9a166ad4abfb2b909566428e11f96d2385586",
strip_prefix = "zlib-09155eaa2f9270dc4ed1fa13e2b4b2613e6e4851",
sha256 = "90f43a9c998740e8a0db24b0af0147033db2aaaa99423129abbd76640757cac9",
strip_prefix = "zlib-04f42ceca40f73e2978b50e93806c2a18c1281fc",
urls = [
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/madler/zlib/archive/09155eaa2f9270dc4ed1fa13e2b4b2613e6e4851.tar.gz",
"https://github.com/madler/zlib/archive/09155eaa2f9270dc4ed1fa13e2b4b2613e6e4851.tar.gz",
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/madler/zlib/archive/04f42ceca40f73e2978b50e93806c2a18c1281fc.tar.gz",
"https://github.com/madler/zlib/archive/04f42ceca40f73e2978b50e93806c2a18c1281fc.tar.gz",
],
)
if "com_google_protobuf" not in native.existing_rules():
http_archive(
name = "com_google_protobuf",
sha256 = "387478260190c540388839a3449c635a69708d92fc38ea6e2364b1196db90ea5",
strip_prefix = "protobuf-2434ef2adf0c74149b9d547ac5fb545a1ff8b6b5",
sha256 = "209385d3c08252e320196b628584c8007f849f9ec8a26c2796a886345ee58bb6",
strip_prefix = "protobuf-2dca62f7296e5b49d729f7384f975cecb38382a0",
urls = [
# https://github.com/protocolbuffers/protobuf/commits/v26.1
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/protocolbuffers/protobuf/archive/2434ef2adf0c74149b9d547ac5fb545a1ff8b6b5.tar.gz",
"https://github.com/protocolbuffers/protobuf/archive/2434ef2adf0c74149b9d547ac5fb545a1ff8b6b5.tar.gz",
# https://github.com/protocolbuffers/protobuf/commits/v23.1
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/protocolbuffers/protobuf/archive/2dca62f7296e5b49d729f7384f975cecb38382a0.tar.gz",
"https://github.com/protocolbuffers/protobuf/archive/2dca62f7296e5b49d729f7384f975cecb38382a0.tar.gz",
],
patches = [
"@com_github_grpc_grpc//third_party:protobuf.patch",
"@com_github_grpc_grpc//third_party:protobuf.10007.patch",
],
patch_args = ["-p1"],
)
@ -75,11 +269,11 @@ def grpc_deps():
if "com_google_googletest" not in native.existing_rules():
http_archive(
name = "com_google_googletest",
sha256 = "31bf78bd91b96dd5e24fab3bb1d7f3f7453ccbaceec9afb86d6e4816a15ab109",
strip_prefix = "googletest-2dd1c131950043a8ad5ab0d2dda0e0970596586a",
sha256 = "c8de6c60e12ad014a28225c5247ee735861d85cf906df617f6a29954ca05f547",
strip_prefix = "googletest-0e402173c97aea7a00749e825b194bfede4f2e45",
urls = [
# 2023-10-09
"https://github.com/google/googletest/archive/2dd1c131950043a8ad5ab0d2dda0e0970596586a.tar.gz",
# 2022-02-09
"https://github.com/google/googletest/archive/0e402173c97aea7a00749e825b194bfede4f2e45.tar.gz",
],
)
@ -99,22 +293,22 @@ def grpc_deps():
if "rules_cc" not in native.existing_rules():
http_archive(
name = "rules_cc",
sha256 = "2037875b9a4456dce4a79d112a8ae885bbc4aad968e6587dca6e64f3a0900cdf",
strip_prefix = "rules_cc-0.0.9",
sha256 = "3d9e271e2876ba42e114c9b9bc51454e379cbf0ec9ef9d40e2ae4cec61a31b40",
strip_prefix = "rules_cc-0.0.6",
urls = [
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/bazelbuild/rules_cc/releases/download/0.0.9/rules_cc-0.0.9.tar.gz",
"https://github.com/bazelbuild/rules_cc/releases/download/0.0.9/rules_cc-0.0.9.tar.gz",
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/bazelbuild/rules_cc/releases/download/0.0.6/rules_cc-0.0.6.tar.gz",
"https://github.com/bazelbuild/rules_cc/releases/download/0.0.6/rules_cc-0.0.6.tar.gz",
],
)
if "com_github_google_benchmark" not in native.existing_rules():
http_archive(
name = "com_github_google_benchmark",
sha256 = "8e7b955f04bc6984e4f14074d0d191474f76a6c8e849e04a9dced49bc975f2d4",
strip_prefix = "benchmark-344117638c8ff7e239044fd0fa7085839fc03021",
sha256 = "3a43368d3ec48afe784573cf962fe98c084e89a1e3d176c00715a84366316e7d",
strip_prefix = "benchmark-361e8d1cfe0c6c36d30b39f1b61302ece5507320",
urls = [
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/google/benchmark/archive/344117638c8ff7e239044fd0fa7085839fc03021.tar.gz",
"https://github.com/google/benchmark/archive/344117638c8ff7e239044fd0fa7085839fc03021.tar.gz",
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/google/benchmark/archive/361e8d1cfe0c6c36d30b39f1b61302ece5507320.tar.gz",
"https://github.com/google/benchmark/archive/361e8d1cfe0c6c36d30b39f1b61302ece5507320.tar.gz",
],
)
@ -144,11 +338,11 @@ def grpc_deps():
if "com_google_absl" not in native.existing_rules():
http_archive(
name = "com_google_absl",
sha256 = "338420448b140f0dfd1a1ea3c3ce71b3bc172071f24f4d9a57d59b45037da440",
strip_prefix = "abseil-cpp-20240116.0",
sha256 = "5366d7e7fa7ba0d915014d387b66d0d002c03236448e1ba9ef98122c13b35c36",
strip_prefix = "abseil-cpp-20230125.3",
urls = [
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/abseil/abseil-cpp/archive/20240116.0.tar.gz",
"https://github.com/abseil/abseil-cpp/archive/20240116.0.tar.gz",
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/abseil/abseil-cpp/archive/20230125.3.tar.gz",
"https://github.com/abseil/abseil-cpp/archive/20230125.3.tar.gz",
],
)
@ -168,10 +362,10 @@ def grpc_deps():
http_archive(
name = "bazel_skylib",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.2/bazel-skylib-1.0.2.tar.gz",
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.2/bazel-skylib-1.0.2.tar.gz",
],
sha256 = "1c531376ac7e5a180e0237938a2536de0c54d93f5c278634818e0efc952dd56c",
sha256 = "97e70364e9249702246c0e9444bccdc4b847bed1eb03c5a3ece4f83dfe6abc44",
)
if "bazel_compdb" not in native.existing_rules():
@ -196,14 +390,26 @@ def grpc_deps():
],
)
if "upb" not in native.existing_rules():
http_archive(
name = "upb",
sha256 = "7d19f2ac9c1e508a86a272913d9aa67c8147827f949035828910bb05d9f2cf03",
strip_prefix = "upb-61a97efa24a5ce01fb8cc73c9d1e6e7060f8ea98",
urls = [
# https://github.com/protocolbuffers/upb/commits/23.x
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/protocolbuffers/upb/archive/61a97efa24a5ce01fb8cc73c9d1e6e7060f8ea98.tar.gz",
"https://github.com/protocolbuffers/upb/archive/61a97efa24a5ce01fb8cc73c9d1e6e7060f8ea98.tar.gz",
],
)
if "envoy_api" not in native.existing_rules():
http_archive(
name = "envoy_api",
sha256 = "ddd3beedda1178a79e0d988f76f362002aced09749452515853f106e22bd2249",
strip_prefix = "data-plane-api-78f198cf96ecdc7120ef640406770aa01af775c4",
sha256 = "3c7372b5cb33e5e5cc3afd82573fc6275f9a2cac8b1530e1af14f52f34047328",
strip_prefix = "data-plane-api-68d4315167352ffac71f149a43b8088397d3f33d",
urls = [
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/envoyproxy/data-plane-api/archive/78f198cf96ecdc7120ef640406770aa01af775c4.tar.gz",
"https://github.com/envoyproxy/data-plane-api/archive/78f198cf96ecdc7120ef640406770aa01af775c4.tar.gz",
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/envoyproxy/data-plane-api/archive/68d4315167352ffac71f149a43b8088397d3f33d.tar.gz",
"https://github.com/envoyproxy/data-plane-api/archive/68d4315167352ffac71f149a43b8088397d3f33d.tar.gz",
],
)
@ -220,20 +426,32 @@ def grpc_deps():
if "build_bazel_rules_apple" not in native.existing_rules():
http_archive(
name = "build_bazel_rules_apple",
sha256 = "34c41bfb59cdaea29ac2df5a2fa79e5add609c71bb303b2ebb10985f93fa20e7",
sha256 = "f94e6dddf74739ef5cb30f000e13a2a613f6ebfa5e63588305a71fce8a8a9911",
urls = [
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/bazelbuild/rules_apple/releases/download/3.1.1/rules_apple.3.1.1.tar.gz",
"https://github.com/bazelbuild/rules_apple/releases/download/3.1.1/rules_apple.3.1.1.tar.gz",
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/bazelbuild/rules_apple/releases/download/1.1.3/rules_apple.1.1.3.tar.gz",
"https://github.com/bazelbuild/rules_apple/releases/download/1.1.3/rules_apple.1.1.3.tar.gz",
],
)
if "build_bazel_apple_support" not in native.existing_rules():
http_archive(
name = "build_bazel_apple_support",
sha256 = "cf4d63f39c7ba9059f70e995bf5fe1019267d3f77379c2028561a5d7645ef67c",
sha256 = "f4fdf5c9b42b92ea12f229b265d74bb8cedb8208ca7a445b383c9f866cf53392",
urls = [
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/bazelbuild/apple_support/releases/download/1.11.1/apple_support.1.11.1.tar.gz",
"https://github.com/bazelbuild/apple_support/releases/download/1.11.1/apple_support.1.11.1.tar.gz",
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/bazelbuild/apple_support/releases/download/1.3.1/apple_support.1.3.1.tar.gz",
"https://github.com/bazelbuild/apple_support/releases/download/1.3.1/apple_support.1.3.1.tar.gz",
],
)
if "com_github_libuv_libuv" not in native.existing_rules():
http_archive(
name = "com_github_libuv_libuv",
build_file = "@com_github_grpc_grpc//third_party:libuv.BUILD",
sha256 = "5ca4e9091f3231d8ad8801862dc4e851c23af89c69141d27723157776f7291e7",
strip_prefix = "libuv-02a9e1be252b623ee032a3137c0b0c94afbe6809",
urls = [
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/libuv/libuv/archive/02a9e1be252b623ee032a3137c0b0c94afbe6809.tar.gz",
"https://github.com/libuv/libuv/archive/02a9e1be252b623ee032a3137c0b0c94afbe6809.tar.gz",
],
)
@ -242,7 +460,6 @@ def grpc_deps():
name = "com_google_googleapis",
sha256 = "5bb6b0253ccf64b53d6c7249625a7e3f6c3bc6402abd52d3778bfa48258703a0",
strip_prefix = "googleapis-2f9af297c84c55c8b871ba4495e01ade42476c92",
build_file = Label("//bazel:googleapis.BUILD"),
urls = [
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/googleapis/googleapis/archive/2f9af297c84c55c8b871ba4495e01ade42476c92.tar.gz",
"https://github.com/googleapis/googleapis/archive/2f9af297c84c55c8b871ba4495e01ade42476c92.tar.gz",
@ -252,10 +469,10 @@ def grpc_deps():
if "bazel_gazelle" not in native.existing_rules():
http_archive(
name = "bazel_gazelle",
sha256 = "d76bf7a60fd8b050444090dfa2837a4eaf9829e1165618ee35dceca5cbdf58d5",
sha256 = "de69a09dc70417580aabf20a28619bb3ef60d038470c7cf8442fafcf627c21cb",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.37.0/bazel-gazelle-v0.37.0.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.37.0/bazel-gazelle-v0.37.0.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.24.0/bazel-gazelle-v0.24.0.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.24.0/bazel-gazelle-v0.24.0.tar.gz",
],
)
@ -282,53 +499,14 @@ def grpc_deps():
patch_args = ["-p1"],
)
if "com_github_cncf_xds" not in native.existing_rules():
if "com_github_cncf_udpa" not in native.existing_rules():
http_archive(
name = "com_github_cncf_xds",
sha256 = "dc305e20c9fa80822322271b50aa2ffa917bf4fd3973bcec52bfc28dc32c5927",
strip_prefix = "xds-3a472e524827f72d1ad621c4983dd5af54c46776",
name = "com_github_cncf_udpa",
sha256 = "0d33b83f8c6368954e72e7785539f0d272a8aba2f6e2e336ed15fd1514bc9899",
strip_prefix = "xds-e9ce68804cb4e64cab5a52e3c8baf840d4ff87b7",
urls = [
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/cncf/xds/archive/3a472e524827f72d1ad621c4983dd5af54c46776.tar.gz",
"https://github.com/cncf/xds/archive/3a472e524827f72d1ad621c4983dd5af54c46776.tar.gz",
],
)
# TODO(stanleycheung): remove this when prometheus-cpp AND
# opentelemetry-cpp cut a new release
# This override is needed because this fix
# https://github.com/jupp0r/prometheus-cpp/pull/626
# has not been included in the latest prometheus-cpp release yet.
# We also need opentelemetry-cpp to update their dependency on
# prometheus-cpp after that fix is released.
# Without the fix, we cannot build the prometheus exporter with bazel 6
if "com_github_jupp0r_prometheus_cpp" not in native.existing_rules():
http_archive(
name = "com_github_jupp0r_prometheus_cpp",
strip_prefix = "prometheus-cpp-b1234816facfdda29845c46696a02998a4af115a",
urls = [
"https://github.com/jupp0r/prometheus-cpp/archive/b123481.zip",
],
)
if "io_opentelemetry_cpp" not in native.existing_rules():
http_archive(
name = "io_opentelemetry_cpp",
sha256 = "ed681d20a684b7d485a49288e7cfb2d182bf882e5c112c5f2fa3f9e9da2278fc",
strip_prefix = "opentelemetry-cpp-4bd64c9a336fd438d6c4c9dad2e6b61b0585311f",
urls = [
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/open-telemetry/opentelemetry-cpp/archive/4bd64c9a336fd438d6c4c9dad2e6b61b0585311f.tar.gz",
"https://github.com/open-telemetry/opentelemetry-cpp/archive/4bd64c9a336fd438d6c4c9dad2e6b61b0585311f.tar.gz",
],
)
if "google_cloud_cpp" not in native.existing_rules():
http_archive(
name = "google_cloud_cpp",
sha256 = "7ca7f583b60d2aa1274411fed3b9fb3887119b2e84244bb3fc69ea1db819e4e5",
strip_prefix = "google-cloud-cpp-2.16.0",
urls = [
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/googleapis/google-cloud-cpp/archive/refs/tags/v2.16.0.tar.gz",
"https://github.com/googleapis/google-cloud-cpp/archive/refs/tags/v2.16.0.tar.gz",
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/cncf/xds/archive/e9ce68804cb4e64cab5a52e3c8baf840d4ff87b7.tar.gz",
"https://github.com/cncf/xds/archive/e9ce68804cb4e64cab5a52e3c8baf840d4ff87b7.tar.gz",
],
)
@ -341,6 +519,15 @@ def grpc_test_only_deps():
Loads dependencies that are only needed to run grpc library's tests.
"""
native.bind(
name = "twisted",
actual = "@com_github_twisted_twisted//:twisted",
)
native.bind(
name = "yaml",
actual = "@com_github_yaml_pyyaml//:yaml",
)
if "com_github_twisted_twisted" not in native.existing_rules():
http_archive(
@ -357,11 +544,11 @@ def grpc_test_only_deps():
if "com_github_yaml_pyyaml" not in native.existing_rules():
http_archive(
name = "com_github_yaml_pyyaml",
sha256 = "e34d97db6d846f5e2ad51417fd646e7ce6a3a70726ccea2a857e0580a7155f39",
strip_prefix = "pyyaml-6.0.1",
sha256 = "6b4314b1b2051ddb9d4fcd1634e1fa9c1bb4012954273c9ff3ef689f6ec6c93e",
strip_prefix = "pyyaml-3.12",
urls = [
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/yaml/pyyaml/archive/6.0.1.zip",
"https://github.com/yaml/pyyaml/archive/6.0.1.zip",
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/yaml/pyyaml/archive/3.12.zip",
"https://github.com/yaml/pyyaml/archive/3.12.zip",
],
build_file = "@com_github_grpc_grpc//third_party:yaml.BUILD",
)
@ -405,11 +592,11 @@ def grpc_test_only_deps():
if "com_google_libprotobuf_mutator" not in native.existing_rules():
http_archive(
name = "com_google_libprotobuf_mutator",
sha256 = "9c8f800aed088cdf89adc3eaaa66b56b4da7da041f26338aa71a2ab43d860d46",
sha256 = "11ab4c57b4051977d8fedb86dba5c9092e578bc293c47be146e0b0596b6a0bdc",
urls = [
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/google/libprotobuf-mutator/archive/1f95f8083066f5b38fd2db172e7e7f9aa7c49d2d.tar.gz",
"https://github.com/google/libprotobuf-mutator/archive/1f95f8083066f5b38fd2db172e7e7f9aa7c49d2d.tar.gz",
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/google/libprotobuf-mutator/archive/c390388561be36f94a559a4aed7e2fe60470f60b.tar.gz",
"https://github.com/google/libprotobuf-mutator/archive/c390388561be36f94a559a4aed7e2fe60470f60b.tar.gz",
],
strip_prefix = "libprotobuf-mutator-1f95f8083066f5b38fd2db172e7e7f9aa7c49d2d",
strip_prefix = "libprotobuf-mutator-c390388561be36f94a559a4aed7e2fe60470f60b",
build_file = "@com_github_grpc_grpc//third_party:libprotobuf_mutator.BUILD",
)

View File

@ -20,9 +20,8 @@ load("@com_envoyproxy_protoc_gen_validate//:dependencies.bzl", "go_third_party")
load("@com_google_googleapis//:repository_rules.bzl", "switched_rules_by_language")
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
load("@envoy_api//bazel:repositories.bzl", "api_dependencies")
load("@google_cloud_cpp//bazel:google_cloud_cpp_deps.bzl", "google_cloud_cpp_deps")
load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")
load("@rules_python//python:repositories.bzl", "py_repositories")
load("@upb//bazel:workspace_deps.bzl", "upb_deps")
def grpc_extra_deps(ignore_version_differences = False):
"""Loads the extra dependencies.
@ -49,10 +48,12 @@ def grpc_extra_deps(ignore_version_differences = False):
"""
protobuf_deps()
upb_deps()
api_dependencies()
go_rules_dependencies()
go_register_toolchains(version = "1.20")
go_register_toolchains(version = "1.18")
gazelle_dependencies()
# Pull-in the go 3rd party dependencies for protoc_gen_validate, which is
@ -70,7 +71,3 @@ def grpc_extra_deps(ignore_version_differences = False):
grpc = True,
python = True,
)
google_cloud_cpp_deps()
py_repositories()

View File

@ -19,12 +19,13 @@ load("@com_github_grpc_grpc//third_party/py:python_configure.bzl", "python_confi
# buildifier: disable=unnamed-macro
def grpc_python_deps():
"""Loads dependencies for gRPC Python."""
if "rules_python" not in native.existing_rules():
if "io_bazel_rules_python" not in native.existing_rules():
http_archive(
name = "rules_python",
sha256 = "9d04041ac92a0985e344235f5d946f71ac543f1b1565f2cdbc9a2aaee8adf55b",
strip_prefix = "rules_python-0.26.0",
url = "https://github.com/bazelbuild/rules_python/releases/download/0.26.0/rules_python-0.26.0.tar.gz",
name = "io_bazel_rules_python",
url = "https://github.com/bazelbuild/rules_python/releases/download/0.4.0/rules_python-0.4.0.tar.gz",
sha256 = "954aa89b491be4a083304a2cb838019c8b8c3720a7abb9c4cb81ac7a24230cea",
patches = ["@com_github_grpc_grpc//third_party:rules_python.patch"],
patch_args = ["-p1"],
)
python_configure(name = "local_config_python")

View File

@ -1,37 +0,0 @@
# Copyright 2024 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
platform(
name = "x86_64",
constraint_values = [
"@platforms//os:android",
"@platforms//cpu:x86_64",
],
)
platform(
name = "arm64-v8a",
constraint_values = [
"@platforms//os:android",
"@platforms//cpu:arm64",
],
)
platform(
name = "armeabi-v7a",
constraint_values = [
"@platforms//os:android",
"@platforms//cpu:armv7",
],
)

View File

@ -28,7 +28,6 @@ load(
)
_GENERATED_PROTO_FORMAT = "{}_pb2.py"
_GENERATED_PROTO_STUB_FORMAT = "{}_pb2.pyi"
_GENERATED_GRPC_PROTO_FORMAT = "{}_pb2_grpc.py"
PyProtoInfo = provider(
@ -60,8 +59,7 @@ def _gen_py_aspect_impl(target, context):
protos.append(get_staged_proto_file(target.label, context, p))
includes = depset(direct = protos, transitive = [target[ProtoInfo].transitive_imports])
out_files = (declare_out_files(protos, context, _GENERATED_PROTO_FORMAT) +
declare_out_files(protos, context, _GENERATED_PROTO_STUB_FORMAT))
out_files = declare_out_files(protos, context, _GENERATED_PROTO_FORMAT)
generated_py_srcs = out_files
tools = [context.executable._protoc]
@ -70,7 +68,6 @@ def _gen_py_aspect_impl(target, context):
arguments = ([
"--python_out={}".format(out_dir.path),
"--pyi_out={}".format(out_dir.path),
] + [
"--proto_path={}".format(get_include_directory(i))
for i in includes.to_list()
@ -110,10 +107,10 @@ _gen_py_aspect = aspect(
fragments = ["py"],
attrs = {
"_protoc": attr.label(
default = Label("@com_google_protobuf//:protoc"),
default = Label("//external:protocol_compiler"),
providers = ["files_to_run"],
executable = True,
cfg = "exec",
cfg = "host",
),
"_protobuf_library": attr.label(
default = Label("@com_google_protobuf//:protobuf_python"),
@ -140,7 +137,7 @@ def _generate_py_impl(context):
for py_src in context.attr.deps[0][PyProtoInfo].generated_py_srcs:
reimport_py_file = context.actions.declare_file(py_src.basename)
py_sources.append(reimport_py_file)
import_line = "from %s import *" % py_src.short_path.replace("..", "external").replace("/", ".")[:-len(".py")]
import_line = "from %s import *" % py_src.short_path.replace("/", ".")[:-len(".py")]
context.actions.write(reimport_py_file, import_line)
# Collect output PyInfo provider.
@ -166,10 +163,10 @@ py_proto_library = rule(
aspects = [_gen_py_aspect],
),
"_protoc": attr.label(
default = Label("@com_google_protobuf//:protoc"),
default = Label("//external:protocol_compiler"),
providers = ["files_to_run"],
executable = True,
cfg = "exec",
cfg = "host",
),
"_protobuf_library": attr.label(
default = Label("@com_google_protobuf//:protobuf_python"),
@ -190,15 +187,10 @@ def _generate_pb2_grpc_src_impl(context):
arguments = []
tools = [context.executable._protoc, context.executable._grpc_plugin]
out_dir = get_out_dir(protos, context)
if out_dir.import_path:
# is virtual imports
out_path = out_dir.path
else:
out_path = context.genfiles_dir.path
arguments += get_plugin_args(
context.executable._grpc_plugin,
plugin_flags,
out_path,
out_dir.path,
False,
)
@ -222,11 +214,11 @@ def _generate_pb2_grpc_src_impl(context):
py_info = _merge_pyinfos(
[
p,
context.attr.grpc_library[PyInfo],
context.attr._grpc_library[PyInfo],
] + [dep[PyInfo] for dep in context.attr.py_deps],
)
runfiles = context.runfiles(files = out_files, transitive_files = py_info.transitive_sources).merge(context.attr.grpc_library[DefaultInfo].data_runfiles)
runfiles = context.runfiles(files = out_files, transitive_files = py_info.transitive_sources).merge(context.attr._grpc_library[DefaultInfo].data_runfiles)
return [
DefaultInfo(
@ -252,16 +244,16 @@ _generate_pb2_grpc_src = rule(
"_grpc_plugin": attr.label(
executable = True,
providers = ["files_to_run"],
cfg = "exec",
cfg = "host",
default = Label("//src/compiler:grpc_python_plugin"),
),
"_protoc": attr.label(
executable = True,
providers = ["files_to_run"],
cfg = "exec",
default = Label("@com_google_protobuf//:protoc"),
cfg = "host",
default = Label("//external:protocol_compiler"),
),
"grpc_library": attr.label(
"_grpc_library": attr.label(
default = Label("//src/python/grpcio/grpc:grpcio"),
providers = [PyInfo],
),
@ -274,7 +266,6 @@ def py_grpc_library(
srcs,
deps,
strip_prefixes = [],
grpc_library = Label("//src/python/grpcio/grpc:grpcio"),
**kwargs):
"""Generate python code for gRPC services defined in a protobuf.
@ -288,9 +279,6 @@ def py_grpc_library(
stripped from the beginning of foo_pb2 modules imported by the
generated stubs. This is useful in combination with the `imports`
attribute of the `py_library` rule.
grpc_library: (`label`) a single `py_library` target representing the
python gRPC library target to be depended upon. This can be used to
generate code that depends on `grpcio` from the Python Package Index.
**kwargs: Additional arguments to be supplied to the invocation of
py_library.
"""
@ -305,6 +293,5 @@ def py_grpc_library(
deps = srcs,
py_deps = deps,
strip_prefixes = strip_prefixes,
grpc_library = grpc_library,
**kwargs
)

View File

@ -1,2 +1,2 @@
7.1.0
6.5.0
6.1.2
5.4.1

View File

@ -1,60 +0,0 @@
# Copyright 2023 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Auto generated by tools/codegen/core/gen_experiments.py
"""Dictionary of tags to experiments so we know when to test different experiments."""
TEST_EXPERIMENT_ENABLES = {
"test_experiment_1": "test_experiment_1",
"test_experiment_2": "test_experiment_2",
"test_experiment_3": "test_experiment_3",
"test_experiment_4": "test_experiment_4",
}
TEST_EXPERIMENT_POLLERS = [
]
TEST_EXPERIMENTS = {
"windows": {
"dbg": {
},
"off": {
"experiments_tag_test": [
"test_experiment_1",
],
},
"on": {
},
},
"ios": {
"dbg": {
},
"off": {
},
"on": {
},
},
"posix": {
"dbg": {
},
"off": {
},
"on": {
"experiments_tag_test": [
"test_experiment_1",
],
},
},
}

View File

@ -57,12 +57,13 @@ function upload {
# upload "github.com/google/boringssl/archive/1c2769383f027befac5b75b6cedd25daf3bf4dcf.tar.gz"
# bazel binaries used by the tools/bazel wrapper script
upload github.com/bazelbuild/bazel/releases/download/6.5.0/bazel-6.5.0-linux-x86_64
upload github.com/bazelbuild/bazel/releases/download/6.5.0/bazel-6.5.0-darwin-x86_64
upload github.com/bazelbuild/bazel/releases/download/6.5.0/bazel-6.5.0-windows-x86_64.exe
upload github.com/bazelbuild/bazel/releases/download/7.1.0/bazel-7.1.0-linux-x86_64
upload github.com/bazelbuild/bazel/releases/download/7.1.0/bazel-7.1.0-darwin-x86_64
upload github.com/bazelbuild/bazel/releases/download/7.1.0/bazel-7.1.0-windows-x86_64.exe
upload github.com/bazelbuild/bazel/releases/download/5.4.1/bazel-5.4.1-linux-x86_64
upload github.com/bazelbuild/bazel/releases/download/5.4.1/bazel-5.4.1-darwin-x86_64
upload github.com/bazelbuild/bazel/releases/download/5.4.1/bazel-5.4.1-windows-x86_64.exe
upload github.com/bazelbuild/bazel/releases/download/6.1.2/bazel-6.1.2-linux-x86_64
upload github.com/bazelbuild/bazel/releases/download/6.1.2/bazel-6.1.2-darwin-x86_64
upload github.com/bazelbuild/bazel/releases/download/6.1.2/bazel-6.1.2-windows-x86_64.exe
# Collect the github archives to mirror from grpc_deps.bzl
grep -o '"https://github.com/[^"]*"' bazel/grpc_deps.bzl | sed 's/^"https:\/\///' | sed 's/"$//' | while read -r line ; do

View File

@ -1,55 +0,0 @@
[tool.black]
line-length = 80
target-version = [
"py37",
"py38",
"py39",
"py310",
"py311",
]
extend-exclude = '''
# A regex preceded with ^/ will apply only to files and directories
# in the root of the project.
(
site-packages
| test/cpp/naming/resolver_component_tests_runner.py # AUTO-GENERATED
# AUTO-GENERATED from a template:
| grpc_version.py
| src/python/grpcio/grpc_core_dependencies.py
| src/python/grpcio/grpc/_grpcio_metadata.py
# AUTO-GENERATED BY make_grpcio_tools.py
| tools/distrib/python/grpcio_tools/protoc_lib_deps.py
# AUTO-GENERATED BY make_grpcio_observability.py
| src/python/grpcio_observability/observability_lib_deps.py
| .*_pb2.py # autogenerated Protocol Buffer files
| .*_pb2_grpc.py # autogenerated Protocol Buffer gRPC files
# AUTO-GENERATED By tools/distrib/python/xds_protos/build.py
| tools/distrib/python/xds_protos/.*
)
'''
[tool.isort]
profile = "black"
line_length = 80
src_paths = [
"examples/python/data_transmission",
"examples/python/async_streaming",
"src/python/grpcio_tests",
"tools/run_tests",
]
known_first_party = [
"examples",
"src",
]
known_third_party = ["grpc"]
skip_glob = [
"*/third_party/*",
"*/env/*",
"*pb2*.py",
"*pb2*.pyi",
"**/site-packages/**/*",
"tools/distrib/python/xds_protos/*",
]
single_line_exclusions = ["typing"]
force_single_line = true
force_sort_within_sections = true

19898
build_autogenerated.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -13,5 +13,5 @@
# limitations under the License.
module GrpcBuildConfig
CORE_WINDOWS_DLL = '/tmp/libs/opt/grpc-42.dll'
CORE_WINDOWS_DLL = '/tmp/libs/opt/grpc-33.dll'
end

View File

@ -12,11 +12,11 @@ settings:
'#08': Use "-preN" suffixes to identify pre-release versions
'#09': Per-language overrides are possible with (eg) ruby_version tag here
'#10': See the expand_version.py for all the quirks here
core_version: 42.0.0
core_version: 33.0.0
csharp_major_version: 2
g_stands_for: gnarly
protobuf_version: 3.26.1
version: 1.65.0-dev
g_stands_for: galvanized
protobuf_version: 3.23.1
version: 1.56.4
configs:
asan:
CC: clang
@ -29,7 +29,7 @@ configs:
compile_the_world: true
test_environ:
ASAN_OPTIONS: detect_leaks=1:color=always
LSAN_OPTIONS: suppressions=test/core/test_util/lsan_suppressions.txt:report_objects=1
LSAN_OPTIONS: suppressions=test/core/util/lsan_suppressions.txt:report_objects=1
asan-noleaks:
CC: clang
CPPFLAGS: -O0 -fsanitize-coverage=edge,trace-pc-guard -fsanitize=address -fno-omit-frame-pointer
@ -53,7 +53,7 @@ configs:
compile_the_world: true
test_environ:
ASAN_OPTIONS: detect_leaks=1:color=always
LSAN_OPTIONS: suppressions=test/core/test_util/lsan_suppressions.txt:report_objects=1
LSAN_OPTIONS: suppressions=test/core/util/lsan_suppressions.txt:report_objects=1
c++-compat:
CFLAGS: -Wc++-compat
CPPFLAGS: -O0
@ -115,7 +115,7 @@ configs:
LDXX: clang++
compile_the_world: true
test_environ:
TSAN_OPTIONS: suppressions=test/core/test_util/tsan_suppressions.txt:halt_on_error=1:second_deadlock_stack=1
TSAN_OPTIONS: suppressions=test/core/util/tsan_suppressions.txt:halt_on_error=1:second_deadlock_stack=1
ubsan:
CC: clang
CPPFLAGS: -O0 -stdlib=libc++ -fsanitize-coverage=edge,trace-pc-guard -fsanitize=undefined
@ -127,27 +127,30 @@ configs:
LDXX: clang++
compile_the_world: true
test_environ:
UBSAN_OPTIONS: halt_on_error=1:print_stacktrace=1:suppressions=test/core/test_util/ubsan_suppressions.txt
UBSAN_OPTIONS: halt_on_error=1:print_stacktrace=1:suppressions=test/core/util/ubsan_suppressions.txt
defaults:
boringssl:
CFLAGS: -g
CPPFLAGS: -Ithird_party/boringssl-with-bazel/src/include -fvisibility=hidden -DOPENSSL_NO_ASM
-D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX
CXXFLAGS: -fno-exceptions
cares:
abseil:
CPPFLAGS: -g -Ithird_party/abseil-cpp
ares:
CFLAGS: -g
CPPFLAGS: -Ithird_party/cares/cares/include -Ithird_party/cares -Ithird_party/cares/cares
-fvisibility=hidden -D_GNU_SOURCE $(if $(subst Darwin,,$(SYSTEM)),,-Ithird_party/cares/config_darwin)
$(if $(subst FreeBSD,,$(SYSTEM)),,-Ithird_party/cares/config_freebsd) $(if $(subst
Linux,,$(SYSTEM)),,-Ithird_party/cares/config_linux) $(if $(subst OpenBSD,,$(SYSTEM)),,-Ithird_party/cares/config_openbsd)
-DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX $(if $(subst MINGW32,,$(SYSTEM)),-DHAVE_CONFIG_H,)
benchmark:
CPPFLAGS: -Ithird_party/benchmark/include -DHAVE_POSIX_REGEX
boringssl:
CFLAGS: -g
CPPFLAGS: -Ithird_party/boringssl-with-bazel/src/include -fvisibility=hidden -DOPENSSL_NO_ASM
-D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX
CXXFLAGS: -fno-exceptions
global:
CFLAGS: -g
COREFLAGS: -fno-exceptions
CPPFLAGS: -g -Wall -Wextra -DOSATOMIC_USE_INLINED=1 -Ithird_party/abseil-cpp -Ithird_party/re2
-Ithird_party/upb -Isrc/core/ext/upb-gen -Isrc/core/ext/upbdefs-gen -Ithird_party/utf8_range
-Ithird_party/xxhash -Ithird_party/cares/cares/include -Ithird_party/cares -Ithird_party/cares/cares
-Ithird_party/address_sorting/include
-Ithird_party/upb -Isrc/core/ext/upb-generated -Isrc/core/ext/upbdefs-generated
-Ithird_party/utf8_range -Ithird_party/xxhash
LDFLAGS: -g
zlib:
CFLAGS: -fvisibility=hidden
@ -187,7 +190,7 @@ python_dependencies:
deps:
- grpc
- address_sorting
- cares
- ares
- boringssl
- re2
- z
@ -195,22 +198,7 @@ ruby_gem:
deps:
- grpc
- address_sorting
- cares
- ares
- boringssl
- re2
- z
swift_boringssl_package:
deps:
- boringssl
swift_package:
deps:
- grpc
- grpc_authorization_provider
- gpr
- upb_base_lib
- upb_mem_lib
- upb_message_lib
- upb_json_lib
- upb_textformat_lib
- utf8_range_lib
- re2

3
cmake/OWNERS Normal file
View File

@ -0,0 +1,3 @@
set noparent
@jtattermusch
@apolcyn

View File

@ -8,7 +8,6 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/modules)
@_gRPC_FIND_CARES@
@_gRPC_FIND_ABSL@
@_gRPC_FIND_RE2@
@_gRPC_FIND_OPENTELEMETRY@
# Targets
include(${CMAKE_CURRENT_LIST_DIR}/gRPCTargets.cmake)

View File

@ -25,7 +25,7 @@ if(TARGET systemd)
endif()
find_package(PkgConfig)
pkg_check_modules(SYSTEMD libsystemd>=233)
pkg_check_modules(SYSTEMD libsystemd)
if(SYSTEMD_FOUND)
set(systemd_FOUND "${SYSTEMD_FOUND}")

View File

@ -1,44 +0,0 @@
# Copyright 2024 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
if(TARGET opentelemetry-cpp::api)
# If opentelemetry is included already, skip including it.
# OpenTelemetry does not work with "module" mode at present.
# elseif(gRPC_OPENTELEMETRY_PROVIDER STREQUAL "module")
# if(NOT OPENTELEMETRY_ROOT_DIR)
# set(OPENTELEMETRY_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/opentelemetry-cpp)
# endif()
# set(BUILD_TESTING OFF)
# if(NOT gRPC_BUILD_TESTS)
# set(WITH_API_ONLY ON)
# endif()
# set(WITH_ABSEIL ON)
# include_directories(${OPENTELEMETRY_ROOT_DIR} "${OPENTELEMETRY_ROOT_DIR}/api/include")
# add_subdirectory(${OPENTELEMETRY_ROOT_DIR} third_party/opentelemetry-cpp)
# if(EXISTS "${OPENTELEMETRY_ROOT_DIR}/CMakeLists.txt")
# Unclear whether we should install OpenTelemetry along with gRPC
# if(gRPC_INSTALL AND _gRPC_INSTALL_SUPPORTED_FROM_MODULE)
# set(OPENTELEMETRY_INSTALL ON)
# endif()
# else()
# message(WARNING "gRPC_OPENTELEMETRY_PROVIDER is \"module\" but OPENTELEMETRY_ROOT_DIR is wrong")
# endif()
# if(gRPC_INSTALL AND NOT _gRPC_INSTALL_SUPPORTED_FROM_MODULE)
# message(WARNING "gRPC_INSTALL will be forced to FALSE because gRPC_OPENTELEMETRY_PROVIDER is \"module\" and CMake version (${CMAKE_VERSION}) is less than 3.13.")
# set(gRPC_INSTALL FALSE)
# endif()
elseif(gRPC_OPENTELEMETRY_PROVIDER STREQUAL "package")
find_package(opentelemetry-cpp CONFIG REQUIRED)
endif()
set(_gRPC_FIND_OPENTELEMETRY "if(NOT TARGET opentelemetry-cpp::opentelemetry_api)\n find_package(opentelemetry-cpp)\nendif()")

View File

@ -86,6 +86,6 @@ elseif(gRPC_PROTOBUF_PROVIDER STREQUAL "package")
set(_gRPC_PROTOBUF_PROTOC_EXECUTABLE ${PROTOBUF_PROTOC_EXECUTABLE})
endif()
endif()
set(_gRPC_FIND_PROTOBUF "include(CMakeFindDependencyMacro)\nfind_dependency(Protobuf CONFIG)")
set(_gRPC_FIND_PROTOBUF "find_dependency(Protobuf CONFIG)")
endif()
endif()

View File

@ -12,20 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
set(gRPC_USE_SYSTEMD "AUTO" CACHE STRING "Build with libsystemd support if available. Can be ON, OFF or AUTO")
if (NOT gRPC_USE_SYSTEMD STREQUAL "OFF")
if (gRPC_USE_SYSTEMD STREQUAL "ON")
find_package(systemd REQUIRED)
elseif (gRPC_USE_SYSTEMD STREQUAL "AUTO")
find_package(systemd)
else()
message(FATAL_ERROR "Unknown value for gRPC_USE_SYSTEMD = ${gRPC_USE_SYSTEMD}")
endif()
if(TARGET systemd)
set(_gRPC_SYSTEMD_LIBRARIES systemd ${SYSTEMD_LINK_LIBRARIES})
add_definitions(-DHAVE_LIBSYSTEMD)
endif()
set(_gRPC_FIND_SYSTEMD "if(NOT systemd_FOUND)\n find_package(systemd)\nendif()")
find_package(systemd)
if(TARGET systemd)
set(_gRPC_SYSTEMD_LIBRARIES systemd ${SYSTEMD_LINK_LIBRARIES})
add_definitions(-DHAVE_LIBSYSTEMD)
endif()
set(_gRPC_FIND_SYSTEMD "if(NOT systemd_FOUND)\n find_package(systemd)\nendif()")

View File

@ -15,6 +15,6 @@
set(UPB_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/upb)
set(_gRPC_UPB_INCLUDE_DIR "${UPB_ROOT_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/third_party/utf8_range")
set(_gRPC_UPB_GRPC_GENERATED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upb-gen" "${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upbdefs-gen")
set(_gRPC_UPB_GRPC_GENERATED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upb-generated" "${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upbdefs-generated")
set(_gRPC_UPB_LIBRARIES upb)

1420
config.m4 generated

File diff suppressed because it is too large Load Diff

1694
config.w32 generated

File diff suppressed because it is too large Load Diff

View File

@ -75,7 +75,7 @@ Base64-encoded values.
**ASCII-Value** should not have leading or trailing whitespace. If it contains
leading or trailing whitespace, it may be stripped. The **ASCII-Value**
character range defined is stricter than HTTP. Implementations must not error
character range defined is more strict than HTTP. Implementations must not error
due to receiving an invalid **ASCII-Value** that's a valid **field-value** in
HTTP, but the precise behavior is not strictly defined: they may throw the value
away or accept the value. If accepted, care must be taken to make sure that the

View File

@ -34,16 +34,10 @@ grpc_extra_deps()
## Supported Versions
gRPC supports building with the latest stable release of Bazel,
as well as the previous major version release for at least 6 months
after it transitions into maintenance mode.
This is consistent with the supported build systems of
[the Google Foundational C++ Support Policy](https://opensource.google/documentation/policies/cplusplus-support).
However individual releases may have a broader
In general, gRPC supports building with the latest patch release of the two most
recent LTS versions of Bazel. However individual releases may have a broader
compatibility range. The currently supported versions are captured by the
following list:
- [`7.1.0`](https://github.com/bazelbuild/bazel/releases/tag/7.1.0)
- [`6.5.0`](https://github.com/bazelbuild/bazel/releases/tag/6.5.0)
NOTE: gRPC doesn't support bzlmod yet.
- [`6.1.2`](https://github.com/bazelbuild/bazel/releases/tag/6.1.2)
- [`5.4.1`](https://github.com/bazelbuild/bazel/releases/tag/5.4.1)

View File

@ -2,44 +2,37 @@
## Overview
This document describes the command line tool that comes with gRPC repository.
It is desirable to have command line tools written in other languages roughly
follow the same syntax and flags.
This document describes the command line tool that comes with gRPC repository. It is desirable to have command line
tools written in other languages roughly follow the same syntax and flags.
> [!NOTE]
> At present, the tool needs to be built from source, and it should be moved out
> to grpc-tools repository as a stand alone application once it is mature
> enough. This tool in its current state though is not up to par in its
> user-friendliness. Other tools in the ecosystem, for example,
> [grpcurl](https://github.com/fullstorydev/grpcurl) are better maintained.
At this point, the tool needs to be built from source, and it should be moved out to grpc-tools repository as a stand
alone application once it is mature enough.
## Core functionality
The command line tool can do the following things:
- Send unary rpc.
- Attach metadata and display received metadata.
- Handle common authentication to server.
- Infer request/response types from server reflection result.
- Find the request/response types from a given proto file.
- Read proto request in text form.
- Read request in wire form (for protobuf messages, this means serialized
binary form).
- Display proto response in text form.
- Write response in wire form to a file.
- Send unary rpc.
- Attach metadata and display received metadata.
- Handle common authentication to server.
- Infer request/response types from server reflection result.
- Find the request/response types from a given proto file.
- Read proto request in text form.
- Read request in wire form (for protobuf messages, this means serialized binary form).
- Display proto response in text form.
- Write response in wire form to a file.
The command line tool should support the following things:
- List server services and methods through server reflection.
- Fine-grained auth control (such as, use this oauth token to talk to the
server).
- Send streaming rpc.
- List server services and methods through server reflection.
- Fine-grained auth control (such as, use this oauth token to talk to the server).
- Send streaming rpc.
## Code location
To use the tool, you need to get the grpc repository and make sure your system
has the prerequisites for building grpc from source, given in the
[installation instructions](../BUILDING.md).
has the prerequisites for building grpc from source, given in the [installation
instructions](../BUILDING.md).
In order to build the grpc command line tool from a fresh clone of the grpc
repository, you need to run the following command to update submodules:
@ -65,13 +58,10 @@ https://github.com/grpc/grpc/blob/master/test/cpp/util/grpc_cli.cc
Most `grpc_cli` commands need the server to support server reflection. See
guides for
[Java](https://github.com/grpc/grpc-java/blob/master/documentation/server-reflection-tutorial.md#enable-server-reflection)
,
[C++](https://github.com/grpc/grpc/blob/master/doc/server_reflection_tutorial.md)
and
[Go](https://github.com/grpc/grpc-go/blob/master/Documentation/server-reflection-tutorial.md)
, [C++](https://github.com/grpc/grpc/blob/master/doc/server_reflection_tutorial.md)
and [Go](https://github.com/grpc/grpc-go/blob/master/Documentation/server-reflection-tutorial.md)
Local proto files can be used as an alternative. See instructions
[below](#Call-a-remote-method).
Local proto files can be used as an alternative. See instructions [below](#Call-a-remote-method).
## Usage
@ -186,8 +176,8 @@ We can send RPCs to a server and get responses using `grpc_cli call` command.
```
If the proto file is not under the current directory, you can use
`--proto_path` to specify new search roots (separated by colon on
Mac/Linux/Cygwin or semicolon on Windows).
`--proto_path` to specify new search roots
(separated by colon on Mac/Linux/Cygwin or semicolon on Windows).
Note that the tool will always attempt to use the reflection service first,
falling back to local proto files if the service is not found. Use

View File

@ -90,15 +90,6 @@ The inheritance of the compression configuration by child RPCs is left up to the
implementation. Note that in the absence of changes to the parent channel, its
configuration will be used.
### Deflate Compression
Like HTTP implementations, gRPC implementations MUST use the "deflate"
compression to mean the zlib structure (defined in
[RFC 1950](https://datatracker.ietf.org/doc/html/rfc1950))
with the deflate compression algorithm (defined in
[RFC 1951](https://datatracker.ietf.org/doc/html/rfc1951)).
Servers and clients MUST NOT send raw deflate data.
### Test cases
1. When a compression level is not specified for either the channel or the

View File

@ -4,10 +4,6 @@
proposed how gRPC supports TCP-level proxies via the HTTP CONNECT request,
defined in [RFC-2817](https://www.rfc-editor.org/rfc/rfc2817).
This guide documents gRPC C-Core's default proxy mapper implementation.
## HTTP Proxy
**Case 1** in the proposal documents a use-case where all outbound traffic from
an environment must go through a proxy. Configurations for such environments are
usually performed using environment variables such as `http_proxy`. gRPC
@ -15,7 +11,11 @@ supports this by providing a default proxy mapper implementation that allows for
overriding the server name (provided in the channel creation hostname) to
resolve based on such configurations.
### Enabling the HTTP Proxy
This guide documents gRPC C-Core's default proxy mapper implementation.
## Working
### Enabling HTTP Proxy
C-Core checks the following places to determine the HTTP proxy to use, stopping
at the first one that is set:
@ -65,24 +65,3 @@ addresses as the host between the range `10.10.0.0` to `10.10.0.255`.
The lookup and subsequent usage of an HTTP proxy for a specific channel can also
be disabled by setting the channel arg `GRPC_ARG_ENABLE_HTTP_PROXY` to 0.
## Address Proxy
**Case 2** in the proposal documents a partially protected environment, where
access to certain addresses must go through a proxy. Name resolution
of protected servers works normally, and the proxy allows the CONNECT request
to use an IP address instead of a hostname.
Only requests for certain hosts must go through the proxy. Requests to other
servers work without the proxy. Custom logic is used to determine which hosts
the proxy will be used for.
To use the address proxy, both of the following parameters need to be specified:
1. Address of the proxy can be specified using `GRPC_ARG_ADDRESS_HTTP_PROXY`
channel argument or `GRPC_ADDRESS_HTTP_PROXY` environment variable. Value of
the channel argument is preferred if both values are specified.
1. Comma-separated list of IP addresses and/or CIDR blocks that should be
accessed through the proxy. This can be specified using
the `GRPC_ARG_ADDRESS_HTTP_PROXY_ENABLED_ADDRESSES` channel argument
or `GRPC_ADDRESS_HTTP_PROXY_ENABLED_ADDRESSES` environment variable. Value of
the channel argument is preferred if both values are specified.

View File

@ -24,6 +24,8 @@ There are multiple polling engine implementations depending on the OS and the OS
- `poll` (If kernel does not have epoll support)
- Mac: **`poll`** (default)
- Windows: (no name)
- One-off polling engines:
- NodeJS : `libuv` polling engine implementation (requires different compile `#define`s)
## Polling Engine Interface

View File

@ -41,29 +41,110 @@ some configuration as environment variables that can be set.
- legacy - the (deprecated) original polling engine for gRPC
* GRPC_TRACE
A comma-separated list of tracer names or glob patterns that provide
additional insight into how gRPC C core is processing requests via debug logs.
Available tracers and their usage can be found in
[gRPC Trace Flags](trace_flags.md)
A comma separated list of tracers that provide additional insight into how
gRPC C core is processing requests via debug logs. Available tracers include:
- api - traces api calls to the C core
- bdp_estimator - traces behavior of bdp estimation logic
- call_error - traces the possible errors contributing to final call status
- cares_resolver - traces operations of the c-ares based DNS resolver
- cares_address_sorting - traces operations of the c-ares based DNS
resolver's resolved address sorter
- cds_lb - traces cds LB policy
- channel - traces operations on the C core channel stack
- channel_stack - traces the set of filters in a channel stack upon
construction
- client_channel - traces client channel control plane activity, including
resolver and load balancing policy interaction
- client_channel_call - traces client channel call activity related to name
resolution
- client_channel_lb_call - traces client channel call activity related
to load balancing picking
- compression - traces compression operations
- connectivity_state - traces connectivity state changes to channels
- cronet - traces state in the cronet transport engine
- dns_resolver - traces state in the native DNS resolver
- executor - traces grpc's internal thread pool ('the executor')
- glb - traces the grpclb load balancer
- handshaker - traces handshaking state
- health_check_client - traces health checking client code
- http - traces state in the http2 transport engine
- http2_stream_state - traces all http2 stream state mutations.
- http1 - traces HTTP/1.x operations performed by gRPC
- inproc - traces the in-process transport
- http_keepalive - traces gRPC keepalive pings
- flowctl - traces http2 flow control
- op_failure - traces error information when failure is pushed onto a
completion queue
- pick_first - traces the pick first load balancing policy
- plugin_credentials - traces plugin credentials
- pollable_refcount - traces reference counting of 'pollable' objects (only
in DEBUG)
- priority_lb - traces priority LB policy
- resource_quota - trace resource quota objects internals
- ring_hash_lb - traces the ring hash load balancing policy
- rls_lb - traces the RLS load balancing policy
- round_robin - traces the round_robin load balancing policy
- weighted_round_robin_lb - traces the weighted_round_robin load balancing
policy
- queue_pluck
- grpc_authz_api - traces gRPC authorization
- server_channel - lightweight trace of significant server channel events
- secure_endpoint - traces bytes flowing through encrypted channels
- subchannel - traces the connectivity state of subchannel
- subchannel_pool - traces subchannel pool
- timer - timers (alarms) in the grpc internals
- timer_check - more detailed trace of timer logic in grpc internals
- transport_security - traces metadata about secure channel establishment
- tcp - traces bytes in and out of a channel
- tsi - traces tsi transport security
- weighted_target_lb - traces weighted_target LB policy
- xds_client - traces xds client
- xds_cluster_manager_lb - traces cluster manager LB policy
- xds_cluster_impl_lb - traces cluster impl LB policy
- xds_cluster_resolver_lb - traces xds cluster resolver LB policy
- xds_resolver - traces xds resolver
The following tracers will only run in binaries built in DEBUG mode. This is
accomplished by invoking `CONFIG=dbg make <target>`
- metadata - tracks creation and mutation of metadata
- combiner - traces combiner lock state
- call_combiner - traces call combiner state
- closure - tracks closure creation, scheduling, and completion
- fd_trace - traces fd create(), shutdown() and close() calls for channel fds.
- pending_tags - traces still-in-progress tags on completion queues
- polling - traces the selected polling engine
- polling_api - traces the api calls to polling engine
- subchannel_refcount
- queue_refcount
- error_refcount
- stream_refcount
- slice_refcount
- workqueue_refcount
- fd_refcount
- cq_refcount
- auth_context_refcount
- security_connector_refcount
- resolver_refcount
- lb_policy_refcount
- chttp2_refcount
'all' can additionally be used to turn all traces on.
Individual traces can be disabled by prefixing them with '-'.
'refcount' will turn on all of the tracers for refcount debugging.
if 'list_tracers' is present, then all of the available tracers will be
printed when the program starts up.
Example:
export GRPC_TRACE=all,-pending_tags
* GRPC_VERBOSITY
<!-- BEGIN_GOOGLE_INTERNAL_DOCUMENTATION"
GRPC_VERBOSITY has been disabled for internal usage and will not work anymore.
If anyone wants to debug, we need to set verbose logs using absl.
END_GOOGLE_INTERNAL_DOCUMENTATION -->
<!-- BEGIN_OPEN_SOURCE_DOCUMENTATION -->
`GRPC_VERBOSITY` is used to set the minimum level of log messages printed by gRPC (supported values are `DEBUG`, `INFO` and `ERROR`). If this environment variable is unset, only `ERROR` logs will be printed.
gRPC logging verbosity - one of:
- DEBUG - log INFO, WARNING, ERROR and FATAL messages. Also sets absl VLOG(2) logs enabled. This is not recommended for production systems. This will be expensive for staging environments too, so it can be used when you want to debug a specific issue.
- INFO - log INFO, WARNING, ERROR and FATAL messages. This is not recommended for production systems. This may be slightly expensive for staging environments too. We recommend that you use your discretion for staging environments.
- ERROR - log ERROR and FATAL messages. This is recommended for production systems.
- NONE - won't log any.
GRPC_VERBOSITY will set verbosity of absl logging.
- If the external application sets some other verbosity, then whatever is set later will be honoured.
- If nothing is set as GRPC_VERBOSITY, then the setting of the exernal application will be honoured.
- If nothing is set by the external application also, the default set by absl will be honoured.
<!-- END_OPEN_SOURCE_DOCUMENTATION -->
Default gRPC logging verbosity - one of:
- DEBUG - log all gRPC messages
- INFO - log INFO and ERROR message
- ERROR - log only errors (default)
- NONE - won't log any
* GRPC_STACKTRACE_MINLOGLEVEL
Minimum loglevel to print the stack-trace - one of DEBUG, INFO, ERROR, and NONE.

View File

@ -56,12 +56,3 @@
- 1.54 'g' stands for ['gracious'](https://github.com/grpc/grpc/tree/v1.54.x)
- 1.55 'g' stands for ['grandslam'](https://github.com/grpc/grpc/tree/v1.55.x)
- 1.56 'g' stands for ['galvanized'](https://github.com/grpc/grpc/tree/v1.56.x)
- 1.57 'g' stands for ['grounded'](https://github.com/grpc/grpc/tree/v1.57.x)
- 1.58 'g' stands for ['goku'](https://github.com/grpc/grpc/tree/v1.58.x)
- 1.59 'g' stands for ['generative'](https://github.com/grpc/grpc/tree/v1.59.x)
- 1.60 'g' stands for ['gjallarhorn'](https://github.com/grpc/grpc/tree/v1.60.x)
- 1.61 'g' stands for ['grand'](https://github.com/grpc/grpc/tree/v1.61.x)
- 1.62 'g' stands for ['guardian'](https://github.com/grpc/grpc/tree/v1.62.x)
- 1.63 'g' stands for ['giggle'](https://github.com/grpc/grpc/tree/v1.63.x)
- 1.64 'g' stands for ['grateful'](https://github.com/grpc/grpc/tree/v1.64.x)
- 1.65 'g' stands for ['gnarly'](https://github.com/grpc/grpc/tree/master)

View File

@ -58,25 +58,17 @@ Features | gRFCs | [C++, Python,<br> Ruby, PHP](https://github.com/grpc/grpc/re
Request matching based on:<ul><li>[Path](https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route_components.proto#config-route-v3-routematch) (prefix, full path and safe regex)</li><ul><li>[case_sensitive](https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route_components.proto#envoy-v3-api-msg-config-route-v3-routematch) must be true else config is NACKed</li></ul><li>[Headers](https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route_components.proto#envoy-v3-api-msg-config-route-v3-headermatcher)</li></ul>Request routing to multiple clusters based on [weights](https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route_components.proto#config-route-v3-weightedcluster) | [A28](https://github.com/grpc/proposal/blob/master/A28-xds-traffic-splitting-and-routing.md) | v1.31.0 | v1.31.0 | v1.31.0 | v1.3.0 |
Case insensitive prefix/full path matching:<ul><li>[case_sensitive](https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route_components.proto#envoy-v3-api-msg-config-route-v3-routematch) can be true or false</li></ul> | | v1.34.0 | v1.34.0 | v1.34.0 | v1.3.0 |
Support for [xDS v3 APIs](https://www.envoyproxy.io/docs/envoy/latest/api-v3/api) | [A30](https://github.com/grpc/proposal/blob/master/A30-xds-v3.md) | v1.36.0 | v1.36.0 | v1.36.0 | v1.4.0 |
Support for [xDS v2 APIs](https://www.envoyproxy.io/docs/envoy/latest/api/api_supported_versions) | [A27](https://github.com/grpc/proposal/blob/master/A30-xds-v3.md#details-of-the-v2-to-v3-transition) | < v1.51.0 | < v1.53.0 | < v1.54.0 | < v1.8.0 |
Support for [xDS v2 APIs](https://www.envoyproxy.io/docs/envoy/latest/api/api_supported_versions) | [A27](https://github.com/grpc/proposal/blob/master/A30-xds-v3.md#details-of-the-v2-to-v3-transition) | < v1.51.0 | < v1.53.0 | TBA | < v1.8.0 |
[Maximum Stream Duration](https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route_components.proto#config-route-v3-routeaction-maxstreamduration):<ul><li>Only max_stream_duration is supported.</li></ul> | [A31](https://github.com/grpc/proposal/blob/master/A31-xds-timeout-support-and-config-selector.md) | v1.37.1 | v1.37.1 | v1.37.0 | v1.4.0 |
[Circuit Breaking](https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/cluster/v3/circuit_breaker.proto):<ul><li>Only max_requests is supported.</li></ul> | [A32](https://github.com/grpc/proposal/blob/master/A32-xds-circuit-breaking.md) | v1.37.1 (N/A for PHP) | v1.37.1 | v1.37.0 | v1.4.0 |
[Fault Injection](https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/filters/http/fault/v3/fault.proto):<br> Only the following fields are supported:<ul><li>delay</li><li>abort</li><li>max_active_faults</li><li>headers</li></ul> | [A33](https://github.com/grpc/proposal/blob/master/A33-Fault-Injection.md) | v1.37.1 | v1.37.1 | v1.37.0 | v1.4.0 |
[Client Status Discovery Service](https://github.com/envoyproxy/envoy/blob/main/api/envoy/service/status/v3/csds.proto) | [A40](https://github.com/grpc/proposal/blob/master/A40-csds-support.md) | v1.37.1 (C++)<br>v1.38.0 (Python) | v1.37.1 | v1.37.0 | v1.5.0 |
[Aggregate Clusters](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/aggregate_cluster.html) and [Logical DNS Clusters](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/service_discovery.html#logical-dns) | [A37](https://github.com/grpc/proposal/blob/master/A37-xds-aggregate-and-logical-dns-clusters.md) | v1.47.0 | v1.39.0 | v1.52.2 | v1.9.0 |
Aggregate Cluster Behavior Fixes | [A75](https://github.com/grpc/proposal/blob/master/A75-xds-aggregate-cluster-behavior-fixes.md) | v1.61.0 | | | |
[Ring hash](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/load_balancers#ring-hash) load balancing policy:<br> Only the following [policy specifiers](https://github.com/envoyproxy/envoy/blob/2443032526cf6e50d63d35770df9473dd0460fc0/api/envoy/config/route/v3/route_components.proto#L706) are supported:<ul><li>header</li><li>filter_state with key `io.grpc.channel_id`</li></ul>Only [`XX_HASH`](https://github.com/envoyproxy/envoy/blob/2443032526cf6e50d63d35770df9473dd0460fc0/api/envoy/config/cluster/v3/cluster.proto#L383) function is supported. | [A42](https://github.com/grpc/proposal/blob/master/A42-xds-ring-hash-lb-policy.md) | v1.40.0<br>(C++ and Python) | v1.40.1 | 1.41.0 | v1.10.0 |
[Retry](https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route_components.proto#envoy-v3-api-msg-config-route-v3-retrypolicy):<br>Only the following fields are supported:<ul><li>retry_on for the following conditions: cancelled, deadline-exceeded, internal, resource-exhausted, and unavailable.</li><li>num_retries</li><li>retry_back_off</li></ul> | [A44](https://github.com/grpc/proposal/blob/master/A44-xds-retry.md) | v1.40.0<br>(C++ and Python) | v1.40.1 | 1.41.0 | v1.8.0 |
[Ring hash](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/load_balancers#ring-hash) load balancing policy:<br> Only the following [policy specifiers](https://github.com/envoyproxy/envoy/blob/2443032526cf6e50d63d35770df9473dd0460fc0/api/envoy/config/route/v3/route_components.proto#L706) are supported:<ul><li>header</li><li>filter_state with key `io.grpc.channel_id`</li></ul>Only [`XX_HASH`](https://github.com/envoyproxy/envoy/blob/2443032526cf6e50d63d35770df9473dd0460fc0/api/envoy/config/cluster/v3/cluster.proto#L383) function is supported. | [A42](https://github.com/grpc/proposal/blob/master/A42-xds-ring-hash-lb-policy.md) | v1.40.0<br>(C++ and Python) | v1.40.1 | 1.41.0 | |
[Retry](https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route_components.proto#envoy-v3-api-msg-config-route-v3-retrypolicy):<br>Only the following fields are supported:<ul><li>retry_on for the following conditions: cancelled, deadline-exceeded, internal, resource-exhausted, and unavailable.</li><li>num_retries</li><li>retry_back_off</li></ul> | [A44](https://github.com/grpc/proposal/blob/master/A44-xds-retry.md) | v1.40.0<br>(C++ and Python) | v1.40.1 | 1.41.0 | |
[Security](https://www.envoyproxy.io/docs/envoy/latest/configuration/security/security):<br>Uses [certificate providers](https://github.com/grpc/proposal/blob/master/A29-xds-tls-security.md#certificate-provider-plugin-framework) instead of SDS | [A29](https://github.com/grpc/proposal/blob/master/A29-xds-tls-security.md) | v1.41.0<br>(C++ and Python) | v1.41.0 | 1.41.0 | |
[Authorization (RBAC)](https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/filters/http/rbac/v3/rbac.proto):<br><ul><li>`LOG` action has no effect<li>CEL unsupported and rejected</ul> | [A41](https://github.com/grpc/proposal/blob/master/A41-xds-rbac.md) | v1.51.0<br>(C++ and Python) | v1.42.0 | 1.42.0 | |
[Least Request LB Policy](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/load_balancers.html#weighted-least-request) | [A48](https://github.com/grpc/proposal/blob/master/A48-xds-least-request-lb-policy.md) | | v1.48.0 | | |
[Outlier Detection](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/outlier):<br>Only the following detection types are supported:<ul><li>Success Rate</li><li>Failure Percentage</li></ul> | [A50](https://github.com/grpc/proposal/blob/master/A50-xds-outlier-detection.md) | v1.51.0 | v1.49.0 | v1.50.0 | v1.7.0 |
Ignore Resource Deletion | [A53](https://github.com/grpc/proposal/blob/master/A53-xds-ignore-resource-deletion.md) | v1.48.0 | v1.48.0 | v1.55.0 | v1.7.0 |
[Custom Load Balancer Configuration](https://github.com/envoyproxy/envoy/blob/57be3189ffa3372b34e9480d1f02b2d165e49077/api/envoy/config/cluster/v3/cluster.proto#L1208) | [A52](https://github.com/grpc/proposal/blob/master/A52-xds-custom-lb-policies.md) | v1.55.0 | v1.47.0 | v1.56.0 | v1.10.0 |
[xDS Federation](https://github.com/cncf/xds/blob/main/proposals/TP1-xds-transport-next.md) | [A47](https://github.com/grpc/proposal/blob/master/A47-xds-federation.md) | v1.55.0 | v1.55.0 | v1.55.0 | |
[Client-Side Weighted Round Robin LB Policy](https://github.com/envoyproxy/envoy/blob/a6d46b6ac4750720eec9a49abe701f0df9bf8e0a/api/envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin.proto#L36) | [A58](https://github.com/grpc/proposal/blob/master/A58-client-side-weighted-round-robin-lb-policy.md) | v1.55.0 | v1.54.0 | v1.56.0 | |
Pick First | [A62](https://github.com/grpc/proposal/blob/master/A62-pick-first.md) | v1.58.0 | v1.58.1 | v1.56.0 | |
[StringMatcher for Header Matching](https://github.com/envoyproxy/envoy/blob/3fe4b8d335fa339ef6f17325c8d31f87ade7bb1a/api/envoy/config/route/v3/route_components.proto#L2280) | [A63](https://github.com/grpc/proposal/blob/master/A63-xds-string-matcher-in-header-matching.md) | v1.56.0 | v1.53.0 | v1.56.0 | v1.9.0 |
LRS Custom Metrics Support | [A64](https://github.com/grpc/proposal/blob/master/A64-lrs-custom-metrics.md) | v1.54.0 | | | |
mTLS Credentials in xDS Bootstrap File | [A65](https://github.com/grpc/proposal/blob/master/A65-xds-mtls-creds-in-bootstrap.md) | v1.65.0 | | v1.61.0 | |
Stateful Session Affinity | [A55](https://github.com/grpc/proposal/blob/master/A55-xds-stateful-session-affinity.md), [A60](https://github.com/grpc/proposal/blob/master/A60-xds-stateful-session-affinity-weighted-clusters.md), [A75](https://github.com/grpc/proposal/blob/master/A75-xds-aggregate-cluster-behavior-fixes.md) | v1.61.0 | | | |
[Outlier Detection](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/outlier):<br>Only the following detection types are supported:<ul><li>Success Rate</li><li>Failure Percentage</li></ul> | [A50](https://github.com/grpc/proposal/blob/master/A50-xds-outlier-detection.md) | v1.51.0 | v1.49.0 | v1.50.0 | v1.7.0 | |
[Custom Load Balancer Configuration](https://github.com/envoyproxy/envoy/blob/57be3189ffa3372b34e9480d1f02b2d165e49077/api/envoy/config/cluster/v3/cluster.proto#L1208) | [A52](https://github.com/grpc/proposal/blob/master/A52-xds-custom-lb-policies.md) | v1.55.0 | v1.47.0 | | |
[xDS Federation](https://github.com/cncf/xds/blob/main/proposals/TP1-xds-transport-next.md) | [A47](https://github.com/grpc/proposal/blob/master/A47-xds-federation.md) | v1.55.0 | | | |
[Client-Side Weighted Round Robin LB Policy](https://github.com/envoyproxy/envoy/blob/a6d46b6ac4750720eec9a49abe701f0df9bf8e0a/api/envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin.proto#L36) | [A58](https://github.com/grpc/proposal/blob/master/A58-client-side-weighted-round-robin-lb-policy.md) | v1.55.0 | | | |
[StringMatcher for Header Matching](https://github.com/envoyproxy/envoy/blob/3fe4b8d335fa339ef6f17325c8d31f87ade7bb1a/api/envoy/config/route/v3/route_components.proto#L2280) | [A63](https://github.com/grpc/proposal/blob/master/A63-xds-string-matcher-in-header-matching.md) | v1.56.0 | | | |

Binary file not shown.

Before

Width:  |  Height:  |  Size: 455 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 530 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 389 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 500 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 201 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 173 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 506 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 374 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 523 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 524 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 540 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 343 KiB

View File

@ -49,12 +49,6 @@ Most gRPC implementations support the following URI schemes:
as the first character; the implementation will prepend this null. Do not include
the null in `abstract_path`.
- `vsock:cid:port` -- VSOCK (Linux systems only)
- `cid` is 32-bit Context Identifier (CID). It indicates the source or
destination, which is either a virtual machine or the host.
- `port` is a 32-bit port number. It differentiates between multiple
services running on a single machine.
The following schemes are supported by the gRPC C-core implementation,
but may not be supported in other languages:

View File

@ -54,7 +54,7 @@ is working properly by using the [`grpc_cli` command line tool]:
Server Reflection can be used by clients to get information about gRPC services
at runtime. We've provided a descriptor database called
[ProtoReflectionDescriptorDatabase](../../src/python/grpcio_reflection/grpc_reflection/v1alpha/proto_reflection_descriptor_database.py)
[ProtoReflectionDescriptorDatabase](../../src/python/grpcio_reflection/v1alpha/proto_reflection_descriptor_database.h)
which implements the
[DescriptorDatabase](https://googleapis.dev/python/protobuf/latest/google/protobuf/descriptor_database.html#google.protobuf.descriptor_database.DescriptorDatabase)
interface. It manages the communication between clients and reflection services

View File

@ -1,8 +1,3 @@
dl.field-list > dt {
word-break: keep-all !important;
}
.sphinxsidebar {
overflow-y: scroll;
top: 0;
bottom: 0;
}

View File

@ -107,4 +107,4 @@ todo_include_todos = True
# -- Options for substitutions -----------------------------------------------
rst_epilog = '.. |channel_arg_names_link| replace:: https://github.com/grpc/grpc/blob/%s/include/grpc/impl/channel_arg_names.h' % branch
rst_epilog = '.. |grpc_types_link| replace:: https://github.com/grpc/grpc/blob/%s/include/grpc/impl/codegen/grpc_types.h' % branch

View File

@ -45,7 +45,6 @@ Glossary
server object. Channel arguments are meant for advanced usages and contain
experimental API (some may not labeled as experimental). Full list of
available channel arguments and documentation can be found under the
"grpc_arg_keys" section of "channel_arg_names.h" header file
(|channel_arg_names_link|). For example, if you want to disable TCP port
reuse, you may construct channel arguments like:
``options = (('grpc.so_reuseport', 0),)``.
"grpc_arg_keys" section of "grpc_types.h" header file (|grpc_types_link|).
For example, if you want to disable TCP port reuse, you may construct
channel arguments like: ``options = (('grpc.so_reuseport', 0),)``.

View File

@ -1,7 +0,0 @@
gRPC Python Observability
=========================
Module Contents
---------------
.. automodule:: grpc_observability

View File

@ -18,7 +18,6 @@ API Reference
grpc_reflection
grpc_status
grpc_testing
grpc_observability
glossary

View File

@ -1,12 +0,0 @@
# Quality of Service (QoS) using Differentiated services
Differentiated services or DiffServ is a mechanism for classifying network traffic and providing quality of service on IP networks.
DiffServ uses dedicated fields in the IP header for packet classification purposes.
By marking outgoing packets using a Differentiated Services Code Point (DSCP) the network can prioritize accordingly.
The DSCP value on outgoing packets is controlled by the following channel argument:
* **GRPC_ARG_DSCP**
* This channel argument accepts integer values 0 to 63. See [dscp-registry](https://www.iana.org/assignments/dscp-registry/dscp-registry.xhtml) for details.
* Default value is to use system default, i.e. not set.
* Only apply to POSIX systems.

View File

@ -23,8 +23,8 @@ We want to be able to answer the following queries:
Specifically, what are the names of the methods, are those methods unary or
streaming, and what are the types of the argument and result?
The first version of the protocol is here:
https://github.com/grpc/grpc/blob/master/src/proto/grpc/reflection/v1/reflection.proto
The first proposed version of the protocol is here:
https://github.com/grpc/grpc/blob/master/src/proto/grpc/reflection/v1alpha/reflection.proto
Note that a server is under no obligation to return a complete list of all
methods it supports. For example, a reverse proxy may support server reflection

View File

@ -62,12 +62,12 @@ DNS](https://github.com/grpc/proposal/blob/master/A2-service-configs-in-dns.md).
Here is an example service config in protobuf form:
```textproto
```
{
# Use round_robin LB policy.
// Use round_robin LB policy.
load_balancing_config: { round_robin: {} }
# This method config applies to method "foo/bar" and to all methods
# of service "baz".
// This method config applies to method "foo/bar" and to all methods
// of service "baz".
method_config: {
name: {
service: "foo"
@ -76,7 +76,7 @@ Here is an example service config in protobuf form:
name: {
service: "baz"
}
# Default timeout for matching methods.
// Default timeout for matching methods.
timeout: {
seconds: 1
nanos: 1
@ -87,7 +87,7 @@ Here is an example service config in protobuf form:
Here is the same example service config in JSON form:
```json
```
{
"loadBalancingConfig": [ { "round_robin": {} } ],
"methodConfig": [

View File

@ -24,10 +24,8 @@ statuses are defined as such:
| UNAUTHENTICATED | 16 | The request does not have valid authentication credentials for the operation. |
All RPCs started at a client return a `status` object composed of an integer
`code` and a string `message`. The server-side can choose the status it returns
for a given RPC. Applications should only use values defined above. gRPC libraries
that encounter values outside this range must either propagate them directly or
convert them to UNKNOWN.
`code` and a string `message`. The server-side can choose the status it
returns for a given RPC.
The gRPC client and server-side implementations may also generate and
return `status` on their own when errors happen. Only a subset of

View File

@ -1,120 +0,0 @@
<!---
Automatically generated by tools/codegen/core/gen_trace_flags.py
--->
gRPC Trace Flags
----------------
The `GRPC_TRACE` environment variable supports a comma-separated list of tracer
names or glob patterns that provide additional insight into how gRPC C core is
processing requests via debug logs. Available tracers include:
- api - API calls to the C core.
- backend_metric - C++ backend metric recorder APIs.
- backend_metric_filter - Filter that populates backend metric data in server trailing metadata.
- bdp_estimator - Behavior of bdp estimation logic.
- call - Traces operations on a call through the gRPC stack.
- call_error - Possible errors contributing to final call statuses.
- cares_address_sorting - Operations of the c-ares based DNS resolver's address sorter.
- cares_resolver - Operations of the c-ares based DNS resolver.
- cds_lb - CDS LB policy.
- channel - Operations on the C core channel stack.
- channel_stack - Construction of the set of filters in a channel stack.
- chaotic_good - Chaotic good transport.
- chttp2_hpack_parser - HTTP/2 HPACK parser.
- chttp2_new_stream - HTTP/2 incoming stream creation.
- client_channel - Client channel control plane activity, including resolver and load balancing policy interaction.
- client_channel_call - Client channel call activity related to name resolution.
- client_channel_lb_call - Client channel call activity related to load balancing picking.
- client_idle_filter - Client idleness filter.
- compression - Compression operations.
- connectivity_state - Connectivity state changes to channels.
- cronet - Cronet transport engine.
- dns_resolver - The active DNS resolver.
- environment_autodetect - GCP environment auto-detection.
- event_engine - High-level EventEngine operations.
- event_engine_client_channel_resolver - EventEngine-based client channel resolver state and events.
- event_engine_dns - EventEngine DNS resolver.
- event_engine_endpoint - EventEngine Endpoint operations.
- event_engine_endpoint_data - Detailed dump of EventEngine endpoint TCP data.
- event_engine_poller - EventEngine Poller events.
- executor - gRPC's legacy thread pool ('the executor').
- fault_injection_filter - Fault injection.
- flowctl - Http2 flow control.
- fork - Fork support.
- glb - gRPClb load balancer.
- grpc_authz_api - gRPC authorization.
- handshaker - Handshaking state.
- health_check_client - Health checking client code.
- http - Http2 transport engine.
- http1 - HTTP/1.x operations performed by gRPC.
- http2_ping - Pings/ping acks/antagonist writes in http2 stack.
- http2_stream_state - Http2 stream state mutations.
- http_keepalive - gRPC keepalive pings.
- inproc - In-process transport.
- metadata_query - GCP metadata queries.
- op_failure - Error information when failure is pushed onto a completion queue. The `api` tracer must be enabled for this flag to have any effect.
- orca_client - Out-of-band backend metric reporting client.
- outlier_detection_lb - Outlier detection.
- pick_first - Pick first load balancing policy.
- plugin_credentials - Plugin credentials.
- priority_lb - Priority LB policy.
- queue_pluck - Completion queue plucking. The `api` tracer must be enabled for this flag to have any effect.
- resource_quota - Resource quota objects internals.
- retry - Call retries.
- ring_hash_lb - Ring hash load balancing policy.
- rls_lb - RLS load balancing policy.
- round_robin - Round robin load balancing policy.
- secure_endpoint - Bytes flowing through encrypted channels.
- server_channel - Lightweight trace of significant server channel events.
- stateful_session_filter - Stateful session affinity.
- subchannel - Connectivity state of subchannels.
- subchannel_pool - Subchannel pool.
- tcp - Bytes in and out of a channel.
- timer - Timers (alarms) in the grpc internals.
- timer_check - more detailed trace of timer logic in grpc internals.
- tsi - TSI transport security.
- weighted_round_robin_lb - Weighted round robin load balancing policy.
- weighted_target_lb - Weighted target LB policy.
- xds_client - XDS client.
- xds_client_refcount - Refcount of XDS client.
- xds_cluster_impl_lb - XDS Cluster impl LB policy.
- xds_cluster_manager_lb - XDS Cluster manager LB policy.
- xds_override_host_lb - XDS Override host LB.
- xds_resolver - XDS Resolver.
- xds_server_config_fetcher - XDS Server config fetcher.
- xds_wrr_locality_lb - XDS WRR locality LB policy.
The following tracers will only run in binaries built in DEBUG mode. This is
accomplished by invoking `bazel build --config=dbg <target>`
- auth_context_refcount - Auth context refcounting.
- call_combiner - Call combiner state.
- call_refcount - Refcount on call.
- closure - Legacy closure creation, scheduling, and completion.
- combiner - Combiner lock state.
- cq_refcount - Completion queue refcounting.
- error_refcount - Error refcounting.
- fd_refcount - File descriptor refcounting.
- fd_trace - Legacy file descriptor create(), shutdown() and close() calls for channel fds.
- lb_policy_refcount - LB policy refcounting.
- party_state - Coordination of activities related to a call.
- pending_tags - Still-in-progress tags on completion queues. The `api` tracer must be enabled for this flag to have any effect.
- polling - The active polling engine.
- polling_api - API calls to polling engine.
- promise_primitives - Low-level primitives in the promise library.
- resolver_refcount - Resolver refcouting.
- security_connector_refcount - Refcounting for security connectors (part of channel credentials).
- slice_refcount - Slice refcounting.
- stream_refcount - Stream refcounting.
- subchannel_refcount - Subchannel refcounting.
- work_serializer - A synchronization mechanism used to ensure that only one thread is executing at a given time.
Glob patterns and special cases:
- `*` can be used to turn all traces on.
- Individual traces can be disabled by prefixing them with `-`.
- `*refcount*` will turn on all of the tracers for refcount debugging.
- if `list_tracers` is present, then all of the available tracers will be
printed when the program starts up.
Example:
export GRPC_TRACE=*,-pending_tags

View File

@ -22,7 +22,7 @@ In addition, when handling requests, if the initial request metadata contains th
- If the value matches `sleep-<int>`, the server should wait the specified number of seconds before resuming behavior matching and RPC processing.
- If the value matches `keep-open`, the server should never respond to the request and behavior matching ends.
- If the value matches `error-code-<int>`, the server should respond with the specified status code and behavior matching ends.
- If the value matches `succeed-on-retry-attempt-<int>`, and the value of the `grpc-previous-rpc-attempts` metadata field is equal to the specified number, the normal RPC processing should resume and behavior matching ends.
- If the value matches `success-on-retry-attempt-<int>`, and the value of the `grpc-previous-rpc-attempts` metadata field is equal to the specified number, the normal RPC processing should resume and behavior matching ends.
- A value can have a prefix `hostname=<string>` followed by a space. In that case, the rest of the value should only be applied if the specified hostname matches the server's hostname.
The `rpc-behavior` header value can have multiple options separated by commas. In that case, the value should be split by commas and the options should be applied in the order specified. If a request has multiple `rpc-behavior` metadata values, each one should be processed that way in order.

View File

@ -1,23 +1,20 @@
# gRPC-core BinderTransport example apps
WIP.
## Build Instruction
1. Install Android SDK and NDK. Only NDK version >= 25 is supported. We tested against SDK Platform `33` and NDK `26.2.11394342`.
2. Make sure Bazel is at least `7.0`. Use `export OVERRIDE_BAZEL_VERSION=7.1.0` to selected a supported version listed in `bazel/supported_versions.txt` if necessary.
3. Point environment variables to install locations of SDK and NDK
1. Install Android SDK and NDK. Currently we only support SDK version 30.0.3 and
NDK version 21.4.7075529 . Make sure you get these exact versions otherwise
Bazel might complain.
2. Point environment variables to install locations of SDK and NDK
```
export ANDROID_HOME=$HOME/android-sdk
export ANDROID_NDK_HOME=$HOME/android-sdk/ndk/26.2.11394342
```
4. To build a fat APK that supports `x86_64`, `armv7`, and `arm64`:
```
bazel build \
--extra_toolchains=@androidndk//:all \
--android_platforms=//bazel/platforms/android:x86_64,//bazel/platforms/android:armeabi-v7a,//bazel/platforms/android:arm64-v8a \
--copt=-Wno-unknown-warning-option \
//examples/android/binder/java/io/grpc/binder/cpp/exampleserver:app \
//examples/android/binder/java/io/grpc/binder/cpp/exampleclient:app
export ANDROID_HOME=$HOME/Android/Sdk/
export ANDROID_NDK_HOME=$HOME/Android/Sdk/ndk/21.4.7075529
```
3. `bazel build //examples/android/binder/java/io/grpc/binder/cpp/exampleclient:app`
4. `bazel build //examples/android/binder/java/io/grpc/binder/cpp/exampleserver:app`
5. `adb install
bazel-bin/examples/android/binder/java/io/grpc/binder/cpp/exampleclient/app.apk`
6. `adb install

View File

@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
load("@build_bazel_rules_android//android:rules.bzl", "android_binary", "android_library")
cc_library(
name = "jni_lib",
srcs = ["native.cc"],

View File

@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
load("@build_bazel_rules_android//android:rules.bzl", "android_binary", "android_library")
cc_library(
name = "jni_lib",
srcs = ["native.cc"],

View File

@ -31,7 +31,6 @@ android {
arguments '-Dhelloworld_GRPC_CPP_PLUGIN_EXECUTABLE=' + grpc_cpp_plugin
arguments '-Dprotobuf_INSTALL=OFF'
arguments '-Dutf8_range_ENABLE_INSTALL=OFF'
version "3.22.1"
}
}
ndk.abiFilters 'x86'
@ -48,7 +47,6 @@ android {
externalNativeBuild {
cmake {
path "CMakeLists.txt"
version "3.22.1"
}
}
}

Some files were not shown because too many files have changed in this diff Show More