Compare commits
15 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
4af785929c | |
|
|
f75bae6b92 | |
|
|
8a60bb8828 | |
|
|
8743965615 | |
|
|
ce4257da5d | |
|
|
ac5c3f3164 | |
|
|
e549292430 | |
|
|
fc516dc33d | |
|
|
c6e2638d35 | |
|
|
0f8cb206ef | |
|
|
ed6634c4d8 | |
|
|
0417b882aa | |
|
|
e097a3220b | |
|
|
beaf3a7ba3 | |
|
|
1edf19f04a |
|
|
@ -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/...
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
7.1.0
|
||||
6.3.2
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
23
.clang-tidy
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,8 +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
|
||||
binding.gyp linguist-generated=true
|
||||
Package.swift 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
|
||||
|
|
@ -29,13 +31,9 @@ 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
|
||||
test/cpp/microbenchmarks/huffman_geometries/** linguist-generated=true
|
||||
|
|
@ -1,12 +1,11 @@
|
|||
/bazel/** @veblush @gnossen
|
||||
/bazel/experiments.yaml
|
||||
/cmake/** @veblush @apolcyn
|
||||
/src/core/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
|
||||
# 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/xds/** @markdroth
|
||||
/src/core/lib/resolver/** @markdroth
|
||||
/src/core/lib/service_config/** @markdroth
|
||||
/tools/dockerfile/** @jtattermusch @apolcyn
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
- "*"
|
||||
|
|
@ -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/**
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
@ -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
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
name: PSM Interop
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- 'v1.*'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
unittest:
|
||||
# By default, only version is printed out in parens, e.g. "unittest (3.10)"
|
||||
# This changes it to "unittest (python3.10)"
|
||||
name: "unittest (python${{ matrix.python_version }})"
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python_version: ["3.9", "3.10"]
|
||||
fail-fast: false
|
||||
permissions:
|
||||
pull-requests: read # Used by paths-filter to read the diff.
|
||||
defaults:
|
||||
run:
|
||||
working-directory: 'tools/run_tests/xds_k8s_test_driver'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
# To add this job to required GitHub checks, it's not enough to use
|
||||
# the on.pull_request.paths filter. For required checks, the job needs to
|
||||
# return the success status, and not be skipped.
|
||||
# Using paths-filter action, we skip the setup/test steps when psm interop
|
||||
# files are unchanged, and the job returns success.
|
||||
- uses: dorny/paths-filter@v2
|
||||
id: paths_filter
|
||||
with:
|
||||
filters: |
|
||||
psm_interop_src:
|
||||
- 'tools/run_tests/xds_k8s_test_driver/**'
|
||||
- 'src/proto/grpc/testing/empty.proto'
|
||||
- 'src/proto/grpc/testing/messages.proto'
|
||||
- 'src/proto/grpc/testing/test.proto'
|
||||
|
||||
- uses: actions/setup-python@v4
|
||||
if: ${{ steps.paths_filter.outputs.psm_interop_src == 'true' }}
|
||||
with:
|
||||
python-version: "${{ matrix.python_version }}"
|
||||
cache: 'pip'
|
||||
cache-dependency-path: 'tools/run_tests/xds_k8s_test_driver/requirements.lock'
|
||||
|
||||
- name: "Install requirements"
|
||||
if: ${{ steps.paths_filter.outputs.psm_interop_src == 'true' }}
|
||||
run: |
|
||||
pip list
|
||||
pip install --upgrade pip setuptools
|
||||
pip list
|
||||
pip install -r requirements.lock
|
||||
pip list
|
||||
|
||||
- name: "Generate protos"
|
||||
if: ${{ steps.paths_filter.outputs.psm_interop_src == 'true' }}
|
||||
run: >
|
||||
python -m grpc_tools.protoc --proto_path=../../../
|
||||
--python_out=. --grpc_python_out=.
|
||||
src/proto/grpc/testing/empty.proto
|
||||
src/proto/grpc/testing/messages.proto
|
||||
src/proto/grpc/testing/test.proto
|
||||
|
||||
- name: "Run unit tests"
|
||||
if: ${{ steps.paths_filter.outputs.psm_interop_src == 'true' }}
|
||||
run: python -m tests.unit
|
||||
|
|
@ -17,7 +17,7 @@ cython_debug/
|
|||
dist/
|
||||
htmlcov/
|
||||
py3*/
|
||||
pyb/
|
||||
python_build/
|
||||
python_pylint_venv/
|
||||
src/python/grpcio_*/=*
|
||||
src/python/grpcio_*/build/
|
||||
|
|
@ -181,6 +181,3 @@ iwyu_build/
|
|||
# fuzzer logs
|
||||
fuzz-*.log
|
||||
|
||||
# bazel module files (MODULE.bazel will need to be removed here)
|
||||
MODULE.bazel
|
||||
MODULE.bazel.lock
|
||||
|
|
|
|||
|
|
@ -47,6 +47,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
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
)
|
||||
|
|
@ -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.
|
||||
|
||||

|
||||
|
||||
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:
|
||||
|
||||

|
||||
|
||||
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.
|
||||
|
||||

|
||||
|
||||
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.
|
||||
|
||||

|
||||
|
||||
You will see a series of screens:
|
||||
|
||||
1. Select *Authorize LF-Engineering:
|
||||
|
||||

|
||||
|
||||
1. Select your contributor type:
|
||||
|
||||

|
||||
|
||||
1. Select *SIGN CLA*:
|
||||
|
||||

|
||||
|
||||
Some time after you've digitally signed the document, the EasyCLA will appear as
|
||||
*Covered*.
|
||||
|
||||

|
||||
|
||||
After a few hours, you will notice a new "assignee" assigned to the pull request.
|
||||
|
||||

|
||||
|
||||
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.
|
||||
|
||||

|
||||
|
||||
### Submission
|
||||
|
||||
You **cannot** do submission or merge of a pull request through Github.
|
||||
|
||||

|
||||
|
||||
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.
|
||||

|
||||
|
||||
1. The pull request you originally created will be closed.
|
||||

|
||||
|
||||
|
|
@ -8,7 +8,6 @@ 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
|
||||
|
|
@ -22,7 +21,6 @@ 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
|
||||
|
|
@ -31,22 +29,17 @@ for general contribution guidelines.
|
|||
- [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
|
||||
- [wenbozhu](https://github.com/wenbozhu), Google LLC
|
||||
- [yashykt](https://github.com/yashykt), Google LLC
|
||||
- [yijiem](https://github.com/yijiem), 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
|
||||
|
|
@ -93,4 +86,3 @@ for general contribution guidelines.
|
|||
- [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 -->
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
# Top level ownership
|
||||
@markdroth **/OWNERS
|
||||
@a11r **/OWNERS
|
||||
72
README.md
|
|
@ -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) |
|
||||
|
|
|
|||
27
Rakefile
|
|
@ -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', 'aarch64-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
|
||||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
|
|||
80
WORKSPACE
|
|
@ -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",
|
||||
|
|
@ -128,26 +102,6 @@ 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(
|
||||
|
|
|
|||
|
|
@ -14,4 +14,4 @@
|
|||
|
||||
# AUTO-GENERATED FROM `$REPO_ROOT/templates/_metadata.py.template`!!!
|
||||
|
||||
__version__ = """1.65.0.dev0"""
|
||||
__version__ = """1.58.2"""
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
set noparent
|
||||
@jtattermusch
|
||||
@veblush
|
||||
@gnossen
|
||||
|
||||
|
|
@ -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))
|
||||
|
|
|
|||
100
bazel/copts.bzl
|
|
@ -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": [],
|
||||
})
|
||||
|
|
|
|||
|
|
@ -16,127 +16,118 @@
|
|||
|
||||
"""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": {
|
||||
"census_test": [
|
||||
"transport_supplies_client_latency",
|
||||
],
|
||||
"core_end2end_test": [
|
||||
"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",
|
||||
],
|
||||
"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",
|
||||
"flow_control_test": [
|
||||
"peer_state_based_framing",
|
||||
"tcp_frame_size_tuning",
|
||||
"tcp_rcv_lowat",
|
||||
],
|
||||
"resolver_component_tests_runner_invoker": [
|
||||
"event_engine_dns",
|
||||
"lame_client_test": [
|
||||
"promise_based_client_call",
|
||||
],
|
||||
"logging_test": [
|
||||
"promise_based_server_call",
|
||||
],
|
||||
"resource_quota_test": [
|
||||
"free_large_allocator",
|
||||
"memory_pressure_controller",
|
||||
"unconstrained_max_quota_buffer_size",
|
||||
],
|
||||
"xds_end2end_test": [
|
||||
"pick_first_new",
|
||||
"promise_based_server_call",
|
||||
],
|
||||
},
|
||||
"on": {
|
||||
},
|
||||
},
|
||||
"ios": {
|
||||
"dbg": {
|
||||
},
|
||||
"off": {
|
||||
"census_test": [
|
||||
"transport_supplies_client_latency",
|
||||
],
|
||||
"core_end2end_test": [
|
||||
"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_listener_test": [
|
||||
"event_engine_listener",
|
||||
],
|
||||
"flow_control_test": [
|
||||
"multiping",
|
||||
"peer_state_based_framing",
|
||||
"rstpit",
|
||||
"tcp_frame_size_tuning",
|
||||
"tcp_rcv_lowat",
|
||||
],
|
||||
"lame_client_test": [
|
||||
"promise_based_client_call",
|
||||
],
|
||||
"logging_test": [
|
||||
"promise_based_server_call",
|
||||
],
|
||||
"resource_quota_test": [
|
||||
"free_large_allocator",
|
||||
"memory_pressure_controller",
|
||||
"unconstrained_max_quota_buffer_size",
|
||||
],
|
||||
"xds_end2end_test": [
|
||||
"promise_based_server_call",
|
||||
],
|
||||
},
|
||||
"on": {
|
||||
"cpp_lb_end2end_test": [
|
||||
"pick_first_new",
|
||||
],
|
||||
"lb_unit_test": [
|
||||
"pick_first_new",
|
||||
],
|
||||
"xds_end2end_test": [
|
||||
"pick_first_new",
|
||||
],
|
||||
},
|
||||
},
|
||||
"posix": {
|
||||
"dbg": {
|
||||
},
|
||||
"off": {
|
||||
"cancel_ares_query_test": [
|
||||
"event_engine_dns",
|
||||
],
|
||||
"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",
|
||||
|
|
@ -145,46 +136,33 @@ EXPERIMENTS = {
|
|||
"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",
|
||||
"flow_control_test": [
|
||||
"peer_state_based_framing",
|
||||
"tcp_frame_size_tuning",
|
||||
"tcp_rcv_lowat",
|
||||
],
|
||||
"lame_client_test": [
|
||||
"promise_based_client_call",
|
||||
],
|
||||
"logging_test": [
|
||||
"promise_based_server_call",
|
||||
],
|
||||
"resolver_component_tests_runner_invoker": [
|
||||
"event_engine_dns",
|
||||
],
|
||||
"xds_end2end_test": [
|
||||
"pick_first_new",
|
||||
"work_serializer_dispatch",
|
||||
"resource_quota_test": [
|
||||
"free_large_allocator",
|
||||
"memory_pressure_controller",
|
||||
"unconstrained_max_quota_buffer_size",
|
||||
],
|
||||
"xds_end2end_test": [
|
||||
"promise_based_server_call",
|
||||
],
|
||||
},
|
||||
"on": {
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
licenses(["notice"])
|
||||
|
||||
package(
|
||||
default_visibility = ["//visibility:public"],
|
||||
default_visibility = ["//visibility:public"]
|
||||
)
|
||||
|
||||
# This is needed for the dependency on google_cloud_cpp to work.
|
||||
|
|
|
|||
|
|
@ -27,13 +27,13 @@
|
|||
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("//bazel:test_experiments.bzl", "TEST_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 +45,6 @@ def if_not_windows(a):
|
|||
return select({
|
||||
"//:windows": [],
|
||||
"//:windows_msvc": [],
|
||||
"//:windows_clang": [],
|
||||
"//conditions:default": a,
|
||||
})
|
||||
|
||||
|
|
@ -53,23 +52,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")
|
||||
|
|
@ -81,10 +77,8 @@ def _get_external_deps(external_deps):
|
|||
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 +95,31 @@ 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:
|
||||
|
|
@ -216,9 +201,10 @@ def grpc_cc_library(
|
|||
testonly = testonly,
|
||||
linkopts = linkopts,
|
||||
includes = [
|
||||
"api/include",
|
||||
"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 +223,6 @@ def grpc_proto_library(
|
|||
name,
|
||||
srcs = [],
|
||||
deps = [],
|
||||
visibility = None,
|
||||
well_known_protos = False,
|
||||
has_services = True,
|
||||
use_external = False,
|
||||
|
|
@ -246,7 +231,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 +277,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 +295,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 +307,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 +327,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 +344,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,31 +364,10 @@ 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
|
||||
|
|
@ -459,35 +416,18 @@ def expand_tests(name, srcs, deps, tags, args, exclude_pollers, uses_polling, us
|
|||
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 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]
|
||||
|
|
@ -496,16 +436,13 @@ def expand_tests(name, srcs, deps, tags, args, exclude_pollers, uses_polling, us
|
|||
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 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]
|
||||
|
|
@ -543,7 +480,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 = {
|
||||
|
|
@ -569,22 +506,11 @@ def grpc_cc_test(name, srcs = [], deps = [], external_deps = [], args = [], data
|
|||
**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 +547,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,
|
||||
|
|
@ -739,13 +665,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 +723,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",
|
||||
],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -14,32 +14,217 @@
|
|||
"""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 = "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 = "b21994a857a7aa6d5256ffe355c735ad4c286de44c6c81dfc04edc41a8feaeef",
|
||||
strip_prefix = "boringssl-2ff4b968a7e0cfee66d9f151cb95635b43dc1d5b",
|
||||
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/2ff4b968a7e0cfee66d9f151cb95635b43dc1d5b.tar.gz",
|
||||
"https://github.com/google/boringssl/archive/2ff4b968a7e0cfee66d9f151cb95635b43dc1d5b.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -47,27 +232,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 = "76a33e2136f23971ce46c72fd697cd94dc9f73d56ab23b753c3e16854c90ddfd",
|
||||
strip_prefix = "protobuf-2c5fa078d8e86e5f4bd34e6f4c9ea9e8d7d4d44a",
|
||||
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.4
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/protocolbuffers/protobuf/archive/2c5fa078d8e86e5f4bd34e6f4c9ea9e8d7d4d44a.tar.gz",
|
||||
"https://github.com/protocolbuffers/protobuf/archive/2c5fa078d8e86e5f4bd34e6f4c9ea9e8d7d4d44a.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 +259,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 +283,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 = "4e47ca279d5ae967c506c136bd8afb42eedcaf010aebb48a0e87790cae4b488a",
|
||||
strip_prefix = "benchmark-015d1a091af6937488242b70121858bce8fd40e9",
|
||||
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",
|
||||
# v1.8.2
|
||||
"https://github.com/google/benchmark/archive/015d1a091af6937488242b70121858bce8fd40e9.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -144,11 +328,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 = "59d2976af9d6ecf001a81a35749a6e551a335b949d34918cfade07737b9d93c5",
|
||||
strip_prefix = "abseil-cpp-20230802.0",
|
||||
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/20230802.0.tar.gz",
|
||||
"https://github.com/abseil/abseil-cpp/archive/20230802.0.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -196,14 +380,26 @@ def grpc_deps():
|
|||
],
|
||||
)
|
||||
|
||||
if "upb" not in native.existing_rules():
|
||||
http_archive(
|
||||
name = "upb",
|
||||
sha256 = "c29fbd26eb19f388a1894099fae5ae599210be22926e1e1694c0ed1284f1c151",
|
||||
strip_prefix = "upb-455cfdb8ae60a1763e6d924e36851c6897a781bb",
|
||||
urls = [
|
||||
# https://github.com/protocolbuffers/upb/commits/23.x
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/protocolbuffers/upb/archive/455cfdb8ae60a1763e6d924e36851c6897a781bb.tar.gz",
|
||||
"https://github.com/protocolbuffers/upb/archive/455cfdb8ae60a1763e6d924e36851c6897a781bb.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
if "envoy_api" not in native.existing_rules():
|
||||
http_archive(
|
||||
name = "envoy_api",
|
||||
sha256 = "ddd3beedda1178a79e0d988f76f362002aced09749452515853f106e22bd2249",
|
||||
strip_prefix = "data-plane-api-78f198cf96ecdc7120ef640406770aa01af775c4",
|
||||
sha256 = "6fd3496c82919a433219733819a93b56699519a193126959e9c4fedc25e70663",
|
||||
strip_prefix = "data-plane-api-e53e7bbd012f81965f2e79848ad9a58ceb67201f",
|
||||
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/e53e7bbd012f81965f2e79848ad9a58ceb67201f.tar.gz",
|
||||
"https://github.com/envoyproxy/data-plane-api/archive/e53e7bbd012f81965f2e79848ad9a58ceb67201f.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -220,20 +416,20 @@ 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",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -252,10 +448,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 +478,36 @@ 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",
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/cncf/xds/archive/e9ce68804cb4e64cab5a52e3c8baf840d4ff87b7.tar.gz",
|
||||
"https://github.com/cncf/xds/archive/e9ce68804cb4e64cab5a52e3c8baf840d4ff87b7.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
if "io_opentelemetry_cpp" not in native.existing_rules():
|
||||
http_archive(
|
||||
name = "io_opentelemetry_cpp",
|
||||
sha256 = "ed681d20a684b7d485a49288e7cfb2d182bf882e5c112c5f2fa3f9e9da2278fc",
|
||||
strip_prefix = "opentelemetry-cpp-4bd64c9a336fd438d6c4c9dad2e6b61b0585311f",
|
||||
sha256 = "668de24f81c8d36d75092ad9dcb02a97cd41473adbe72485ece05e336db48249",
|
||||
strip_prefix = "opentelemetry-cpp-1.9.1",
|
||||
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",
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/open-telemetry/opentelemetry-cpp/archive/refs/tags/v1.9.1.tar.gz",
|
||||
"https://github.com/open-telemetry/opentelemetry-cpp/archive/refs/tags/v1.9.1.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",
|
||||
sha256 = "371d01b03c7e2604d671b8fa1c86710abe3b524a78bc2705a6bb4de715696755",
|
||||
strip_prefix = "google-cloud-cpp-2.14.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/googleapis/google-cloud-cpp/archive/refs/tags/v2.14.0.tar.gz",
|
||||
"https://github.com/googleapis/google-cloud-cpp/archive/refs/tags/v2.14.0.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -341,6 +520,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(
|
||||
|
|
@ -405,11 +593,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",
|
||||
)
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ 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 +49,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
|
||||
|
|
@ -72,5 +74,3 @@ def grpc_extra_deps(ignore_version_differences = False):
|
|||
)
|
||||
|
||||
google_cloud_cpp_deps()
|
||||
|
||||
py_repositories()
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
],
|
||||
)
|
||||
|
|
@ -110,10 +110,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"),
|
||||
|
|
@ -166,10 +166,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"),
|
||||
|
|
@ -222,11 +222,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 +252,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 +274,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 +287,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 +301,5 @@ def py_grpc_library(
|
|||
deps = srcs,
|
||||
py_deps = deps,
|
||||
strip_prefixes = strip_prefixes,
|
||||
grpc_library = grpc_library,
|
||||
**kwargs
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
7.1.0
|
||||
6.5.0
|
||||
6.3.2
|
||||
5.4.1
|
||||
|
|
|
|||
|
|
@ -16,16 +16,6 @@
|
|||
|
||||
"""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": {
|
||||
|
|
|
|||
|
|
@ -57,12 +57,17 @@ 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
|
||||
|
||||
upload github.com/bazelbuild/bazel/releases/download/6.3.2/bazel-6.3.2-linux-x86_64
|
||||
upload github.com/bazelbuild/bazel/releases/download/6.3.2/bazel-6.3.2-darwin-x86_64
|
||||
upload github.com/bazelbuild/bazel/releases/download/6.3.2/bazel-6.3.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
|
||||
|
|
|
|||
|
|
@ -19,12 +19,8 @@ extend-exclude = '''
|
|||
| 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/.*
|
||||
)
|
||||
'''
|
||||
|
||||
|
|
@ -34,6 +30,7 @@ line_length = 80
|
|||
src_paths = [
|
||||
"examples/python/data_transmission",
|
||||
"examples/python/async_streaming",
|
||||
"tools/run_tests/xds_k8s_test_driver",
|
||||
"src/python/grpcio_tests",
|
||||
"tools/run_tests",
|
||||
]
|
||||
|
|
@ -43,12 +40,11 @@ known_first_party = [
|
|||
]
|
||||
known_third_party = ["grpc"]
|
||||
skip_glob = [
|
||||
"*/third_party/*",
|
||||
"third_party/*",
|
||||
"*/env/*",
|
||||
"*pb2*.py",
|
||||
"*pb2*.pyi",
|
||||
"**/site-packages/**/*",
|
||||
"tools/distrib/python/xds_protos/*",
|
||||
]
|
||||
single_line_exclusions = ["typing"]
|
||||
force_single_line = true
|
||||
|
|
|
|||
|
|
@ -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-35.dll'
|
||||
end
|
||||
|
|
|
|||
|
|
@ -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: 35.0.0
|
||||
csharp_major_version: 2
|
||||
g_stands_for: gnarly
|
||||
protobuf_version: 3.26.1
|
||||
version: 1.65.0-dev
|
||||
g_stands_for: goku
|
||||
protobuf_version: 3.23.4
|
||||
version: 1.58.2
|
||||
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,8 +127,12 @@ 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:
|
||||
abseil:
|
||||
CPPFLAGS: -g -Ithird_party/abseil-cpp
|
||||
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
|
||||
|
|
@ -145,9 +149,8 @@ defaults:
|
|||
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
|
||||
|
|
@ -199,18 +202,10 @@ ruby_gem:
|
|||
- 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
|
||||
- upb
|
||||
- re2
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
set noparent
|
||||
@jtattermusch
|
||||
@apolcyn
|
||||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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()")
|
||||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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()")
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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.3.2`](https://github.com/bazelbuild/bazel/releases/tag/6.3.2)
|
||||
- [`5.4.1`](https://github.com/bazelbuild/bazel/releases/tag/5.4.1)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -58,10 +58,3 @@
|
|||
- 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)
|
||||
|
|
|
|||
|
|
@ -58,25 +58,18 @@ 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 | | | |
|
||||
mTLS Credentials in xDS Bootstrap File | [A65](https://github.com/grpc/proposal/blob/master/A65-xds-mtls-creds-in-bootstrap.md) | v1.57.0 | | | |
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 455 KiB |
|
Before Width: | Height: | Size: 530 KiB |
|
Before Width: | Height: | Size: 389 KiB |
|
Before Width: | Height: | Size: 500 KiB |
|
Before Width: | Height: | Size: 201 KiB |
|
Before Width: | Height: | Size: 173 KiB |
|
Before Width: | Height: | Size: 506 KiB |
|
Before Width: | Height: | Size: 374 KiB |
|
Before Width: | Height: | Size: 523 KiB |
|
Before Width: | Height: | Size: 524 KiB |
|
Before Width: | Height: | Size: 106 KiB |
|
Before Width: | Height: | Size: 540 KiB |
|
Before Width: | Height: | Size: 343 KiB |
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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),)``.
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
gRPC Python Observability
|
||||
=========================
|
||||
|
||||
Module Contents
|
||||
---------------
|
||||
|
||||
.. automodule:: grpc_observability
|
||||
|
|
@ -18,7 +18,6 @@ API Reference
|
|||
grpc_reflection
|
||||
grpc_status
|
||||
grpc_testing
|
||||
grpc_observability
|
||||
glossary
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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": [
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"],
|
||||
|
|
|
|||
|
|
@ -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"],
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,54 +0,0 @@
|
|||
# Copyright 2024 the 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"])
|
||||
|
||||
cc_library(
|
||||
name = "helper",
|
||||
srcs = ["helper.cc"],
|
||||
hdrs = ["helper.h"],
|
||||
)
|
||||
|
||||
cc_binary(
|
||||
name = "ssl_client",
|
||||
srcs = ["ssl_client.cc"],
|
||||
data = [
|
||||
"credentials/root.crt",
|
||||
],
|
||||
defines = ["BAZEL_BUILD"],
|
||||
deps = [
|
||||
":helper",
|
||||
"//:grpc++",
|
||||
"//examples/protos:helloworld_cc_grpc",
|
||||
"@com_google_absl//absl/flags:flag",
|
||||
"@com_google_absl//absl/flags:parse",
|
||||
],
|
||||
)
|
||||
|
||||
cc_binary(
|
||||
name = "ssl_server",
|
||||
srcs = ["ssl_server.cc"],
|
||||
data = [
|
||||
"credentials/localhost.crt",
|
||||
"credentials/localhost.key",
|
||||
],
|
||||
defines = ["BAZEL_BUILD"],
|
||||
deps = [
|
||||
":helper",
|
||||
"//:grpc++",
|
||||
"//examples/protos:helloworld_cc_grpc",
|
||||
"@com_google_absl//absl/flags:flag",
|
||||
"@com_google_absl//absl/flags:parse",
|
||||
],
|
||||
)
|
||||
|
|
@ -1,77 +0,0 @@
|
|||
# Copyright 2024 the 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.
|
||||
#
|
||||
# cmake build file for C++ keyvaluestore example.
|
||||
# Assumes protobuf and gRPC have been installed using cmake.
|
||||
# See cmake_externalproject/CMakeLists.txt for all-in-one cmake build
|
||||
# that automatically builds all the dependencies before building keyvaluestore.
|
||||
|
||||
cmake_minimum_required(VERSION 3.8)
|
||||
|
||||
project(Cancellation C CXX)
|
||||
|
||||
include(../cmake/common.cmake)
|
||||
|
||||
# Proto files
|
||||
get_filename_component(hw_proto "../../protos/helloworld.proto" ABSOLUTE)
|
||||
get_filename_component(hw_proto_path "${hw_proto}" PATH)
|
||||
|
||||
# Generated sources
|
||||
set(hw_proto_srcs "${CMAKE_CURRENT_BINARY_DIR}/helloworld.pb.cc")
|
||||
set(hw_proto_hdrs "${CMAKE_CURRENT_BINARY_DIR}/helloworld.pb.h")
|
||||
set(hw_grpc_srcs "${CMAKE_CURRENT_BINARY_DIR}/helloworld.grpc.pb.cc")
|
||||
set(hw_grpc_hdrs "${CMAKE_CURRENT_BINARY_DIR}/helloworld.grpc.pb.h")
|
||||
add_custom_command(
|
||||
OUTPUT "${hw_proto_srcs}" "${hw_proto_hdrs}" "${hw_grpc_srcs}" "${hw_grpc_hdrs}"
|
||||
COMMAND ${_PROTOBUF_PROTOC}
|
||||
ARGS --grpc_out "${CMAKE_CURRENT_BINARY_DIR}"
|
||||
--cpp_out "${CMAKE_CURRENT_BINARY_DIR}"
|
||||
-I "${hw_proto_path}"
|
||||
--plugin=protoc-gen-grpc="${_GRPC_CPP_PLUGIN_EXECUTABLE}"
|
||||
"${hw_proto}"
|
||||
DEPENDS "${hw_proto}")
|
||||
|
||||
# Include generated *.pb.h files
|
||||
include_directories("${CMAKE_CURRENT_BINARY_DIR}")
|
||||
|
||||
# hw_grpc_proto
|
||||
add_library(hw_grpc_proto
|
||||
${hw_grpc_srcs}
|
||||
${hw_grpc_hdrs}
|
||||
${hw_proto_srcs}
|
||||
${hw_proto_hdrs})
|
||||
target_link_libraries(hw_grpc_proto
|
||||
${_REFLECTION}
|
||||
${_GRPC_GRPCPP}
|
||||
${_PROTOBUF_LIBPROTOBUF})
|
||||
|
||||
# example helper
|
||||
add_library(helper
|
||||
"helper.h"
|
||||
"helper.cc")
|
||||
|
||||
# Targets greeter_(client|server)
|
||||
foreach(_target
|
||||
ssl_client ssl_server)
|
||||
add_executable(${_target} "${_target}.cc")
|
||||
target_link_libraries(${_target}
|
||||
helper
|
||||
hw_grpc_proto
|
||||
absl::flags
|
||||
absl::flags_parse
|
||||
absl::strings
|
||||
${_REFLECTION}
|
||||
${_GRPC_GRPCPP}
|
||||
${_PROTOBUF_LIBPROTOBUF})
|
||||
endforeach()
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
# Authentication Example
|
||||
|
||||
## Overview
|
||||
|
||||
SSL is a commonly used cryptographic protocol to provide end-to-end
|
||||
communication security. In the example, we show how to set up a server
|
||||
authenticated SSL connection to transmit RPC.
|
||||
|
||||
We provide `grpc::SslServerCredentials` and `grpc::SslCredentials` types
|
||||
to use SSL conections.
|
||||
|
||||
In our example, we use the public/private keys created ahead:
|
||||
* "localhost.crt" contains the server certificate (public key).
|
||||
* "localhost.key" contains the server private key.
|
||||
* "root.crt" contains the certificate (certificate authority)
|
||||
that can verify the server's certificate.
|
||||
|
||||
### Try it!
|
||||
|
||||
Once you have working gRPC, you can build this example using either bazel or cmake.
|
||||
Make sure to run those at this directory so that they can read credential files properly.
|
||||
|
||||
Run the server, which will listen on port 50051:
|
||||
|
||||
```sh
|
||||
$ ./ssl_server
|
||||
```
|
||||
|
||||
Run the client (in a different terminal):
|
||||
|
||||
```sh
|
||||
$ ./ssl_client
|
||||
```
|
||||
|
||||
If things go smoothly, you will see the client output:
|
||||
|
||||
```
|
||||
Greeter received: Hello world
|
||||
```
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
MIIDFjCCAf4CCQCzrLIhrWa55zANBgkqhkiG9w0BAQsFADBCMQswCQYDVQQGEwJV
|
||||
UzETMBEGA1UECAwKQ2FsaWZvcm5pYTEPMA0GA1UECgwGR29vZ2xlMQ0wCwYDVQQL
|
||||
DARnUlBDMCAXDTE5MDYyNDIyMjIzM1oYDzIxMTkwNTMxMjIyMjMzWjBWMQswCQYD
|
||||
VQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEPMA0GA1UECgwGR29vZ2xlMQ0w
|
||||
CwYDVQQLDARnUlBDMRIwEAYDVQQDDAlsb2NhbGhvc3QwggEiMA0GCSqGSIb3DQEB
|
||||
AQUAA4IBDwAwggEKAoIBAQCtCW0TjugnIUu8BEVIYvdMP+/2GENQDjZhZ8eKR5C6
|
||||
toDGbgjsDtt/GxISAg4cg70fIvy0XolnGPZodvfHDM4lJ7yHBOdZD8TXQoE6okR7
|
||||
HZuLUJ20M0pXgWqtRewKRUjuYsSDXBnzLiZw1dcv9nGpo+Bqa8NonpiGRRpEkshF
|
||||
D6T9KU9Ts/x+wMQBIra2Gj0UMh79jPhUuxcYAQA0JQGivnOtdwuPiumpnUT8j8h6
|
||||
tWg5l01EsCZWJecCF85KnGpJEVYPyPqBqGsy0nGS9plGotOWF87+jyUQt+KD63xA
|
||||
aBmTro86mKDDKEK4JvzjVeMGz2UbVcLPiiZnErTFaiXJAgMBAAEwDQYJKoZIhvcN
|
||||
AQELBQADggEBAKsDgOPCWp5WCy17vJbRlgfgk05sVNIHZtzrmdswjBmvSg8MUpep
|
||||
XqcPNUpsljAXsf9UM5IFEMRdilUsFGWvHjBEtNAW8WUK9UV18WRuU//0w1Mp5HAN
|
||||
xUEKb4BoyZr65vlCnTR+AR5c9FfPvLibhr5qHs2RA8Y3GyLOcGqBWed87jhdQLCc
|
||||
P1bxB+96le5JeXq0tw215lxonI2/3ZYVK4/ok9gwXrQoWm8YieJqitk/ZQ4S17/4
|
||||
pynHtDfdxLn23EXeGx+UTxJGfpRmhEZdJ+MN7QGYoomzx5qS5XoYKxRNrDlirJpr
|
||||
OqXIn8E1it+6d5gOZfuHawcNGhRLplE/pfA=
|
||||
-----END CERTIFICATE-----
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIIEogIBAAKCAQEArQltE47oJyFLvARFSGL3TD/v9hhDUA42YWfHikeQuraAxm4I
|
||||
7A7bfxsSEgIOHIO9HyL8tF6JZxj2aHb3xwzOJSe8hwTnWQ/E10KBOqJEex2bi1Cd
|
||||
tDNKV4FqrUXsCkVI7mLEg1wZ8y4mcNXXL/ZxqaPgamvDaJ6YhkUaRJLIRQ+k/SlP
|
||||
U7P8fsDEASK2tho9FDIe/Yz4VLsXGAEANCUBor5zrXcLj4rpqZ1E/I/IerVoOZdN
|
||||
RLAmViXnAhfOSpxqSRFWD8j6gahrMtJxkvaZRqLTlhfO/o8lELfig+t8QGgZk66P
|
||||
OpigwyhCuCb841XjBs9lG1XCz4omZxK0xWolyQIDAQABAoIBADeq/Kh6JT3RfGf0
|
||||
h8WN8TlaqHxnueAbcmtL0+oss+cdp7gu1jf7X6o4r0uT1a5ew40s2Fe+wj2kzkE1
|
||||
ZOlouTlC22gkr7j7Vbxa7PBMG/Pvxoa/XL0IczZLsGImSJXVTG1E4SvRiZeulTdf
|
||||
1GbdxhtpWV1jZe5Wd4Na3+SHxF5S7m3PrHiZlYdz1ND+8XZs1NlL9+ej72qSFul9
|
||||
t/QjMWJ9pky/Wad5abnRLRyOsg+BsgnXbkUy2rD89ZxFMLda9pzXo3TPyAlBHonr
|
||||
mkEsE4eRMWMpjBM79JbeyDdHn/cs/LjAZrzeDf7ugXr2CHQpKaM5O0PsNHezJII9
|
||||
L5kCfzECgYEA4M/rz1UP1/BJoSqigUlSs0tPAg8a5UlkVsh6Osuq72IPNo8qg/Fw
|
||||
oV/IiIS+q+obRcFj1Od3PGdTpCJwW5dzd2fXBQGmGdj0HucnCrs13RtBh91JiF5i
|
||||
y/YYI9KfgOG2ZT9gG68T0gTs6jRrS3Qd83npqjrkJqMOd7s00MK9tUcCgYEAxQq7
|
||||
T541oCYHSBRIIb0IrR25krZy9caxzCqPDwOcuuhaCqCiaq+ATvOWlSfgecm4eH0K
|
||||
PCH0xlWxG0auPEwm4pA8+/WR/XJwscPZMuoht1EoKy1his4eKx/s7hHNeO6KOF0V
|
||||
Y/zqIiuZnEwUoKbn7EqqNFSTT65PJKyGsICJFG8CgYAfaw9yl1myfQNdQb8aQGwN
|
||||
YJ33FLNWje427qeeZe5KrDKiFloDvI9YDjHRWnPnRL1w/zj7fSm9yFb5HlMDieP6
|
||||
MQnsyjEzdY2QcA+VwVoiv3dmDHgFVeOKy6bOAtaFxYWfGr9MvygO9t9BT/gawGyb
|
||||
JVORlc9i0vDnrMMR1dV7awKBgBpTWLtGc/u1mPt0Wj7HtsUKV6TWY32a0l5owTxM
|
||||
S0BdksogtBJ06DukJ9Y9wawD23WdnyRxlPZ6tHLkeprrwbY7dypioOKvy4a0l+xJ
|
||||
g7+uRCOgqIuXBkjUtx8HmeAyXp0xMo5tWArAsIFFWOwt4IadYygitJvMuh44PraO
|
||||
NcJZAoGADEiV0dheXUCVr8DrtSom8DQMj92/G/FIYjXL8OUhh0+F+YlYP0+F8PEU
|
||||
yYIWEqL/S5tVKYshimUXQa537JcRKsTVJBG/ZKD2kuqgOc72zQy3oplimXeJDCXY
|
||||
h2eAQ0u8GN6tN9C4t8Kp4a3y6FGsxgu+UTxdnL3YQ+yHAVhtCzo=
|
||||
-----END RSA PRIVATE KEY-----
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
MIIDWTCCAkGgAwIBAgIJAPOConZMwykwMA0GCSqGSIb3DQEBCwUAMEIxCzAJBgNV
|
||||
BAYTAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlhMQ8wDQYDVQQKDAZHb29nbGUxDTAL
|
||||
BgNVBAsMBGdSUEMwIBcNMTkwNjI0MjIyMDA3WhgPMjExOTA1MzEyMjIwMDdaMEIx
|
||||
CzAJBgNVBAYTAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlhMQ8wDQYDVQQKDAZHb29n
|
||||
bGUxDTALBgNVBAsMBGdSUEMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
|
||||
AQCwqei3TfyLidnQNDJ2lierMYo229K92DuORni7nSjJQ59Jc3dNMsmqGQJjCD8o
|
||||
6mTlKM/oCbs27Wpx+OxcOLvT95j2kiDGca1fCvaMdguIod09SWiyMpv/hp0trLv7
|
||||
NJIKHznath6rHYX2Ii3fZ1yCPzyQbEPSAA+GNpoNm1v1ZWmWKke9v7vLlS3inNlW
|
||||
Mt9jepK7DrtbNZnVDjeItnppBSbVYRMxIyNHkepFbqXx5TpkCvl4M4XQZw9bfSxQ
|
||||
i3WZ3q+T1Tw//OUdPNc+OfMhu0MA0QoMwikskP0NaIC3dbJZ5Ogx0RcnaB4E+9C6
|
||||
O/znUEh3WuKVl5HXBF+UwWoFAgMBAAGjUDBOMB0GA1UdDgQWBBRm3JIgzgK4G97J
|
||||
fbMGatWMZc7V3jAfBgNVHSMEGDAWgBRm3JIgzgK4G97JfbMGatWMZc7V3jAMBgNV
|
||||
HRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQCNiV8x41if094ry2srS0YucpiN
|
||||
3rTPk08FOLsENTMYai524TGXJti1P6ofGr5KXCL0uxTByHE3fEiMMud2TIY5iHQo
|
||||
Y4mzDTTcb+Q7yKHwYZMlcp6nO8W+NeY5t+S0JPHhb8deKWepcN2UpXBUYQLw7AiE
|
||||
l96T9Gi+vC9h/XE5IVwHFQXTxf5UYzXtW1nfapvrOONg/ms41dgmrRKIi+knWfiJ
|
||||
FdHpHX2sfDAoJtnpEISX+nxRGNVTLY64utXWm4yxaZJshvy2s8zWJgRg7rtwAhTT
|
||||
Np9E9MnihXLEmDI4Co9XlLPJyZFmqImsbmVuKFeQOCiLAoPJaMI2lbi7fiTo
|
||||
-----END CERTIFICATE-----
|
||||