Compare commits
40 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
e241f37bef | |
|
|
adbc30b6e1 | |
|
|
6d63fc64a8 | |
|
|
dcaa2f2ca8 | |
|
|
98714fe563 | |
|
|
c0ca93f2ed | |
|
|
c1a7843b5c | |
|
|
eb398b340b | |
|
|
1c1c09e4b3 | |
|
|
30d1affbe0 | |
|
|
0cc421cac0 | |
|
|
7412a724c7 | |
|
|
37f03b2ab3 | |
|
|
5c2da7ee07 | |
|
|
5ad5f2ef5c | |
|
|
5b6c99070f | |
|
|
0e34ec3396 | |
|
|
185a0d4571 | |
|
|
07411bcfd3 | |
|
|
25b07ed681 | |
|
|
a70d3ee73f | |
|
|
0b02dfdb6f | |
|
|
ab687a84d4 | |
|
|
a80a8f74b8 | |
|
|
e80c144d1f | |
|
|
1d3b8204a7 | |
|
|
81e435aff0 | |
|
|
ceaa9b3cb2 | |
|
|
8f8edfd04b | |
|
|
b3c764cb6c | |
|
|
dee197f4fb | |
|
|
babe8050a1 | |
|
|
ef66748f67 | |
|
|
4898349489 | |
|
|
bf3702d2b9 | |
|
|
e3aea36f66 | |
|
|
b5cd9eae5c | |
|
|
095988b200 | |
|
|
ea0ca3534b | |
|
|
a6948c176f |
|
|
@ -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 +0,0 @@
|
|||
7.1.0
|
||||
|
|
@ -5,6 +5,9 @@ DerivePointerAlignment: false
|
|||
PointerAlignment: Left
|
||||
IncludeBlocks: Regroup
|
||||
IncludeCategories:
|
||||
# port_platform.h is before almost everything
|
||||
- Regex: '^<grpc/(support|impl/codegen)/port_platform.h>'
|
||||
Priority: -100
|
||||
# ruby.h is even more first if it's included
|
||||
- Regex: '^<ruby/ruby.h>'
|
||||
Priority: -200
|
||||
|
|
@ -43,8 +46,4 @@ Language: ObjC
|
|||
BasedOnStyle: Google
|
||||
ColumnLimit: 100
|
||||
ObjCBlockIndentWidth: 2
|
||||
---
|
||||
Language: Proto
|
||||
BasedOnStyle: Google
|
||||
ColumnLimit: 100
|
||||
...
|
||||
|
|
|
|||
42
.clang-tidy
|
|
@ -1,42 +1,34 @@
|
|||
---
|
||||
# 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.
|
||||
#
|
||||
# - google-upgrade-googletest-case
|
||||
# This requires googletest 1.10 which is higher than ones installed on many linux distributions.
|
||||
#
|
||||
# - 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.
|
||||
#
|
||||
# - bugprone-assignment-in-if-condition
|
||||
# - bugprone-branch-clone
|
||||
# - bugprone-easily-swappable-parameters
|
||||
# - bugprone-easily-swappable-parameters,
|
||||
# - bugprone-implicit-widening-of-multiplication-result
|
||||
# - bugprone-infinite-loop
|
||||
# - bugprone-narrowing-conversions
|
||||
# - 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
|
||||
# - clang-diagnostic-unused-function
|
||||
# - google-readability-avoid-underscore-in-googletest-name
|
||||
# - google-runtime-int
|
||||
# - google-runtime-references
|
||||
# - modernize-avoid-bind
|
||||
|
|
@ -51,27 +43,20 @@
|
|||
# - 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 +64,17 @@ 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-readability-avoid-underscore-in-googletest-name,
|
||||
-google-runtime-int,
|
||||
-google-runtime-references,
|
||||
-google-upgrade-googletest-case,
|
||||
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,
|
||||
|
|
@ -127,22 +108,17 @@ Checks: '-*,
|
|||
modernize-use-nullptr,
|
||||
modernize-use-override,
|
||||
modernize-use-transparent-functors,
|
||||
readability-braces-around-statements,
|
||||
readability-const-return-type,
|
||||
readability-container-size-empty,
|
||||
readability-delete-null-pointer,
|
||||
readability-deleted-default,
|
||||
readability-duplicate-include,
|
||||
readability-function-size,
|
||||
readability-inconsistent-declaration-parameter-name,
|
||||
readability-misleading-indentation,
|
||||
readability-misplaced-array-index,
|
||||
readability-redundant-access-specifiers,
|
||||
readability-redundant-control-flow,
|
||||
readability-redundant-function-ptr-dereference,
|
||||
readability-redundant-smartptr-get,
|
||||
-readability-redundant-string-cstr,
|
||||
readability-redundant-string-init,
|
||||
readability-simplify-boolean-expr,
|
||||
readability-static-definition-in-anonymous-namespace,
|
||||
readability-string-compare,
|
||||
|
|
@ -155,7 +131,5 @@ CheckOptions:
|
|||
value: 'absl::make_unique'
|
||||
- key: modernize-make-unique.MakeSmartPtrFunctionHeader
|
||||
value: 'absl/memory/memory.h'
|
||||
- key: readability-braces-around-statements.ShortStatementLines
|
||||
- key: google-readability-braces-around-statements.ShortStatementLines
|
||||
value: 1
|
||||
- key: readability-simplify-boolean-expr.SimplifyDeMorgan
|
||||
value: false
|
||||
|
|
|
|||
|
|
@ -1,6 +0,0 @@
|
|||
bazel-bin
|
||||
bazel-grpc
|
||||
bazel-out
|
||||
build
|
||||
.cache
|
||||
.git
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
# .git-blame-ignore-revs
|
||||
# Migrated python code style from yapf to black
|
||||
de6ed9ba9fd59f753bbfd4c9a88ff15e03a89de7
|
||||
|
|
@ -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,30 +12,22 @@ gRPC-ProtoRPC.podspec linguist-generated=true
|
|||
gRPC-RxLibrary.podspec linguist-generated=true
|
||||
gRPC.podspec linguist-generated=true
|
||||
grpc.gemspec linguist-generated=true
|
||||
grpc.gyp linguist-generated=true
|
||||
grpc.def linguist-generated=true
|
||||
package.xml linguist-generated=true
|
||||
Package.swift linguist-generated=true
|
||||
binding.gyp linguist-generated=true
|
||||
src/python/grpcio/grpc_core_dependencies.py linguist-generated=true
|
||||
src/ruby/ext/grpc/rb_grpc_imports.generated.h linguist-generated=true
|
||||
src/ruby/ext/grpc/rb_grpc_imports.generated.c linguist-generated=true
|
||||
include/grpc/module.modulemap linguist-generated=true
|
||||
test/core/end2end/end2end_tests.cc linguist-generated=true
|
||||
test/core/security/grpc_tls_credentials_options_comparator_test.cc linguist-generated=true
|
||||
tools/doxygen/Doxyfile.c++ linguist-generated=true
|
||||
test/core/surface/public_headers_must_be_c89.c linguist-generated=true
|
||||
tools/doxygen/Doxyfile.c++.internal linguist-generated=true
|
||||
tools/doxygen/Doxyfile.core linguist-generated=true
|
||||
tools/doxygen/Doxyfile.core.internal linguist-generated=true
|
||||
tools/run_tests/sources_and_headers.json linguist-generated=true
|
||||
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
|
||||
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
|
||||
src/core/lib/transport/static_metadata.h linguist-generated=true
|
||||
src/core/lib/transport/static_metadata.cc 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,9 +2,7 @@
|
|||
name: Report a gRPC Python bug
|
||||
about: Create a report to help us improve
|
||||
labels: kind/bug, priority/P2, lang/Python
|
||||
assignees:
|
||||
- gnossen
|
||||
- XuanWang-Amos
|
||||
assignees: gnossen
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,7 @@
|
|||
name: Request a gRPC Python feature
|
||||
about: Suggest an idea for this project
|
||||
labels: kind/enhancement, priority/P2, lang/Python
|
||||
assignees:
|
||||
- gnossen
|
||||
- XuanWang-Amos
|
||||
assignees: gnossen
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -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,45 @@
|
|||
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/**
|
||||
|
||||
lang/ObjC:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- examples/objective-c/**
|
||||
- src/compiler/objective_c*
|
||||
- src/objective-c/**
|
||||
- examples/objective-c/**
|
||||
- src/objective-c/**
|
||||
|
||||
lang/php:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- examples/php/**
|
||||
- src/compiler/php*
|
||||
- src/php/**
|
||||
- examples/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'
|
||||
- examples/python/**
|
||||
- src/python/**
|
||||
|
||||
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/ruby/**
|
||||
|
||||
"lang/C#":
|
||||
- src/csharp/**
|
||||
|
||||
|
|
|
|||
|
|
@ -5,9 +5,6 @@ mergeable:
|
|||
- must_exclude:
|
||||
regex: '^disposition/DO NOT MERGE'
|
||||
message: 'Pull request marked not mergeable'
|
||||
- must_exclude:
|
||||
regex: '^disposition/Needs Internal Changes'
|
||||
message: 'Pull request must be cherrypicked. Remove this label when ready to merge.'
|
||||
- or:
|
||||
- and:
|
||||
- must_include:
|
||||
|
|
|
|||
|
|
@ -1,16 +0,0 @@
|
|||
{
|
||||
"LABEL": {
|
||||
"name": "PR title format",
|
||||
"color": "EEEEEE"
|
||||
},
|
||||
"CHECKS": {
|
||||
"regexp": "^((\\[[^\\]]+\\])+|Revert|Automated fix for) ",
|
||||
"regexpFlags": "i",
|
||||
"ignoreLabels": []
|
||||
},
|
||||
"MESSAGES": {
|
||||
"success": "All OK",
|
||||
"failure": "PR title should be like this: '[component] Brief summary'",
|
||||
"notice": ""
|
||||
}
|
||||
}
|
||||
|
|
@ -1,35 +1,29 @@
|
|||
name: PR AutoFix
|
||||
on: [push]
|
||||
permissions: {}
|
||||
jobs:
|
||||
PRAutoFix:
|
||||
permissions:
|
||||
actions: write # to cancel/stop running workflows (styfle/cancel-workflow-action)
|
||||
contents: write # to create branch (peter-evans/create-pull-request)
|
||||
pull-requests: write # to create a PR (peter-evans/create-pull-request)
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
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 +32,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 +59,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 +68,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
|
||||
|
|
@ -85,12 +78,12 @@ jobs:
|
|||
git fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 upstream master
|
||||
# Run the things!
|
||||
- name: clang-tidy fixes
|
||||
run: ANDROID_NDK_HOME= ${{ github.workspace }}/tools/distrib/clang_tidy_code.sh --fix --only-changed || true
|
||||
run: ${{ github.workspace }}/tools/distrib/clang_tidy_code.sh --fix --only-changed || true
|
||||
- name: Run sanitize
|
||||
run: ANDROID_NDK_HOME= ${{ github.workspace }}/tools/distrib/sanitize.sh
|
||||
run: ${{ 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
|
||||
|
|
|
|||
|
|
@ -1,19 +1,12 @@
|
|||
name: PR Auto Tag
|
||||
name: PR AutoTag
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [opened, reopened, synchronize, edited]
|
||||
permissions:
|
||||
contents: read # to determine modified files (actions/labeler)
|
||||
|
||||
types: [opened, reopened, synchronized, edited]
|
||||
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
|
||||
- uses: actions/labeler@v3
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
sync-labels: false
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
# C/C++ build outputs
|
||||
.build/
|
||||
build/
|
||||
bins
|
||||
gens
|
||||
libs
|
||||
|
|
@ -17,13 +16,13 @@ cython_debug/
|
|||
dist/
|
||||
htmlcov/
|
||||
py3*/
|
||||
pyb/
|
||||
python_build/
|
||||
python_pylint_venv/
|
||||
src/python/grpcio_*/=*
|
||||
src/python/grpcio_*/build/
|
||||
src/python/grpcio_*/LICENSE
|
||||
src/python/grpcio_status/grpc_status/google/rpc/status.proto
|
||||
black_virtual_environment/
|
||||
yapf_virtual_environment/
|
||||
isort_virtual_environment/
|
||||
|
||||
# Node installation output
|
||||
|
|
@ -55,7 +54,6 @@ coverage
|
|||
|
||||
# vim temp files
|
||||
.*.swp
|
||||
.*.swo
|
||||
|
||||
# Makefile's cache
|
||||
cache.mk
|
||||
|
|
@ -181,6 +179,3 @@ iwyu_build/
|
|||
# fuzzer logs
|
||||
fuzz-*.log
|
||||
|
||||
# bazel module files (MODULE.bazel will need to be removed here)
|
||||
MODULE.bazel
|
||||
MODULE.bazel.lock
|
||||
|
|
|
|||
|
|
@ -1,45 +1,3 @@
|
|||
[submodule "third_party/abseil-cpp"]
|
||||
path = third_party/abseil-cpp
|
||||
url = https://github.com/abseil/abseil-cpp.git
|
||||
[submodule "third_party/benchmark"]
|
||||
path = third_party/benchmark
|
||||
url = https://github.com/google/benchmark
|
||||
[submodule "third_party/bloaty"]
|
||||
path = third_party/bloaty
|
||||
url = https://github.com/google/bloaty.git
|
||||
[submodule "third_party/boringssl-with-bazel"]
|
||||
path = third_party/boringssl-with-bazel
|
||||
url = https://github.com/google/boringssl.git
|
||||
[submodule "third_party/cares/cares"]
|
||||
path = third_party/cares/cares
|
||||
url = https://github.com/c-ares/c-ares.git
|
||||
[submodule "third_party/envoy-api"]
|
||||
path = third_party/envoy-api
|
||||
url = https://github.com/envoyproxy/data-plane-api.git
|
||||
[submodule "third_party/googleapis"]
|
||||
path = third_party/googleapis
|
||||
url = https://github.com/googleapis/googleapis.git
|
||||
[submodule "third_party/googletest"]
|
||||
path = third_party/googletest
|
||||
url = https://github.com/google/googletest.git
|
||||
[submodule "third_party/opencensus-proto"]
|
||||
path = third_party/opencensus-proto
|
||||
url = https://github.com/census-instrumentation/opencensus-proto.git
|
||||
[submodule "third_party/opentelemetry"]
|
||||
path = third_party/opentelemetry
|
||||
url = https://github.com/open-telemetry/opentelemetry-proto.git
|
||||
[submodule "third_party/protobuf"]
|
||||
path = third_party/protobuf
|
||||
url = https://github.com/protocolbuffers/protobuf.git
|
||||
[submodule "third_party/protoc-gen-validate"]
|
||||
path = third_party/protoc-gen-validate
|
||||
url = https://github.com/envoyproxy/protoc-gen-validate.git
|
||||
[submodule "third_party/re2"]
|
||||
path = third_party/re2
|
||||
url = https://github.com/google/re2.git
|
||||
[submodule "third_party/xds"]
|
||||
path = third_party/xds
|
||||
url = https://github.com/cncf/xds.git
|
||||
[submodule "third_party/zlib"]
|
||||
path = third_party/zlib
|
||||
url = https://github.com/madler/zlib
|
||||
|
|
@ -47,6 +5,50 @@
|
|||
# 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
|
||||
[submodule "third_party/protobuf"]
|
||||
path = third_party/protobuf
|
||||
url = https://github.com/protocolbuffers/protobuf.git
|
||||
[submodule "third_party/googletest"]
|
||||
path = third_party/googletest
|
||||
url = https://github.com/google/googletest.git
|
||||
[submodule "third_party/benchmark"]
|
||||
path = third_party/benchmark
|
||||
url = https://github.com/google/benchmark
|
||||
[submodule "third_party/boringssl-with-bazel"]
|
||||
path = third_party/boringssl-with-bazel
|
||||
url = https://github.com/google/boringssl.git
|
||||
[submodule "third_party/re2"]
|
||||
path = third_party/re2
|
||||
url = https://github.com/google/re2.git
|
||||
[submodule "third_party/cares/cares"]
|
||||
path = third_party/cares/cares
|
||||
url = https://github.com/c-ares/c-ares.git
|
||||
branch = cares-1_17_2
|
||||
[submodule "third_party/bloaty"]
|
||||
path = third_party/bloaty
|
||||
url = https://github.com/google/bloaty.git
|
||||
[submodule "third_party/abseil-cpp"]
|
||||
path = third_party/abseil-cpp
|
||||
url = https://github.com/abseil/abseil-cpp.git
|
||||
branch = lts_2020_02_25
|
||||
[submodule "third_party/envoy-api"]
|
||||
path = third_party/envoy-api
|
||||
url = https://github.com/envoyproxy/data-plane-api.git
|
||||
[submodule "third_party/googleapis"]
|
||||
path = third_party/googleapis
|
||||
url = https://github.com/googleapis/googleapis.git
|
||||
[submodule "third_party/protoc-gen-validate"]
|
||||
path = third_party/protoc-gen-validate
|
||||
url = https://github.com/envoyproxy/protoc-gen-validate.git
|
||||
[submodule "third_party/libuv"]
|
||||
path = third_party/libuv
|
||||
url = https://github.com/libuv/libuv.git
|
||||
[submodule "third_party/opencensus-proto"]
|
||||
path = third_party/opencensus-proto
|
||||
url = https://github.com/census-instrumentation/opencensus-proto.git
|
||||
[submodule "third_party/opentelemetry"]
|
||||
path = third_party/opentelemetry
|
||||
url = https://github.com/open-telemetry/opentelemetry-proto.git
|
||||
[submodule "third_party/xds"]
|
||||
path = third_party/xds
|
||||
url = https://github.com/cncf/xds.git
|
||||
|
|
|
|||
|
|
@ -0,0 +1,69 @@
|
|||
git:
|
||||
depth: 1
|
||||
language: objective-c
|
||||
osx_image: xcode7.3
|
||||
env:
|
||||
global:
|
||||
- CONFIG=opt
|
||||
- TEST=objc
|
||||
- JOBS=1
|
||||
matrix:
|
||||
- SCHEME="RxLibraryUnitTests"
|
||||
WORKSPACE="Tests.xcworkspace" TEST_PATH="src/objective-c/tests" BUILD_ONLY="false"
|
||||
INTEROP_SERVER="false"
|
||||
- SCHEME="InteropTestsLocalSSL"
|
||||
WORKSPACE="Tests.xcworkspace" TEST_PATH="src/objective-c/tests" BUILD_ONLY="false"
|
||||
INTEROP_SERVER="true"
|
||||
- SCHEME="InteropTestsLocalCleartext"
|
||||
WORKSPACE="Tests.xcworkspace" TEST_PATH="src/objective-c/tests" BUILD_ONLY="false"
|
||||
INTEROP_SERVER="true"
|
||||
# TODO(jcanizales): Make tests an app project (instead of library), so the following will work.
|
||||
# - SCHEME="InteropTestsRemote"
|
||||
# WORKSPACE="Tests.xcworkspace" TEST_PATH="src/objective-c/tests" BUILD_ONLY="false"
|
||||
# INTEROP_SERVER="true"
|
||||
- SCHEME="HelloWorld"
|
||||
WORKSPACE="HelloWorld.xcworkspace" TEST_PATH="examples/objective-c/helloworld"
|
||||
BUILD_ONLY="true" INTEROP_SERVER="false"
|
||||
- SCHEME="RouteGuideClient"
|
||||
WORKSPACE="RouteGuideClient.xcworkspace" TEST_PATH="examples/objective-c/route_guide"
|
||||
BUILD_ONLY="true" INTEROP_SERVER="false"
|
||||
- SCHEME="AuthSample"
|
||||
WORKSPACE="AuthSample.xcworkspace" TEST_PATH="examples/objective-c/auth_sample"
|
||||
BUILD_ONLY="true" INTEROP_SERVER="false"
|
||||
- SCHEME="Sample"
|
||||
WORKSPACE="Sample.xcworkspace" TEST_PATH="src/objective-c/examples/Sample" BUILD_ONLY="true"
|
||||
INTEROP_SERVER="false"
|
||||
- SCHEME="Sample"
|
||||
WORKSPACE="Sample.xcworkspace" TEST_PATH="src/objective-c/examples/Sample" BUILD_ONLY="true"
|
||||
INTEROP_SERVER="false" FRAMEWORKS="YES"
|
||||
- SCHEME="SwiftSample"
|
||||
WORKSPACE="SwiftSample.xcworkspace" TEST_PATH="src/objective-c/examples/SwiftSample"
|
||||
BUILD_ONLY="true" INTEROP_SERVER="false"
|
||||
before_install:
|
||||
# Until Travis upgrades from Cocoapods 0.39, we need to do it here.
|
||||
- pod --version
|
||||
- gem uninstall cocoapods -a
|
||||
- gem install cocoapods -v '1.0.1'
|
||||
- pod --version
|
||||
# Recent pods aren't found if we don't explicitly update Cocoapods' repo.
|
||||
- pod repo update
|
||||
install:
|
||||
- pushd $TEST_PATH
|
||||
- pod install
|
||||
- popd
|
||||
before_script:
|
||||
- if [ "${INTEROP_SERVER}" = "true" ]; then
|
||||
make interop_server;
|
||||
(bins/$CONFIG/interop_server --port=5050 &);
|
||||
(bins/$CONFIG/interop_server --port=5051 --use_tls &);
|
||||
fi
|
||||
script:
|
||||
- if [ "${BUILD_ONLY}" = "true" ]; then
|
||||
xctool -workspace "$TEST_PATH/$WORKSPACE" -scheme "$SCHEME"
|
||||
-sdk iphonesimulator9.3 build;
|
||||
else
|
||||
xctool -workspace "$TEST_PATH/$WORKSPACE" -scheme "$SCHEME"
|
||||
-sdk iphonesimulator9.3 test;
|
||||
fi
|
||||
notifications:
|
||||
email: false
|
||||
25
BUILDING.md
|
|
@ -1,8 +1,8 @@
|
|||
gRPC C++ - Building from source
|
||||
===========================
|
||||
|
||||
This document has detailed instructions on how to build gRPC C++ from source. Note that it only covers the build of gRPC itself and is meant for gRPC C++ contributors and/or power users.
|
||||
Other should follow the user instructions. See the [How to use](https://github.com/grpc/grpc/tree/master/src/cpp#to-start-using-grpc-c) instructions for guidance on how to add gRPC as a dependency to a C++ application (there are several ways and system-wide installation is often not the best choice).
|
||||
This document has detailed instructions on how to build gRPC C++ from source. Note that it only covers the build of gRPC itself and is mostly meant for gRPC C++ contributors and/or power users.
|
||||
Other should follow the user instructions. See the [How to use](https://github.com/grpc/grpc/tree/master/src/cpp#to-start-using-grpc-c) instructions for guidance on how to add gRPC as a dependency to a C++ application (there are several ways and system wide installation is often not the best choice).
|
||||
|
||||
# Pre-requisites
|
||||
|
||||
|
|
@ -55,7 +55,7 @@ installed by `brew` is being used:
|
|||
## Windows
|
||||
|
||||
To prepare for cmake + Microsoft Visual C++ compiler build
|
||||
- Install Visual Studio 2019 or later (Visual C++ compiler will be used).
|
||||
- Install Visual Studio 2017 or later (Visual C++ compiler will be used).
|
||||
- Install [Git](https://git-scm.com/).
|
||||
- Install [CMake](https://cmake.org/download/).
|
||||
- Install [nasm](https://www.nasm.us/) and add it to `PATH` (`choco install nasm`) - *required by boringssl*
|
||||
|
|
@ -88,14 +88,14 @@ with something else than `bazel` (e.g. `cmake`).
|
|||
|
||||
# Build from source
|
||||
|
||||
In the C++ world, there's no "standard" build system that would work for all supported use cases and on all supported platforms.
|
||||
In the C++ world, there's no "standard" build system that would work for in all supported use cases and on all supported platforms.
|
||||
Therefore, gRPC supports several major build systems, which should satisfy most users. Depending on your needs
|
||||
we recommend building using `bazel` or `cmake`.
|
||||
|
||||
## Building with bazel (recommended)
|
||||
|
||||
Bazel is the primary build system for gRPC C++. If you're comfortable using bazel, we can certainly recommend it.
|
||||
Using bazel will give you the best developer experience in addition to faster and cleaner builds.
|
||||
Bazel is the primary build system for gRPC C++ and if you're comfortable with using bazel, we can certainly recommend it.
|
||||
Using bazel will give you the best developer experience as well as faster and cleaner builds.
|
||||
|
||||
You'll need `bazel` version `1.0.0` or higher to build gRPC.
|
||||
See [Installing Bazel](https://docs.bazel.build/versions/master/install.html) for instructions how to install bazel on your system.
|
||||
|
|
@ -112,17 +112,14 @@ $ 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)
|
||||
NOTE: If you are gRPC maintainer and you have access to our test cluster, you should use the 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).
|
||||
|
||||
## Building with CMake
|
||||
|
||||
### Linux/Unix, Using Make
|
||||
|
||||
Run from the grpc directory after cloning the repo with --recursive or updating submodules.
|
||||
Run from grpc directory after cloning the repo with --recursive or updating submodules.
|
||||
```
|
||||
$ mkdir -p cmake/build
|
||||
$ cd cmake/build
|
||||
|
|
@ -132,18 +129,18 @@ $ make
|
|||
|
||||
If you want to build shared libraries (`.so` files), run `cmake` with `-DBUILD_SHARED_LIBS=ON`.
|
||||
|
||||
### Windows, Using Visual Studio 2019 or later
|
||||
### Windows, Using Visual Studio 2015 or 2017
|
||||
|
||||
When using the "Visual Studio" generator,
|
||||
cmake will generate a solution (`grpc.sln`) that contains a VS project for
|
||||
every target defined in `CMakeLists.txt` (+ a few extra convenience projects
|
||||
every target defined in `CMakeLists.txt` (+ few extra convenience projects
|
||||
added automatically by cmake). After opening the solution with Visual Studio
|
||||
you will be able to browse and build the code.
|
||||
```
|
||||
> @rem Run from grpc directory after cloning the repo with --recursive or updating submodules.
|
||||
> md .build
|
||||
> cd .build
|
||||
> cmake .. -G "Visual Studio 16 2019"
|
||||
> cmake .. -G "Visual Studio 14 2015"
|
||||
> cmake --build . --config Release
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -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,12 +8,12 @@ See [CONTRIBUTING.md](https://github.com/grpc/grpc-community/blob/master/CONTRIB
|
|||
for general contribution guidelines.
|
||||
|
||||
## Maintainers (in alphabetical order)
|
||||
<!-- go/keep-sorted start case=no -->
|
||||
- [a11r](https://github.com/a11r), Google LLC
|
||||
- [apolcyn](https://github.com/apolcyn), Google LLC
|
||||
- [arjunroy](https://github.com/arjunroy), Google LLC
|
||||
- [ctiller](https://github.com/ctiller), Google LLC
|
||||
- [daniel-j-born](https://github.com/daniel-j-born), Google LLC
|
||||
- [dapengzhang0](https://github.com/dapengzhang0), Google LLC
|
||||
- [dfawley](https://github.com/dfawley), Google LLC
|
||||
- [dklempner](https://github.com/dklempner), Google LLC
|
||||
- [drfloob](https://github.com/drfloob), Google LLC
|
||||
|
|
@ -22,36 +22,32 @@ for general contribution guidelines.
|
|||
- [guantaol](https://github.com/guantaol), Google LLC
|
||||
- [hcaseyal](https://github.com/hcaseyal), Google LLC
|
||||
- [jtattermusch](https://github.com/jtattermusch), Google LLC
|
||||
- [kevinnilson](https://github.com/kevinnilson), Google LLC
|
||||
- [LittleCVR](https://github.com/littlecvr), Google LLC
|
||||
- [markdroth](https://github.com/markdroth), Google LLC
|
||||
- [matthewstevenson88](https://github.com/matthewstevenson88), Google LLC
|
||||
- [medinandres](https://github.com/medinandres), Google LLC
|
||||
- [murgatroid99](https://github.com/murgatroid99), Google LLC
|
||||
- [nanahpang](https://github.com/nanahpang), Google LLC
|
||||
- [pfreixes](https://github.com/pfreixes), Skyscanner Ltd
|
||||
- [ran-su](https://github.com/ran-su), Google LLC
|
||||
- [sanjaypujare](https://github.com/sanjaypujare), Google LLC
|
||||
- [sastryvp](https://github.com/sastryvp), Google LLC
|
||||
- [sergiitk](https://github.com/sergiitk), Google LLC
|
||||
- [soheilhy](https://github.com/soheilhy), Google LLC
|
||||
- [stanley-cheung](https://github.com/stanley-cheung), Google LLC
|
||||
- [thisisnotapril](https://github.com/thisisnotapril), Google LLC
|
||||
- [tjagtap](https://github.com/tjagtap), Google LLC
|
||||
- [veblush](https://github.com/veblush), Google LLC
|
||||
- [vishalpowar](https://github.com/vishalpowar), Google LLC
|
||||
- [Vizerai](https://github.com/Vizerai), Google LLC
|
||||
- [wenbozhu](https://github.com/wenbozhu), Google LLC
|
||||
- [yashykt](https://github.com/yashykt), Google LLC
|
||||
- [yijiem](https://github.com/yijiem), Google LLC
|
||||
- [yihuazhang](https://github.com/yihuazhang), Google LLC
|
||||
- [ZhenLian](https://github.com/ZhenLian), Google LLC
|
||||
- [ZhouyihaiDing](https://github.com/ZhouyihaiDing), Google LLC
|
||||
<!-- go/keep-sorted end -->
|
||||
|
||||
## Emeritus Maintainers (in alphabetical order)
|
||||
<!-- go/keep-sorted start case=no -->
|
||||
- [adelez](https://github.com/adelez), Google LLC
|
||||
- [AspirinSJL](https://github.com/AspirinSJL), Google LLC
|
||||
- [billfeng327](https://github.com/billfeng327), Google LLC
|
||||
- [bogdandrutu](https://github.com/bogdandrutu), Google LLC
|
||||
- [dapengzhang0](https://github.com/dapengzhang0), Google LLC
|
||||
- [dgquintas](https://github.com/dgquintas), Google LLC
|
||||
- [ericgribkoff](https://github.com/ericgribkoff), Google LLC
|
||||
- [fengli79](https://github.com/fengli79), Google LLC
|
||||
|
|
@ -67,7 +63,6 @@ for general contribution guidelines.
|
|||
- [lidizheng](https://github.com/lidizheng), Google LLC
|
||||
- [lyuxuan](https://github.com/lyuxuan), Google LLC
|
||||
- [matt-kwong](https://github.com/matt-kwong), Google LLC
|
||||
- [medinandres](https://github.com/medinandres), Google LLC
|
||||
- [mehrdada](https://github.com/mehrdada), Dropbox, Inc.
|
||||
- [mhaidrygoog](https://github.com/mhaidrygoog), Google LLC
|
||||
- [mit-mit](https://github.com/mit-mit), Google LLC
|
||||
|
|
@ -86,11 +81,7 @@ for general contribution guidelines.
|
|||
- [srini100](https://github.com/srini100), Google LLC
|
||||
- [summerxyt](https://github.com/summerxyt), Google LLC
|
||||
- [vjpai](https://github.com/vjpai), Google LLC
|
||||
- [Vizerai](https://github.com/Vizerai), Google LLC
|
||||
- [wcevans](https://github.com/wcevans), Google LLC
|
||||
- [y-zeng](https://github.com/y-zeng), Google LLC
|
||||
- [yang-g](https://github.com/yang-g), Google LLC
|
||||
- [yihuazhang](https://github.com/yihuazhang), Google LLC
|
||||
- [zpencer](https://github.com/zpencer), Google LLC
|
||||
- [ZhenLian](https://github.com/ZhenLian), Google LLC
|
||||
<!-- go/keep-sorted end -->
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
# Top level ownership
|
||||
@markdroth **/OWNERS
|
||||
@a11r **/OWNERS
|
||||
|
|
@ -10,7 +10,6 @@ graft third_party/boringssl-with-bazel
|
|||
graft third_party/cares
|
||||
graft third_party/re2
|
||||
graft third_party/upb
|
||||
graft third_party/utf8_range
|
||||
graft third_party/xxhash
|
||||
graft third_party/zlib
|
||||
include src/python/grpcio/_parallel_compile_patch.py
|
||||
|
|
|
|||
2245
Package.swift
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#](src/csharp): NuGet package `Grpc`
|
||||
- [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`
|
||||
- [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) |
|
||||
|
|
|
|||
159
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',
|
||||
'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,94 +144,90 @@ 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.1.0', '3.0.0', '2.7.0', '2.6.0'].join(':')
|
||||
selected_plat = "#{args[:plat]}"
|
||||
|
||||
# use env variable to set artifact build paralellism
|
||||
nproc_override = ENV['GRPC_RUBY_BUILD_PROCS'] || `nproc`.strip
|
||||
if RUBY_PLATFORM =~ /darwin/
|
||||
if !selected_plat.empty? && selected_plat != 'darwin'
|
||||
fail "Cannot pass platform as an argument when on Darwin."
|
||||
end
|
||||
|
||||
# propagate env variables with ccache configuration to the rake-compiler-dock docker container
|
||||
# and setup ccache symlinks as needed.
|
||||
prepare_ccache_cmd = "export GRPC_BUILD_ENABLE_CCACHE=\"#{ENV.fetch('GRPC_BUILD_ENABLE_CCACHE', '')}\" && "
|
||||
prepare_ccache_cmd += "export CCACHE_SECONDARY_STORAGE=\"#{ENV.fetch('CCACHE_SECONDARY_STORAGE', '')}\" && "
|
||||
prepare_ccache_cmd += "export PATH=\"$PATH:/usr/local/bin\" && "
|
||||
prepare_ccache_cmd += "source tools/internal_ci/helper_scripts/prepare_ccache_symlinks_rc "
|
||||
|
||||
supported_windows_platforms = ['x86-mingw32', 'x64-mingw32', 'x64-mingw-ucrt']
|
||||
supported_unix_platforms = ['x86_64-linux', 'x86-linux', 'aarch64-linux', 'x86_64-darwin', 'arm64-darwin']
|
||||
supported_platforms = supported_windows_platforms + supported_unix_platforms
|
||||
|
||||
if selected_plat.empty?
|
||||
# build everything
|
||||
windows_platforms = supported_windows_platforms
|
||||
unix_platforms = supported_unix_platforms
|
||||
FileUtils.touch 'grpc_c.32-msvcrt.ruby'
|
||||
FileUtils.touch 'grpc_c.64-msvcrt.ruby'
|
||||
FileUtils.touch 'grpc_c.64-ucrt.ruby'
|
||||
unless '2.5' == /(\d+\.\d+)/.match(RUBY_VERSION).to_s
|
||||
fail "rake gem:native (the rake task to build the binary packages) is being " \
|
||||
"invoked on macos with ruby #{RUBY_VERSION}. The ruby macos artifact " \
|
||||
"build should be running on ruby 2.5."
|
||||
end
|
||||
system "bundle exec rake cross native gem RUBY_CC_VERSION=#{ruby_cc_versions} V=#{verbose} GRPC_CONFIG=#{grpc_config}"
|
||||
else
|
||||
# build only selected platform
|
||||
if supported_windows_platforms.include?(selected_plat)
|
||||
windows_platforms = [selected_plat]
|
||||
unix_platforms = []
|
||||
elsif supported_unix_platforms.include?(selected_plat)
|
||||
windows_platforms = []
|
||||
unix_platforms = [selected_plat]
|
||||
# use env variable to set artifact build paralellism
|
||||
nproc_override = ENV['GRPC_RUBY_BUILD_PROCS'] || `nproc`.strip
|
||||
|
||||
# propagate env variables with ccache configuration to the rake-compiler-dock docker container
|
||||
# and setup ccache symlinks as needed.
|
||||
prepare_ccache_cmd = "export GRPC_BUILD_ENABLE_CCACHE=\"#{ENV.fetch('GRPC_BUILD_ENABLE_CCACHE', '')}\" && "
|
||||
prepare_ccache_cmd += "export CCACHE_SECONDARY_STORAGE=\"#{ENV.fetch('CCACHE_SECONDARY_STORAGE', '')}\" && "
|
||||
prepare_ccache_cmd += "export PATH=\"$PATH:/usr/local/bin\" && "
|
||||
prepare_ccache_cmd += "source tools/internal_ci/helper_scripts/prepare_ccache_symlinks_rc "
|
||||
|
||||
supported_windows_platforms = ['x86-mingw32', 'x64-mingw32', 'x64-mingw-ucrt']
|
||||
supported_unix_platforms = ['x86_64-linux', 'x86-linux', 'x86_64-darwin', 'arm64-darwin']
|
||||
supported_platforms = supported_windows_platforms + supported_unix_platforms
|
||||
|
||||
if selected_plat.empty?
|
||||
# build everything
|
||||
windows_platforms = supported_windows_platforms
|
||||
unix_platforms = supported_unix_platforms
|
||||
else
|
||||
fail "Unsupported platform '#{selected_plat}' passed as an argument."
|
||||
# build only selected platform
|
||||
if supported_windows_platforms.include?(selected_plat)
|
||||
windows_platforms = [selected_plat]
|
||||
unix_platforms = []
|
||||
elsif supported_unix_platforms.include?(selected_plat)
|
||||
windows_platforms = []
|
||||
unix_platforms = [selected_plat]
|
||||
else
|
||||
fail "Unsupported platform '#{selected_plat}' passed as an argument."
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Create the windows dlls or create the empty placeholders
|
||||
Rake::Task['dlls'].execute(plat: windows_platforms)
|
||||
# Create the windows dlls or create the empty placeholders
|
||||
Rake::Task['dlls'].execute(plat: windows_platforms)
|
||||
|
||||
windows_platforms.each do |plat|
|
||||
run_rake_compiler(plat, <<~EOT)
|
||||
#{prepare_ccache_cmd} && \
|
||||
gem update --system --no-document && \
|
||||
bundle && \
|
||||
bundle exec rake clean && \
|
||||
bundle exec rake native:#{plat} pkg/#{spec.full_name}-#{plat}.gem pkg/#{spec.full_name}.gem \
|
||||
RUBY_CC_VERSION=#{ruby_cc_versions} \
|
||||
V=#{verbose} \
|
||||
GRPC_CONFIG=#{grpc_config} \
|
||||
GRPC_RUBY_BUILD_PROCS=#{nproc_override}
|
||||
EOT
|
||||
end
|
||||
|
||||
# Truncate grpc_c.*.ruby files because they're for Windows only and we don't want
|
||||
# them to take up space in the gems that don't target windows.
|
||||
File.truncate('grpc_c.32-msvcrt.ruby', 0)
|
||||
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')
|
||||
windows_platforms.each do |plat|
|
||||
run_rake_compiler(plat, <<~EOT)
|
||||
#{prepare_ccache_cmd} && \
|
||||
gem update --system --no-document && \
|
||||
bundle && \
|
||||
bundle exec rake clean && \
|
||||
bundle exec rake native:#{plat} pkg/#{spec.full_name}-#{plat}.gem pkg/#{spec.full_name}.gem \
|
||||
RUBY_CC_VERSION=#{ruby_cc_versions} \
|
||||
V=#{verbose} \
|
||||
GRPC_CONFIG=#{grpc_config} \
|
||||
GRPC_RUBY_BUILD_PROCS=#{nproc_override}
|
||||
EOT
|
||||
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} \
|
||||
GRPC_CONFIG=#{grpc_config} \
|
||||
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/`
|
||||
|
||||
# Truncate grpc_c.*.ruby files because they're for Windows only and we don't want
|
||||
# them to take up space in the gems that don't target windows.
|
||||
File.truncate('grpc_c.32-msvcrt.ruby', 0)
|
||||
File.truncate('grpc_c.64-msvcrt.ruby', 0)
|
||||
File.truncate('grpc_c.64-ucrt.ruby', 0)
|
||||
|
||||
unix_platforms.each do |plat|
|
||||
run_rake_compiler(plat, <<~EOT)
|
||||
#{prepare_ccache_cmd} && \
|
||||
gem update --system --no-document && \
|
||||
bundle && \
|
||||
bundle exec rake clean && \
|
||||
bundle exec rake native:#{plat} pkg/#{spec.full_name}-#{plat}.gem pkg/#{spec.full_name}.gem \
|
||||
RUBY_CC_VERSION=#{ruby_cc_versions} \
|
||||
V=#{verbose} \
|
||||
GRPC_CONFIG=#{grpc_config} \
|
||||
GRPC_RUBY_BUILD_PROCS=#{nproc_override}
|
||||
EOT
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
|
|||
160
WORKSPACE
|
|
@ -24,37 +24,42 @@ custom_exec_properties(
|
|||
},
|
||||
)
|
||||
|
||||
load("@bazel_toolchains//rules:rbe_repo.bzl", "rbe_autoconfig")
|
||||
|
||||
# Create toolchain configuration for remote execution.
|
||||
rbe_autoconfig(
|
||||
name = "rbe_default",
|
||||
exec_properties = create_rbe_exec_properties_dict(
|
||||
docker_add_capabilities = "SYS_PTRACE",
|
||||
docker_privileged = True,
|
||||
labels = {
|
||||
"os": "ubuntu",
|
||||
"machine_size": "small",
|
||||
},
|
||||
os_family = "Linux",
|
||||
),
|
||||
# use exec_properties instead of deprecated remote_execution_properties
|
||||
use_legacy_platform_definition = False,
|
||||
)
|
||||
|
||||
load("@bazel_toolchains//rules:environments.bzl", "clang_env")
|
||||
load("@bazel_skylib//lib:dicts.bzl", "dicts")
|
||||
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,106 +68,23 @@ 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.
|
||||
# This is required to avoid triggering "Unable to find package for @rules_fuzzing//fuzzing:cc_defs.bzl"
|
||||
# error.
|
||||
local_repository(
|
||||
name = "ignore_third_party_utf8_range_subtree",
|
||||
path = "third_party/utf8_range",
|
||||
# Create msan toolchain configuration for remote execution.
|
||||
rbe_autoconfig(
|
||||
name = "rbe_msan",
|
||||
env = dicts.add(
|
||||
clang_env(),
|
||||
{
|
||||
"BAZEL_LINKOPTS": "-lc++:-lc++abi:-lm",
|
||||
},
|
||||
),
|
||||
)
|
||||
|
||||
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")
|
||||
|
||||
system_python(
|
||||
name = "system_python",
|
||||
minimum_python_version = "3.7",
|
||||
)
|
||||
|
||||
load("@system_python//:pip.bzl", system_pip_parse = "pip_parse")
|
||||
|
||||
system_pip_parse(
|
||||
name = "pip_deps",
|
||||
requirements = "@com_google_protobuf//python:requirements.txt",
|
||||
requirements_overrides = {
|
||||
"3.11": "@com_google_protobuf//python:requirements_311.txt",
|
||||
},
|
||||
)
|
||||
|
||||
http_archive(
|
||||
name = "build_bazel_rules_swift",
|
||||
sha256 = "bf2861de6bf75115288468f340b0c4609cc99cc1ccc7668f0f71adfd853eedb3",
|
||||
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",
|
||||
)
|
||||
|
||||
swift_rules_dependencies()
|
||||
|
||||
# This loads the libpfm transitive dependency.
|
||||
# See https://github.com/google/benchmark/pull/1520
|
||||
load("@com_github_google_benchmark//:bazel/benchmark_deps.bzl", "benchmark_deps")
|
||||
|
||||
benchmark_deps()
|
||||
|
||||
# This is a transitive dependency from google_cloud_cpp
|
||||
bind(
|
||||
name = "cares",
|
||||
actual = "@com_github_cares_cares//:ares",
|
||||
)
|
||||
|
||||
load("@io_opentelemetry_cpp//bazel:repository.bzl", "opentelemetry_cpp_deps")
|
||||
|
||||
opentelemetry_cpp_deps()
|
||||
|
||||
load("@io_opentelemetry_cpp//bazel:extra_deps.bzl", "opentelemetry_extra_deps")
|
||||
|
||||
opentelemetry_extra_deps()
|
||||
|
||||
# Transitive dependency of opentelemetry_extra_deps()
|
||||
bind(
|
||||
name = "madler_zlib",
|
||||
actual = "@zlib//:zlib",
|
||||
)
|
||||
|
||||
# TODO: Enable below once https://github.com/bazel-xcode/PodToBUILD/issues/232 is resolved
|
||||
#
|
||||
#http_archive(
|
||||
# name = "rules_pods",
|
||||
# urls = ["https://github.com/pinterest/PodToBUILD/releases/download/4.1.0-412495/PodToBUILD.zip"],
|
||||
#)
|
||||
#
|
||||
#load(
|
||||
# "@rules_pods//BazelExtensions:workspace.bzl",
|
||||
# "new_pod_repository",
|
||||
#)
|
||||
#
|
||||
#new_pod_repository(
|
||||
# name = "CronetFramework",
|
||||
# is_dynamic_framework = True,
|
||||
# podspec_url = "https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/2/e/1/CronetFramework/0.0.5/CronetFramework.podspec.json",
|
||||
# url = "https://storage.googleapis.com/grpc-precompiled-binaries/cronet/Cronet.framework-v0.0.5.zip",
|
||||
#)
|
||||
|
|
|
|||
|
|
@ -14,4 +14,4 @@
|
|||
|
||||
# AUTO-GENERATED FROM `$REPO_ROOT/templates/_metadata.py.template`!!!
|
||||
|
||||
__version__ = """1.65.0.dev0"""
|
||||
__version__ = """1.49.4"""
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
|
|||
|
|
@ -74,8 +74,7 @@ def cc_grpc_library(
|
|||
cc_proto_target = name if proto_only else "_" + name + "_cc_proto"
|
||||
|
||||
proto_deps = ["_" + dep + "_only" for dep in deps if dep.find(":") == -1]
|
||||
proto_deps += [dep.split(":")[0] + ":" + "_" + dep.split(":")[1] + "_only" for dep in deps if dep.find(":") != -1 and dep.find("com_google_googleapis") == -1]
|
||||
proto_deps += [dep for dep in deps if dep.find("com_google_googleapis") != -1]
|
||||
proto_deps += [dep.split(":")[0] + ":" + "_" + dep.split(":")[1] + "_only" for dep in deps if dep.find(":") != -1]
|
||||
if well_known_protos:
|
||||
proto_deps += well_known_proto_libs()
|
||||
proto_library(
|
||||
|
|
|
|||
101
bazel/copts.bzl
|
|
@ -45,7 +45,6 @@ GRPC_LLVM_WARNING_FLAGS = [
|
|||
"-Wtautological-overlap-compare",
|
||||
"-Wthread-safety-analysis",
|
||||
"-Wthread-safety-beta",
|
||||
"-Wunused-but-set-variable",
|
||||
"-Wunused-comparison",
|
||||
"-Wvla",
|
||||
# -Wextra compatibility between gcc and clang
|
||||
|
|
@ -57,107 +56,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": [],
|
||||
})
|
||||
|
|
|
|||
|
|
@ -65,7 +65,6 @@ def pyx_library(name, deps = [], py_deps = [], srcs = [], **kwargs):
|
|||
)
|
||||
|
||||
shared_objects = []
|
||||
defines = kwargs.pop("defines", [])
|
||||
for src in pyx_srcs:
|
||||
stem = src.split(".")[0]
|
||||
shared_object_name = stem + ".so"
|
||||
|
|
@ -73,7 +72,6 @@ def pyx_library(name, deps = [], py_deps = [], srcs = [], **kwargs):
|
|||
name = shared_object_name,
|
||||
srcs = [stem + ".cpp"],
|
||||
deps = deps + ["@local_config_python//:python_headers"],
|
||||
defines = defines,
|
||||
linkshared = 1,
|
||||
)
|
||||
shared_objects.append(shared_object_name)
|
||||
|
|
|
|||
|
|
@ -1,190 +0,0 @@
|
|||
# Copyright 2023 gRPC authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Auto generated by tools/codegen/core/gen_experiments.py
|
||||
|
||||
"""Dictionary of tags to experiments so we know when to test different experiments."""
|
||||
|
||||
EXPERIMENT_ENABLES = {
|
||||
"call_status_override_on_cancellation": "call_status_override_on_cancellation",
|
||||
"canary_client_privacy": "canary_client_privacy",
|
||||
"client_privacy": "client_privacy",
|
||||
"event_engine_client": "event_engine_client",
|
||||
"event_engine_dns": "event_engine_dns",
|
||||
"event_engine_listener": "event_engine_listener",
|
||||
"free_large_allocator": "free_large_allocator",
|
||||
"http2_stats_fix": "http2_stats_fix",
|
||||
"keepalive_fix": "keepalive_fix",
|
||||
"keepalive_server_fix": "keepalive_server_fix",
|
||||
"max_pings_wo_data_throttle": "max_pings_wo_data_throttle",
|
||||
"monitoring_experiment": "monitoring_experiment",
|
||||
"multiping": "multiping",
|
||||
"peer_state_based_framing": "peer_state_based_framing",
|
||||
"pick_first_new": "pick_first_new",
|
||||
"promise_based_inproc_transport": "promise_based_inproc_transport",
|
||||
"rstpit": "rstpit",
|
||||
"schedule_cancellation_over_write": "schedule_cancellation_over_write",
|
||||
"server_privacy": "server_privacy",
|
||||
"tcp_frame_size_tuning": "tcp_frame_size_tuning",
|
||||
"tcp_rcv_lowat": "tcp_rcv_lowat",
|
||||
"trace_record_callops": "trace_record_callops",
|
||||
"unconstrained_max_quota_buffer_size": "unconstrained_max_quota_buffer_size",
|
||||
"work_serializer_clears_time_cache": "work_serializer_clears_time_cache",
|
||||
"work_serializer_dispatch": "work_serializer_dispatch",
|
||||
}
|
||||
|
||||
EXPERIMENT_POLLERS = [
|
||||
"event_engine_client",
|
||||
"event_engine_dns",
|
||||
"event_engine_listener",
|
||||
]
|
||||
|
||||
EXPERIMENTS = {
|
||||
"windows": {
|
||||
"dbg": {
|
||||
},
|
||||
"off": {
|
||||
"endpoint_test": [
|
||||
"tcp_frame_size_tuning",
|
||||
"tcp_rcv_lowat",
|
||||
],
|
||||
"flow_control_test": [
|
||||
"multiping",
|
||||
"peer_state_based_framing",
|
||||
"rstpit",
|
||||
"tcp_frame_size_tuning",
|
||||
"tcp_rcv_lowat",
|
||||
],
|
||||
"resource_quota_test": [
|
||||
"free_large_allocator",
|
||||
"unconstrained_max_quota_buffer_size",
|
||||
],
|
||||
},
|
||||
"on": {
|
||||
"cancel_ares_query_test": [
|
||||
"event_engine_dns",
|
||||
],
|
||||
"core_end2end_test": [
|
||||
"event_engine_client",
|
||||
"event_engine_listener",
|
||||
],
|
||||
"cpp_lb_end2end_test": [
|
||||
"pick_first_new",
|
||||
],
|
||||
"event_engine_client_test": [
|
||||
"event_engine_client",
|
||||
],
|
||||
"event_engine_listener_test": [
|
||||
"event_engine_listener",
|
||||
],
|
||||
"lb_unit_test": [
|
||||
"pick_first_new",
|
||||
],
|
||||
"resolver_component_tests_runner_invoker": [
|
||||
"event_engine_dns",
|
||||
],
|
||||
"xds_end2end_test": [
|
||||
"pick_first_new",
|
||||
],
|
||||
},
|
||||
},
|
||||
"ios": {
|
||||
"dbg": {
|
||||
},
|
||||
"off": {
|
||||
"endpoint_test": [
|
||||
"tcp_frame_size_tuning",
|
||||
"tcp_rcv_lowat",
|
||||
],
|
||||
"flow_control_test": [
|
||||
"multiping",
|
||||
"peer_state_based_framing",
|
||||
"rstpit",
|
||||
"tcp_frame_size_tuning",
|
||||
"tcp_rcv_lowat",
|
||||
],
|
||||
"resource_quota_test": [
|
||||
"free_large_allocator",
|
||||
"unconstrained_max_quota_buffer_size",
|
||||
],
|
||||
},
|
||||
"on": {
|
||||
"cpp_lb_end2end_test": [
|
||||
"pick_first_new",
|
||||
],
|
||||
"lb_unit_test": [
|
||||
"pick_first_new",
|
||||
],
|
||||
"xds_end2end_test": [
|
||||
"pick_first_new",
|
||||
],
|
||||
},
|
||||
},
|
||||
"posix": {
|
||||
"dbg": {
|
||||
},
|
||||
"off": {
|
||||
"core_end2end_test": [
|
||||
"event_engine_client",
|
||||
],
|
||||
"endpoint_test": [
|
||||
"tcp_frame_size_tuning",
|
||||
"tcp_rcv_lowat",
|
||||
],
|
||||
"event_engine_client_test": [
|
||||
"event_engine_client",
|
||||
],
|
||||
"flow_control_test": [
|
||||
"multiping",
|
||||
"peer_state_based_framing",
|
||||
"rstpit",
|
||||
"tcp_frame_size_tuning",
|
||||
"tcp_rcv_lowat",
|
||||
],
|
||||
"resource_quota_test": [
|
||||
"free_large_allocator",
|
||||
"unconstrained_max_quota_buffer_size",
|
||||
],
|
||||
},
|
||||
"on": {
|
||||
"cancel_ares_query_test": [
|
||||
"event_engine_dns",
|
||||
],
|
||||
"core_end2end_test": [
|
||||
"event_engine_listener",
|
||||
"work_serializer_dispatch",
|
||||
],
|
||||
"cpp_end2end_test": [
|
||||
"work_serializer_dispatch",
|
||||
],
|
||||
"cpp_lb_end2end_test": [
|
||||
"pick_first_new",
|
||||
],
|
||||
"event_engine_listener_test": [
|
||||
"event_engine_listener",
|
||||
],
|
||||
"lb_unit_test": [
|
||||
"pick_first_new",
|
||||
"work_serializer_dispatch",
|
||||
],
|
||||
"resolver_component_tests_runner_invoker": [
|
||||
"event_engine_dns",
|
||||
],
|
||||
"xds_end2end_test": [
|
||||
"pick_first_new",
|
||||
"work_serializer_dispatch",
|
||||
],
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -163,7 +163,7 @@ def generate_cc_impl(ctx):
|
|||
use_default_shell_env = True,
|
||||
)
|
||||
|
||||
return DefaultInfo(files = depset(out_files))
|
||||
return struct(files = depset(out_files)) # buildifier: disable=rule-impl-return
|
||||
|
||||
_generate_cc = rule(
|
||||
attrs = {
|
||||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -76,7 +76,6 @@ def py_grpc_gevent_test(
|
|||
native.py_test(
|
||||
name = name + ".gevent",
|
||||
args = [name],
|
||||
data = data,
|
||||
deps = augmented_deps,
|
||||
srcs = [copied_main_filename],
|
||||
main = copied_main_filename,
|
||||
|
|
|
|||
|
|
@ -1,28 +0,0 @@
|
|||
# Copyright 2023 gRPC authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
licenses(["notice"])
|
||||
|
||||
package(
|
||||
default_visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
# This is needed for the dependency on google_cloud_cpp to work.
|
||||
# Taken from https://github.com/googleapis/google-cloud-cpp/blob/2839e9dba793ca023e11ea67f201f66f74fa7d3e/bazel/googleapis.BUILD
|
||||
cc_library(
|
||||
name = "googleapis_system_includes",
|
||||
includes = [
|
||||
".",
|
||||
],
|
||||
)
|
||||
|
|
@ -27,13 +27,11 @@
|
|||
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("@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 +43,6 @@ def if_not_windows(a):
|
|||
return select({
|
||||
"//:windows": [],
|
||||
"//:windows_msvc": [],
|
||||
"//:windows_clang": [],
|
||||
"//conditions:default": a,
|
||||
})
|
||||
|
||||
|
|
@ -53,38 +50,27 @@ 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")
|
||||
elif dep.startswith("absl/"):
|
||||
ret.append("@com_google_absl//" + dep)
|
||||
elif dep.startswith("google/"):
|
||||
ret.append("@com_google_googleapis//" + dep)
|
||||
elif dep.startswith("otel/"):
|
||||
ret.append(dep.replace("otel/", "@io_opentelemetry_cpp//"))
|
||||
elif dep.startswith("google_cloud_cpp"):
|
||||
ret.append(dep.replace("google_cloud_cpp", "@google_cloud_cpp//"))
|
||||
elif dep == "libprotobuf_mutator":
|
||||
ret.append("@com_google_libprotobuf_mutator//:libprotobuf_mutator")
|
||||
else:
|
||||
ret.append("//third_party:" + dep)
|
||||
ret.append("//external:" + dep)
|
||||
return ret
|
||||
|
||||
def _update_visibility(visibility):
|
||||
|
|
@ -101,40 +87,23 @@ 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_internal_errqueue": PRIVATE,
|
||||
"iomgr_buffer_list": PRIVATE,
|
||||
"json_reader_legacy": PRIVATE,
|
||||
"otel_plugin": PRIVATE,
|
||||
"iomgr_timer": 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:
|
||||
|
|
@ -161,7 +130,6 @@ def grpc_cc_library(
|
|||
alwayslink = 0,
|
||||
data = [],
|
||||
tags = [],
|
||||
linkopts = [],
|
||||
linkstatic = False):
|
||||
"""An internal wrapper around cc_library.
|
||||
|
||||
|
|
@ -181,14 +149,13 @@ def grpc_cc_library(
|
|||
alwayslink: Whether to enable alwayslink on the cc_library.
|
||||
data: Data dependencies.
|
||||
tags: Tags to apply to the rule.
|
||||
linkopts: Extra libraries to link.
|
||||
linkstatic: Whether to enable linkstatic on the cc_library.
|
||||
"""
|
||||
visibility = _update_visibility(visibility)
|
||||
copts = []
|
||||
if language.upper() == "C":
|
||||
copts = copts + if_not_windows(["-std=c11"])
|
||||
linkopts = linkopts + if_not_windows(["-pthread"]) + if_windows(["-defaultlib:ws2_32.lib"])
|
||||
linkopts = if_not_windows(["-pthread"]) + if_windows(["-defaultlib:ws2_32.lib"])
|
||||
if select_deps:
|
||||
for select_deps_entry in select_deps:
|
||||
deps += select(select_deps_entry)
|
||||
|
|
@ -217,8 +184,8 @@ def grpc_cc_library(
|
|||
linkopts = linkopts,
|
||||
includes = [
|
||||
"include",
|
||||
"src/core/ext/upb-gen", # Once upb code-gen issue is resolved, remove this.
|
||||
"src/core/ext/upbdefs-gen", # Once upb code-gen issue is resolved, remove this.
|
||||
"src/core/ext/upb-generated", # Once upb code-gen issue is resolved, remove this.
|
||||
"src/core/ext/upbdefs-generated", # Once upb code-gen issue is resolved, remove this.
|
||||
],
|
||||
alwayslink = alwayslink,
|
||||
data = data,
|
||||
|
|
@ -237,7 +204,6 @@ def grpc_proto_library(
|
|||
name,
|
||||
srcs = [],
|
||||
deps = [],
|
||||
visibility = None,
|
||||
well_known_protos = False,
|
||||
has_services = True,
|
||||
use_external = False,
|
||||
|
|
@ -246,7 +212,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,226 +258,75 @@ 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):
|
||||
def expand_tests_for_each_poller_and_engine(name, srcs, deps, tags, args, exclude_pollers, uses_event_engine):
|
||||
"""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.
|
||||
|
||||
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.
|
||||
"""
|
||||
|
||||
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"]
|
||||
# On linux we run the same test with the default EventEngine, once for each
|
||||
# poller
|
||||
for poller in POLLERS:
|
||||
if poller in exclude_pollers:
|
||||
continue
|
||||
poller_config.append({
|
||||
"name": name + "@poller=" + poller,
|
||||
"srcs": srcs,
|
||||
"deps": deps,
|
||||
"tags": (tags + EVENT_ENGINES["default"]["tags"] + [
|
||||
"no_windows",
|
||||
"no_mac",
|
||||
"bazel_only",
|
||||
]),
|
||||
"args": args + ["--poller=" + poller],
|
||||
})
|
||||
|
||||
# Now generate one test for each subsequent EventEngine, all using the
|
||||
# default poller. These tests will have `@engine=<name>` appended to the
|
||||
# test target name. If a test target name has no `@engine=<name>` component,
|
||||
# that indicates that the default EventEngine is being used.
|
||||
if not uses_event_engine:
|
||||
# The poller tests exercise the default engine on Linux. This test
|
||||
# handles other platforms.
|
||||
poller_config.append({
|
||||
"name": name,
|
||||
"srcs": srcs,
|
||||
"deps": deps,
|
||||
"tags": tags,
|
||||
"tags": tags + ["no_linux"],
|
||||
"args": args,
|
||||
"flaky": flaky,
|
||||
"env": default_env,
|
||||
})
|
||||
else:
|
||||
# On linux we run the same test with the default EventEngine, once for each
|
||||
# poller
|
||||
for poller in POLLERS:
|
||||
if poller in exclude_pollers:
|
||||
continue
|
||||
for engine_name, engine in EVENT_ENGINES.items():
|
||||
test_name = name + "@engine=" + engine_name
|
||||
test_tags = tags + engine["tags"] + ["bazel_only"]
|
||||
test_args = args + ["--engine=" + engine_name]
|
||||
if engine_name == "default":
|
||||
# The poller tests exercise the default engine on Linux.
|
||||
# This test handles other platforms.
|
||||
test_name = name
|
||||
test_tags = tags + engine["tags"] + ["no_linux"]
|
||||
test_args = args
|
||||
poller_config.append({
|
||||
"name": name + "@poller=" + poller,
|
||||
"name": test_name,
|
||||
"srcs": srcs,
|
||||
"deps": deps,
|
||||
"tags": (tags + EVENT_ENGINES["default"]["tags"] + [
|
||||
"no_windows",
|
||||
"no_mac",
|
||||
"bazel_only",
|
||||
]),
|
||||
"args": args,
|
||||
"env": {
|
||||
"GRPC_POLL_STRATEGY": poller,
|
||||
} | default_env,
|
||||
"flaky": flaky,
|
||||
"tags": test_tags,
|
||||
"args": test_args,
|
||||
})
|
||||
|
||||
# Now generate one test for each subsequent EventEngine, all using the
|
||||
# default poller. These tests will have `@engine=<name>` appended to the
|
||||
# test target name. If a test target name has no `@engine=<name>` component,
|
||||
# that indicates that the default EventEngine is being used.
|
||||
if not uses_event_engine:
|
||||
# The poller tests exercise the default engine on Linux. This test
|
||||
# handles other platforms.
|
||||
poller_config.append({
|
||||
"name": name,
|
||||
"srcs": srcs,
|
||||
"deps": deps,
|
||||
"tags": tags + ["no_linux"],
|
||||
"args": args,
|
||||
"env": default_env,
|
||||
"flaky": flaky,
|
||||
})
|
||||
else:
|
||||
for engine_name, engine in EVENT_ENGINES.items():
|
||||
test_name = name + "@engine=" + engine_name
|
||||
test_tags = tags + engine["tags"] + ["bazel_only"]
|
||||
test_args = args + ["--engine=" + engine_name]
|
||||
if engine_name == "default":
|
||||
# The poller tests exercise the default engine on Linux.
|
||||
# This test handles other platforms.
|
||||
test_name = name
|
||||
test_tags = tags + engine["tags"] + ["no_linux"]
|
||||
test_args = args
|
||||
poller_config.append({
|
||||
"name": test_name,
|
||||
"srcs": srcs,
|
||||
"deps": deps,
|
||||
"tags": test_tags,
|
||||
"args": test_args,
|
||||
"env": default_env,
|
||||
"flaky": flaky,
|
||||
})
|
||||
|
||||
return poller_config
|
||||
|
||||
def expand_tests(name, srcs, deps, tags, args, exclude_pollers, uses_polling, uses_event_engine, flaky):
|
||||
"""Common logic used to parameterize tests for every poller and EventEngine and experiment.
|
||||
|
||||
Args:
|
||||
name: base name of the test
|
||||
srcs: source files
|
||||
deps: base deps
|
||||
tags: base tags
|
||||
args: base args
|
||||
flaky: base flaky
|
||||
exclude_pollers: list of poller names to exclude for this set of tests.
|
||||
uses_polling: set to False if the test is not sensitive to polling methodology.
|
||||
uses_event_engine: set to False if the test is not sensitive to
|
||||
EventEngine implementation differences
|
||||
|
||||
Returns:
|
||||
A list of dictionaries containing modified values of name, srcs, deps, tags, and args.
|
||||
"""
|
||||
|
||||
experiments = {}
|
||||
|
||||
# buildifier: disable=uninitialized
|
||||
def _populate_experiments_platform_config(config, platform_experiments_map):
|
||||
for platform, experiments_on_platform in platform_experiments_map.items():
|
||||
for mode, tag_to_experiments in experiments_on_platform.items():
|
||||
if mode not in config:
|
||||
config[mode] = {}
|
||||
for tag in tags:
|
||||
if tag not in tag_to_experiments:
|
||||
continue
|
||||
for experiment in tag_to_experiments[tag]:
|
||||
if experiment not in config[mode]:
|
||||
config[mode][experiment] = []
|
||||
config[mode][experiment].append(platform)
|
||||
|
||||
_populate_experiments_platform_config(experiments, EXPERIMENTS)
|
||||
_populate_experiments_platform_config(experiments, TEST_EXPERIMENTS)
|
||||
|
||||
mode_config = {
|
||||
# format: <mode>: (enabled_target_tags, disabled_target_tags)
|
||||
"on": (None, []),
|
||||
"off": ([], None),
|
||||
}
|
||||
|
||||
must_have_tags = [
|
||||
# We don't run experiments on cmake builds
|
||||
"bazel_only",
|
||||
# Nor on mac
|
||||
"no_mac",
|
||||
# Nor on arm64
|
||||
"no_arm64",
|
||||
]
|
||||
|
||||
def _update_experiments_platform_test_tags(tags, platforms):
|
||||
if "posix" not in platforms:
|
||||
if "no_linux" not in tags:
|
||||
tags.append("no_linux")
|
||||
if "no_mac" not in tags:
|
||||
tags.append("no_mac")
|
||||
if "windows" not in platforms:
|
||||
if "no_windows" not in tags:
|
||||
tags.append("no_windows")
|
||||
if "ios" not in platforms:
|
||||
if "no_test_ios" not in tags:
|
||||
tags.append("no_test_ios")
|
||||
return tags
|
||||
|
||||
base_params = {
|
||||
"name": name,
|
||||
"srcs": srcs,
|
||||
"deps": deps,
|
||||
"tags": tags,
|
||||
"args": args,
|
||||
"exclude_pollers": exclude_pollers,
|
||||
"uses_polling": uses_polling,
|
||||
"uses_event_engine": uses_event_engine,
|
||||
"flaky": flaky,
|
||||
}
|
||||
|
||||
experiment_config = expand_poller_config(**base_params)
|
||||
experiment_enables = {k: v for k, v in EXPERIMENT_ENABLES.items() + TEST_EXPERIMENT_ENABLES.items()}
|
||||
experiment_pollers = EXPERIMENT_POLLERS + TEST_EXPERIMENT_POLLERS
|
||||
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):
|
||||
config = dict(config)
|
||||
config["name"] = config["name"] + "@experiment=" + experiment
|
||||
env = dict(config["env"])
|
||||
env["GRPC_EXPERIMENTS"] = experiment_enables[experiment]
|
||||
env["GRPC_CI_EXPERIMENTS"] = "1"
|
||||
config["env"] = env
|
||||
tags = config["tags"] + ["experiment_variation"]
|
||||
for tag in must_have_tags + enabled_tags:
|
||||
if tag not in tags:
|
||||
tags = tags + [tag]
|
||||
config["tags"] = _update_experiments_platform_test_tags(tags, experiments[mode][experiment])
|
||||
config["flaky"] = True
|
||||
experiment_config.append(config)
|
||||
if disabled_tags != None:
|
||||
for experiment in experiments[mode].keys():
|
||||
experiment_params = dict(base_params)
|
||||
experiment_params["uses_polling"] = uses_polling and (experiment in experiment_pollers)
|
||||
for config in expand_poller_config(**experiment_params):
|
||||
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"]
|
||||
for tag in must_have_tags + disabled_tags:
|
||||
if tag not in tags:
|
||||
tags = tags + [tag]
|
||||
config["tags"] = _update_experiments_platform_test_tags(tags, experiments[mode][experiment])
|
||||
experiment_config.append(config)
|
||||
return experiment_config
|
||||
|
||||
def grpc_cc_test(name, srcs = [], deps = [], external_deps = [], args = [], data = [], uses_polling = True, language = "C++", size = "medium", timeout = None, tags = [], exec_compatible_with = [], exec_properties = {}, shard_count = None, flaky = None, copts = [], linkstatic = None, exclude_pollers = [], uses_event_engine = True):
|
||||
"""A cc_test target for use in the gRPC repo.
|
||||
|
||||
|
|
@ -543,7 +357,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 = {
|
||||
|
|
@ -555,40 +369,38 @@ def grpc_cc_test(name, srcs = [], deps = [], external_deps = [], args = [], data
|
|||
"exec_compatible_with": exec_compatible_with,
|
||||
"exec_properties": exec_properties,
|
||||
"shard_count": shard_count,
|
||||
"flaky": flaky,
|
||||
"linkstatic": linkstatic,
|
||||
}
|
||||
|
||||
if "grpc-fuzzer" not in tags and "no_test_ios" not in tags:
|
||||
if "grpc-fuzzer" not in tags:
|
||||
ios_cc_test(
|
||||
name = name,
|
||||
srcs = srcs,
|
||||
tags = tags,
|
||||
deps = core_deps,
|
||||
args = args,
|
||||
flaky = True,
|
||||
**test_args
|
||||
)
|
||||
if not uses_polling:
|
||||
# the test behavior doesn't depend on polling, just generate the test
|
||||
native.cc_test(
|
||||
name = name,
|
||||
srcs = srcs,
|
||||
tags = tags + ["no_uses_polling"],
|
||||
deps = core_deps,
|
||||
args = args,
|
||||
**test_args
|
||||
)
|
||||
return
|
||||
|
||||
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"]))
|
||||
for poller_config in expand_tests_for_each_poller_and_engine(name, srcs, core_deps, tags, args, exclude_pollers, uses_event_engine):
|
||||
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"],
|
||||
flaky = poller_config["flaky"],
|
||||
**test_args
|
||||
)
|
||||
|
||||
|
|
@ -621,7 +433,7 @@ def grpc_cc_binary(name, srcs = [], deps = [], external_deps = [], args = [], da
|
|||
data = data,
|
||||
testonly = testonly,
|
||||
linkshared = linkshared,
|
||||
deps = deps + _get_external_deps(external_deps) + ["//test/core/test_util:grpc_suppressions"],
|
||||
deps = deps + _get_external_deps(external_deps) + ["//test/core/util:grpc_suppressions"],
|
||||
copts = GRPC_DEFAULT_COPTS + copts,
|
||||
linkopts = if_not_windows(["-pthread"]) + linkopts,
|
||||
tags = tags,
|
||||
|
|
@ -643,9 +455,6 @@ def grpc_generate_one_off_targets():
|
|||
def grpc_generate_objc_one_off_targets():
|
||||
pass
|
||||
|
||||
def grpc_generate_one_off_internal_targets():
|
||||
pass
|
||||
|
||||
def grpc_sh_test(name, srcs = [], args = [], data = [], uses_polling = True, size = "medium", timeout = None, tags = [], exec_compatible_with = [], exec_properties = {}, shard_count = None, flaky = None, exclude_pollers = [], uses_event_engine = True):
|
||||
"""Execute an sh_test for every <poller> x <EventEngine> combination
|
||||
|
||||
|
|
@ -675,17 +484,25 @@ def grpc_sh_test(name, srcs = [], args = [], data = [], uses_polling = True, siz
|
|||
"exec_compatible_with": exec_compatible_with,
|
||||
"exec_properties": exec_properties,
|
||||
"shard_count": shard_count,
|
||||
"flaky": flaky,
|
||||
}
|
||||
if not uses_polling:
|
||||
native.sh_test(
|
||||
name = name,
|
||||
srcs = srcs,
|
||||
args = args,
|
||||
tags = tags,
|
||||
**test_args
|
||||
)
|
||||
return
|
||||
|
||||
for poller_config in expand_tests(name, srcs, [], tags, args, exclude_pollers, uses_polling, uses_event_engine, flaky):
|
||||
for poller_config in expand_tests_for_each_poller_and_engine(name, srcs, [], tags, args, exclude_pollers, uses_event_engine):
|
||||
native.sh_test(
|
||||
name = poller_config["name"],
|
||||
srcs = poller_config["srcs"],
|
||||
deps = poller_config["deps"],
|
||||
tags = poller_config["tags"],
|
||||
args = poller_config["args"],
|
||||
env = poller_config["env"],
|
||||
flaky = poller_config["flaky"],
|
||||
**test_args
|
||||
)
|
||||
|
||||
|
|
@ -739,24 +556,14 @@ 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 = [],
|
||||
hdrs = [],
|
||||
non_arc_srcs = [],
|
||||
textual_hdrs = [],
|
||||
testonly = False,
|
||||
data = [],
|
||||
deps = [],
|
||||
defines = [],
|
||||
sdk_frameworks = [],
|
||||
includes = [],
|
||||
visibility = ["//visibility:public"]):
|
||||
"""The grpc version of objc_library, only used for the Objective-C library compilation
|
||||
|
|
@ -765,12 +572,9 @@ def grpc_objc_library(
|
|||
name: name of target
|
||||
hdrs: public headers
|
||||
srcs: all source files (.m)
|
||||
non_arc_srcs: list of Objective-C files that DO NOT use ARC.
|
||||
textual_hdrs: private headers
|
||||
testonly: Whether the binary is for tests only.
|
||||
data: any other bundle resources
|
||||
defines: preprocessors
|
||||
sdk_frameworks: sdks
|
||||
includes: added to search path, always [the path to objc directory]
|
||||
deps: dependencies
|
||||
visibility: visibility, default to public
|
||||
|
|
@ -780,15 +584,11 @@ def grpc_objc_library(
|
|||
name = name,
|
||||
hdrs = hdrs,
|
||||
srcs = srcs,
|
||||
non_arc_srcs = non_arc_srcs,
|
||||
textual_hdrs = textual_hdrs,
|
||||
copts = GRPC_DEFAULT_COPTS + ["-ObjC++", "-std=gnu++14"],
|
||||
testonly = testonly,
|
||||
data = data,
|
||||
deps = deps,
|
||||
defines = defines,
|
||||
includes = includes,
|
||||
sdk_frameworks = sdk_frameworks,
|
||||
visibility = visibility,
|
||||
)
|
||||
|
||||
|
|
@ -804,22 +604,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,182 @@
|
|||
"""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_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 = "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 = "libuv",
|
||||
actual = "@com_github_libuv_libuv//:libuv",
|
||||
)
|
||||
|
||||
native.bind(
|
||||
name = "libuv_test",
|
||||
actual = "@com_github_libuv_libuv//:libuv_test",
|
||||
)
|
||||
|
||||
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 = "ad0b806b6c5cbd6cae121c608945d5fed468748e330632e8d53315089ad52c67",
|
||||
strip_prefix = "boringssl-6195bf8242156c9a2fa75702eee058f91b86a88b",
|
||||
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/6195bf8242156c9a2fa75702eee058f91b86a88b.tar.gz",
|
||||
"https://github.com/google/boringssl/archive/6195bf8242156c9a2fa75702eee058f91b86a88b.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -47,85 +197,70 @@ 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 = "63c5539a8506dc6bccd352a857cea106e0a389ce047a3ff0a78fe3f8fede410d",
|
||||
strip_prefix = "protobuf-24487dd1045c7f3d64a21f38a3f0c06cc4cf2edb",
|
||||
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",
|
||||
],
|
||||
patches = [
|
||||
"@com_github_grpc_grpc//third_party:protobuf.patch",
|
||||
"@com_github_grpc_grpc//third_party:protobuf.10007.patch",
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/protocolbuffers/protobuf/archive/24487dd1045c7f3d64a21f38a3f0c06cc4cf2edb.tar.gz",
|
||||
"https://github.com/protocolbuffers/protobuf/archive/24487dd1045c7f3d64a21f38a3f0c06cc4cf2edb.tar.gz",
|
||||
],
|
||||
patches = ["@com_github_grpc_grpc//third_party:protobuf.patch"],
|
||||
patch_args = ["-p1"],
|
||||
)
|
||||
|
||||
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",
|
||||
],
|
||||
)
|
||||
|
||||
if "com_google_fuzztest" not in native.existing_rules():
|
||||
# when updating this remember to run:
|
||||
# bazel run @com_google_fuzztest//bazel:setup_configs > tools/fuzztest.bazelrc
|
||||
http_archive(
|
||||
name = "com_google_fuzztest",
|
||||
sha256 = "cdf8d8cd3cdc77280a7c59b310edf234e489a96b6e727cb271e7dfbeb9bcca8d",
|
||||
strip_prefix = "fuzztest-4ecaeb5084a061a862af8f86789ee184cd3d3f18",
|
||||
urls = [
|
||||
# 2023-05-16
|
||||
"https://github.com/google/fuzztest/archive/4ecaeb5084a061a862af8f86789ee184cd3d3f18.tar.gz",
|
||||
# 2022-02-09
|
||||
"https://github.com/google/googletest/archive/0e402173c97aea7a00749e825b194bfede4f2e45.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
if "rules_cc" not in native.existing_rules():
|
||||
http_archive(
|
||||
name = "rules_cc",
|
||||
sha256 = "2037875b9a4456dce4a79d112a8ae885bbc4aad968e6587dca6e64f3a0900cdf",
|
||||
strip_prefix = "rules_cc-0.0.9",
|
||||
sha256 = "35f2fb4ea0b3e61ad64a369de284e4fbbdcdba71836a5555abb5e194cf119509",
|
||||
strip_prefix = "rules_cc-624b5d59dfb45672d4239422fa1e3de1822ee110",
|
||||
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",
|
||||
#2019-08-15
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/bazelbuild/rules_cc/archive/624b5d59dfb45672d4239422fa1e3de1822ee110.tar.gz",
|
||||
"https://github.com/bazelbuild/rules_cc/archive/624b5d59dfb45672d4239422fa1e3de1822ee110.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 = "0b921a3bc39e35f4275c8dcc658af2391c150fb966102341287b0401ff2e6f21",
|
||||
strip_prefix = "benchmark-0baacde3618ca617da95375e0af13ce1baadea47",
|
||||
urls = [
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/google/benchmark/archive/344117638c8ff7e239044fd0fa7085839fc03021.tar.gz",
|
||||
"https://github.com/google/benchmark/archive/344117638c8ff7e239044fd0fa7085839fc03021.tar.gz",
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/google/benchmark/archive/0baacde3618ca617da95375e0af13ce1baadea47.tar.gz",
|
||||
"https://github.com/google/benchmark/archive/0baacde3618ca617da95375e0af13ce1baadea47.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
if "com_googlesource_code_re2" not in native.existing_rules():
|
||||
http_archive(
|
||||
name = "com_googlesource_code_re2",
|
||||
sha256 = "1ae8ccfdb1066a731bba6ee0881baad5efd2cd661acd9569b689f2586e1a50e9",
|
||||
strip_prefix = "re2-2022-04-01",
|
||||
sha256 = "319a58a58d8af295db97dfeecc4e250179c5966beaa2d842a82f0a013b6a239b",
|
||||
# Release 2021-09-01
|
||||
strip_prefix = "re2-8e08f47b11b413302749c0d8b17a1c94777495d5",
|
||||
urls = [
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/google/re2/archive/2022-04-01.tar.gz",
|
||||
"https://github.com/google/re2/archive/2022-04-01.tar.gz",
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/google/re2/archive/8e08f47b11b413302749c0d8b17a1c94777495d5.tar.gz",
|
||||
"https://github.com/google/re2/archive/8e08f47b11b413302749c0d8b17a1c94777495d5.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -133,22 +268,22 @@ def grpc_deps():
|
|||
http_archive(
|
||||
name = "com_github_cares_cares",
|
||||
build_file = "@com_github_grpc_grpc//third_party:cares/cares.BUILD",
|
||||
sha256 = "bf26e5b25e259911914a85ae847b6d723488adb5af4f8bdeb9d0871a318476e3",
|
||||
strip_prefix = "c-ares-6360e96b5cf8e5980c887ce58ef727e53d77243a",
|
||||
sha256 = "ec76c5e79db59762776bece58b69507d095856c37b81fd35bfb0958e74b61d93",
|
||||
strip_prefix = "c-ares-6654436a307a5a686b008c1d4c93b0085da6e6d8",
|
||||
urls = [
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/c-ares/c-ares/archive/6360e96b5cf8e5980c887ce58ef727e53d77243a.tar.gz",
|
||||
"https://github.com/c-ares/c-ares/archive/6360e96b5cf8e5980c887ce58ef727e53d77243a.tar.gz",
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/c-ares/c-ares/archive/6654436a307a5a686b008c1d4c93b0085da6e6d8.tar.gz",
|
||||
"https://github.com/c-ares/c-ares/archive/6654436a307a5a686b008c1d4c93b0085da6e6d8.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
if "com_google_absl" not in native.existing_rules():
|
||||
http_archive(
|
||||
name = "com_google_absl",
|
||||
sha256 = "338420448b140f0dfd1a1ea3c3ce71b3bc172071f24f4d9a57d59b45037da440",
|
||||
strip_prefix = "abseil-cpp-20240116.0",
|
||||
sha256 = "4208129b49006089ba1d6710845a45e31c59b0ab6bff9e5788a87f55c5abd602",
|
||||
strip_prefix = "abseil-cpp-20220623.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/20220623.0.tar.gz",
|
||||
"https://github.com/abseil/abseil-cpp/archive/20220623.0.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -168,10 +303,10 @@ def grpc_deps():
|
|||
http_archive(
|
||||
name = "bazel_skylib",
|
||||
urls = [
|
||||
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
|
||||
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
|
||||
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.2/bazel-skylib-1.0.2.tar.gz",
|
||||
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.2/bazel-skylib-1.0.2.tar.gz",
|
||||
],
|
||||
sha256 = "1c531376ac7e5a180e0237938a2536de0c54d93f5c278634818e0efc952dd56c",
|
||||
sha256 = "97e70364e9249702246c0e9444bccdc4b847bed1eb03c5a3ece4f83dfe6abc44",
|
||||
)
|
||||
|
||||
if "bazel_compdb" not in native.existing_rules():
|
||||
|
|
@ -188,22 +323,33 @@ def grpc_deps():
|
|||
if "io_opencensus_cpp" not in native.existing_rules():
|
||||
http_archive(
|
||||
name = "io_opencensus_cpp",
|
||||
sha256 = "46b3b5812c150a21bacf860c2f76fc42b89773ed77ee954c32adeb8593aa2a8e",
|
||||
strip_prefix = "opencensus-cpp-5501a1a255805e0be83a41348bb5f2630d5ed6b3",
|
||||
sha256 = "20119a53cc1c140347671ac40650d797567ec63bd3a9f135e17f144fdb36c272",
|
||||
strip_prefix = "opencensus-cpp-3e6aa4c0fb31d2f39a2d38365483599ab50bef6d",
|
||||
urls = [
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/census-instrumentation/opencensus-cpp/archive/5501a1a255805e0be83a41348bb5f2630d5ed6b3.tar.gz",
|
||||
"https://github.com/census-instrumentation/opencensus-cpp/archive/5501a1a255805e0be83a41348bb5f2630d5ed6b3.tar.gz",
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/census-instrumentation/opencensus-cpp/archive/3e6aa4c0fb31d2f39a2d38365483599ab50bef6d.tar.gz",
|
||||
"https://github.com/census-instrumentation/opencensus-cpp/archive/3e6aa4c0fb31d2f39a2d38365483599ab50bef6d.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
if "upb" not in native.existing_rules():
|
||||
http_archive(
|
||||
name = "upb",
|
||||
sha256 = "017a7e8e4e842d01dba5dc8aa316323eee080cd1b75986a7d1f94d87220e6502",
|
||||
strip_prefix = "upb-e4635f223e7d36dfbea3b722a4ca4807a7e882e2",
|
||||
urls = [
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/protocolbuffers/upb/archive/e4635f223e7d36dfbea3b722a4ca4807a7e882e2.tar.gz",
|
||||
"https://github.com/protocolbuffers/upb/archive/e4635f223e7d36dfbea3b722a4ca4807a7e882e2.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
if "envoy_api" not in native.existing_rules():
|
||||
http_archive(
|
||||
name = "envoy_api",
|
||||
sha256 = "ddd3beedda1178a79e0d988f76f362002aced09749452515853f106e22bd2249",
|
||||
strip_prefix = "data-plane-api-78f198cf96ecdc7120ef640406770aa01af775c4",
|
||||
sha256 = "0fe4c68dea4423f5880c068abbcbc90ac4b98496cf2af15a1fe3fbc0fdb050fd",
|
||||
strip_prefix = "data-plane-api-bf6154e482bbd5e6f64032993206e66b6116f2bd",
|
||||
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/bf6154e482bbd5e6f64032993206e66b6116f2bd.tar.gz",
|
||||
"https://github.com/envoyproxy/data-plane-api/archive/bf6154e482bbd5e6f64032993206e66b6116f2bd.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -220,20 +366,32 @@ def grpc_deps():
|
|||
if "build_bazel_rules_apple" not in native.existing_rules():
|
||||
http_archive(
|
||||
name = "build_bazel_rules_apple",
|
||||
sha256 = "34c41bfb59cdaea29ac2df5a2fa79e5add609c71bb303b2ebb10985f93fa20e7",
|
||||
sha256 = "0052d452af7742c8f3a4e0929763388a66403de363775db7e90adecb2ba4944b",
|
||||
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/0.31.3/rules_apple.0.31.3.tar.gz",
|
||||
"https://github.com/bazelbuild/rules_apple/releases/download/0.31.3/rules_apple.0.31.3.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
if "build_bazel_apple_support" not in native.existing_rules():
|
||||
http_archive(
|
||||
name = "build_bazel_apple_support",
|
||||
sha256 = "cf4d63f39c7ba9059f70e995bf5fe1019267d3f77379c2028561a5d7645ef67c",
|
||||
sha256 = "76df040ade90836ff5543888d64616e7ba6c3a7b33b916aa3a4b68f342d1b447",
|
||||
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/0.11.0/apple_support.0.11.0.tar.gz",
|
||||
"https://github.com/bazelbuild/apple_support/releases/download/0.11.0/apple_support.0.11.0.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
if "com_github_libuv_libuv" not in native.existing_rules():
|
||||
http_archive(
|
||||
name = "com_github_libuv_libuv",
|
||||
build_file = "@com_github_grpc_grpc//third_party:libuv.BUILD",
|
||||
sha256 = "5ca4e9091f3231d8ad8801862dc4e851c23af89c69141d27723157776f7291e7",
|
||||
strip_prefix = "libuv-02a9e1be252b623ee032a3137c0b0c94afbe6809",
|
||||
urls = [
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/libuv/libuv/archive/02a9e1be252b623ee032a3137c0b0c94afbe6809.tar.gz",
|
||||
"https://github.com/libuv/libuv/archive/02a9e1be252b623ee032a3137c0b0c94afbe6809.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -242,7 +400,6 @@ def grpc_deps():
|
|||
name = "com_google_googleapis",
|
||||
sha256 = "5bb6b0253ccf64b53d6c7249625a7e3f6c3bc6402abd52d3778bfa48258703a0",
|
||||
strip_prefix = "googleapis-2f9af297c84c55c8b871ba4495e01ade42476c92",
|
||||
build_file = Label("//bazel:googleapis.BUILD"),
|
||||
urls = [
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/googleapis/googleapis/archive/2f9af297c84c55c8b871ba4495e01ade42476c92.tar.gz",
|
||||
"https://github.com/googleapis/googleapis/archive/2f9af297c84c55c8b871ba4495e01ade42476c92.tar.gz",
|
||||
|
|
@ -252,10 +409,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 +439,14 @@ def grpc_deps():
|
|||
patch_args = ["-p1"],
|
||||
)
|
||||
|
||||
if "com_github_cncf_xds" not in native.existing_rules():
|
||||
if "com_github_cncf_udpa" not in native.existing_rules():
|
||||
http_archive(
|
||||
name = "com_github_cncf_xds",
|
||||
sha256 = "dc305e20c9fa80822322271b50aa2ffa917bf4fd3973bcec52bfc28dc32c5927",
|
||||
strip_prefix = "xds-3a472e524827f72d1ad621c4983dd5af54c46776",
|
||||
name = "com_github_cncf_udpa",
|
||||
sha256 = "5bc8365613fe2f8ce6cc33959b7667b13b7fe56cb9d16ba740c06e1a7c4242fc",
|
||||
strip_prefix = "xds-cb28da3451f158a947dfc45090fe92b07b243bc1",
|
||||
urls = [
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/cncf/xds/archive/3a472e524827f72d1ad621c4983dd5af54c46776.tar.gz",
|
||||
"https://github.com/cncf/xds/archive/3a472e524827f72d1ad621c4983dd5af54c46776.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
# TODO(stanleycheung): remove this when prometheus-cpp AND
|
||||
# opentelemetry-cpp cut a new release
|
||||
# This override is needed because this fix
|
||||
# https://github.com/jupp0r/prometheus-cpp/pull/626
|
||||
# has not been included in the latest prometheus-cpp release yet.
|
||||
# We also need opentelemetry-cpp to update their dependency on
|
||||
# prometheus-cpp after that fix is released.
|
||||
# Without the fix, we cannot build the prometheus exporter with bazel 6
|
||||
if "com_github_jupp0r_prometheus_cpp" not in native.existing_rules():
|
||||
http_archive(
|
||||
name = "com_github_jupp0r_prometheus_cpp",
|
||||
strip_prefix = "prometheus-cpp-b1234816facfdda29845c46696a02998a4af115a",
|
||||
urls = [
|
||||
"https://github.com/jupp0r/prometheus-cpp/archive/b123481.zip",
|
||||
],
|
||||
)
|
||||
|
||||
if "io_opentelemetry_cpp" not in native.existing_rules():
|
||||
http_archive(
|
||||
name = "io_opentelemetry_cpp",
|
||||
sha256 = "ed681d20a684b7d485a49288e7cfb2d182bf882e5c112c5f2fa3f9e9da2278fc",
|
||||
strip_prefix = "opentelemetry-cpp-4bd64c9a336fd438d6c4c9dad2e6b61b0585311f",
|
||||
urls = [
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/open-telemetry/opentelemetry-cpp/archive/4bd64c9a336fd438d6c4c9dad2e6b61b0585311f.tar.gz",
|
||||
"https://github.com/open-telemetry/opentelemetry-cpp/archive/4bd64c9a336fd438d6c4c9dad2e6b61b0585311f.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
if "google_cloud_cpp" not in native.existing_rules():
|
||||
http_archive(
|
||||
name = "google_cloud_cpp",
|
||||
sha256 = "7ca7f583b60d2aa1274411fed3b9fb3887119b2e84244bb3fc69ea1db819e4e5",
|
||||
strip_prefix = "google-cloud-cpp-2.16.0",
|
||||
urls = [
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/googleapis/google-cloud-cpp/archive/refs/tags/v2.16.0.tar.gz",
|
||||
"https://github.com/googleapis/google-cloud-cpp/archive/refs/tags/v2.16.0.tar.gz",
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/cncf/xds/archive/cb28da3451f158a947dfc45090fe92b07b243bc1.tar.gz",
|
||||
"https://github.com/cncf/xds/archive/cb28da3451f158a947dfc45090fe92b07b243bc1.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -341,6 +459,15 @@ def grpc_test_only_deps():
|
|||
|
||||
Loads dependencies that are only needed to run grpc library's tests.
|
||||
"""
|
||||
native.bind(
|
||||
name = "twisted",
|
||||
actual = "@com_github_twisted_twisted//:twisted",
|
||||
)
|
||||
|
||||
native.bind(
|
||||
name = "yaml",
|
||||
actual = "@com_github_yaml_pyyaml//:yaml",
|
||||
)
|
||||
|
||||
if "com_github_twisted_twisted" not in native.existing_rules():
|
||||
http_archive(
|
||||
|
|
@ -357,11 +484,11 @@ def grpc_test_only_deps():
|
|||
if "com_github_yaml_pyyaml" not in native.existing_rules():
|
||||
http_archive(
|
||||
name = "com_github_yaml_pyyaml",
|
||||
sha256 = "e34d97db6d846f5e2ad51417fd646e7ce6a3a70726ccea2a857e0580a7155f39",
|
||||
strip_prefix = "pyyaml-6.0.1",
|
||||
sha256 = "6b4314b1b2051ddb9d4fcd1634e1fa9c1bb4012954273c9ff3ef689f6ec6c93e",
|
||||
strip_prefix = "pyyaml-3.12",
|
||||
urls = [
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/yaml/pyyaml/archive/6.0.1.zip",
|
||||
"https://github.com/yaml/pyyaml/archive/6.0.1.zip",
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/yaml/pyyaml/archive/3.12.zip",
|
||||
"https://github.com/yaml/pyyaml/archive/3.12.zip",
|
||||
],
|
||||
build_file = "@com_github_grpc_grpc//third_party:yaml.BUILD",
|
||||
)
|
||||
|
|
@ -405,11 +532,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 = "b847c71723d8ce0b747aa661d7f3a07f1d16c595bf9c0202f30febc2f9a24a06",
|
||||
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://github.com/google/libprotobuf-mutator/archive/ffd86a32874e5c08a143019aad1aaf0907294c9f.tar.gz",
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/google/libprotobuf-mutator/archive/ffd86a32874e5c08a143019aad1aaf0907294c9f.tar.gz",
|
||||
],
|
||||
strip_prefix = "libprotobuf-mutator-1f95f8083066f5b38fd2db172e7e7f9aa7c49d2d",
|
||||
strip_prefix = "libprotobuf-mutator-ffd86a32874e5c08a143019aad1aaf0907294c9f",
|
||||
build_file = "@com_github_grpc_grpc//third_party:libprotobuf_mutator.BUILD",
|
||||
)
|
||||
|
|
|
|||
|
|
@ -20,9 +20,8 @@ load("@com_envoyproxy_protoc_gen_validate//:dependencies.bzl", "go_third_party")
|
|||
load("@com_google_googleapis//:repository_rules.bzl", "switched_rules_by_language")
|
||||
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
|
||||
load("@envoy_api//bazel:repositories.bzl", "api_dependencies")
|
||||
load("@google_cloud_cpp//bazel:google_cloud_cpp_deps.bzl", "google_cloud_cpp_deps")
|
||||
load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")
|
||||
load("@rules_python//python:repositories.bzl", "py_repositories")
|
||||
load("@upb//bazel:workspace_deps.bzl", "upb_deps")
|
||||
|
||||
def grpc_extra_deps(ignore_version_differences = False):
|
||||
"""Loads the extra dependencies.
|
||||
|
|
@ -49,10 +48,12 @@ def grpc_extra_deps(ignore_version_differences = False):
|
|||
"""
|
||||
protobuf_deps()
|
||||
|
||||
upb_deps()
|
||||
|
||||
api_dependencies()
|
||||
|
||||
go_rules_dependencies()
|
||||
go_register_toolchains(version = "1.20")
|
||||
go_register_toolchains(version = "1.18")
|
||||
gazelle_dependencies()
|
||||
|
||||
# Pull-in the go 3rd party dependencies for protoc_gen_validate, which is
|
||||
|
|
@ -70,7 +71,3 @@ def grpc_extra_deps(ignore_version_differences = False):
|
|||
grpc = True,
|
||||
python = True,
|
||||
)
|
||||
|
||||
google_cloud_cpp_deps()
|
||||
|
||||
py_repositories()
|
||||
|
|
|
|||
|
|
@ -19,12 +19,43 @@ 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():
|
||||
|
||||
# protobuf binds to the name "six", so we can't use it here.
|
||||
# See https://github.com/bazelbuild/bazel/issues/1952 for why bind is
|
||||
# horrible.
|
||||
if "six" 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 = "six",
|
||||
build_file = "@com_github_grpc_grpc//third_party:six.BUILD",
|
||||
sha256 = "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926",
|
||||
urls = ["https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz"],
|
||||
)
|
||||
|
||||
if "enum34" not in native.existing_rules():
|
||||
http_archive(
|
||||
name = "enum34",
|
||||
build_file = "@com_github_grpc_grpc//third_party:enum34.BUILD",
|
||||
strip_prefix = "enum34-1.1.6",
|
||||
sha256 = "8ad8c4783bf61ded74527bffb48ed9b54166685e4230386a9ed9b1279e2df5b1",
|
||||
urls = ["https://files.pythonhosted.org/packages/bf/3e/31d502c25302814a7c2f1d3959d2a3b3f78e509002ba91aea64993936876/enum34-1.1.6.tar.gz"],
|
||||
)
|
||||
|
||||
if "futures" not in native.existing_rules():
|
||||
http_archive(
|
||||
name = "futures",
|
||||
build_file = "@com_github_grpc_grpc//third_party:futures.BUILD",
|
||||
strip_prefix = "futures-3.3.0",
|
||||
sha256 = "7e033af76a5e35f58e56da7a91e687706faf4e7bdfb2cbc3f2cca6b9bcda9794",
|
||||
urls = ["https://files.pythonhosted.org/packages/47/04/5fc6c74ad114032cd2c544c575bffc17582295e9cd6a851d6026ab4b2c00/futures-3.3.0.tar.gz"],
|
||||
)
|
||||
|
||||
if "io_bazel_rules_python" not in native.existing_rules():
|
||||
http_archive(
|
||||
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")
|
||||
|
|
@ -38,9 +69,9 @@ def grpc_python_deps():
|
|||
http_archive(
|
||||
name = "cython",
|
||||
build_file = "@com_github_grpc_grpc//third_party:cython.BUILD",
|
||||
sha256 = "a2da56cc22be823acf49741b9aa3aa116d4f07fa8e8b35a3cb08b8447b37c607",
|
||||
strip_prefix = "cython-0.29.35",
|
||||
sha256 = "bb72b2f0ef029472759c711f0a4bded6e15e3f9bda3797550cef3c1d87d02283",
|
||||
strip_prefix = "cython-0.29.26",
|
||||
urls = [
|
||||
"https://github.com/cython/cython/archive/0.29.35.tar.gz",
|
||||
"https://github.com/cython/cython/archive/0.29.26.tar.gz",
|
||||
],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
],
|
||||
)
|
||||
|
|
@ -18,36 +18,24 @@ load("@rules_proto//proto:defs.bzl", "ProtoInfo")
|
|||
_PROTO_EXTENSION = ".proto"
|
||||
_VIRTUAL_IMPORTS = "/_virtual_imports/"
|
||||
|
||||
_WELL_KNOWN_PROTOS_BASE = [
|
||||
"any_proto",
|
||||
"api_proto",
|
||||
"compiler_plugin_proto",
|
||||
"descriptor_proto",
|
||||
"duration_proto",
|
||||
"empty_proto",
|
||||
"field_mask_proto",
|
||||
"source_context_proto",
|
||||
"struct_proto",
|
||||
"timestamp_proto",
|
||||
"type_proto",
|
||||
"wrappers_proto",
|
||||
]
|
||||
|
||||
def well_known_proto_libs():
|
||||
return ["@com_google_protobuf//:" + b for b in _WELL_KNOWN_PROTOS_BASE]
|
||||
return [
|
||||
"@com_google_protobuf//:any_proto",
|
||||
"@com_google_protobuf//:api_proto",
|
||||
"@com_google_protobuf//:compiler_plugin_proto",
|
||||
"@com_google_protobuf//:descriptor_proto",
|
||||
"@com_google_protobuf//:duration_proto",
|
||||
"@com_google_protobuf//:empty_proto",
|
||||
"@com_google_protobuf//:field_mask_proto",
|
||||
"@com_google_protobuf//:source_context_proto",
|
||||
"@com_google_protobuf//:struct_proto",
|
||||
"@com_google_protobuf//:timestamp_proto",
|
||||
"@com_google_protobuf//:type_proto",
|
||||
"@com_google_protobuf//:wrappers_proto",
|
||||
]
|
||||
|
||||
def is_well_known(label):
|
||||
# Bazel surfaces labels as their undelying identity, even if they are referenced
|
||||
# via aliases. Bazel also does not currently provide a way to find the real label
|
||||
# underlying an alias. So the implementation detail that the WKTs present at the
|
||||
# top level of the protobuf repo are actually backed by targets in the
|
||||
# //src/google/protobuf package leaks through here.
|
||||
# We include both the alias path and the underlying path to be resilient to
|
||||
# reversions of this change as well as for continuing compatiblity with repos
|
||||
# that happen to pull in older versions of protobuf.
|
||||
all_wkt_targets = (["@com_google_protobuf//:" + b for b in _WELL_KNOWN_PROTOS_BASE] +
|
||||
["@com_google_protobuf//src/google/protobuf:" + b for b in _WELL_KNOWN_PROTOS_BASE])
|
||||
return label in all_wkt_targets
|
||||
return label in well_known_proto_libs()
|
||||
|
||||
def get_proto_root(workspace_root):
|
||||
"""Gets the root protobuf directory.
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@ load(
|
|||
)
|
||||
|
||||
_GENERATED_PROTO_FORMAT = "{}_pb2.py"
|
||||
_GENERATED_PROTO_STUB_FORMAT = "{}_pb2.pyi"
|
||||
_GENERATED_GRPC_PROTO_FORMAT = "{}_pb2_grpc.py"
|
||||
|
||||
PyProtoInfo = provider(
|
||||
|
|
@ -49,10 +48,7 @@ def _gen_py_aspect_impl(target, context):
|
|||
# Early return for well-known protos.
|
||||
if is_well_known(str(context.label)):
|
||||
return [
|
||||
PyProtoInfo(
|
||||
py_info = context.attr._protobuf_library[PyInfo],
|
||||
generated_py_srcs = [],
|
||||
),
|
||||
PyProtoInfo(py_info = context.attr._protobuf_library[PyInfo]),
|
||||
]
|
||||
|
||||
protos = []
|
||||
|
|
@ -60,8 +56,7 @@ def _gen_py_aspect_impl(target, context):
|
|||
protos.append(get_staged_proto_file(target.label, context, p))
|
||||
|
||||
includes = depset(direct = protos, transitive = [target[ProtoInfo].transitive_imports])
|
||||
out_files = (declare_out_files(protos, context, _GENERATED_PROTO_FORMAT) +
|
||||
declare_out_files(protos, context, _GENERATED_PROTO_STUB_FORMAT))
|
||||
out_files = declare_out_files(protos, context, _GENERATED_PROTO_FORMAT)
|
||||
generated_py_srcs = out_files
|
||||
|
||||
tools = [context.executable._protoc]
|
||||
|
|
@ -70,7 +65,6 @@ def _gen_py_aspect_impl(target, context):
|
|||
|
||||
arguments = ([
|
||||
"--python_out={}".format(out_dir.path),
|
||||
"--pyi_out={}".format(out_dir.path),
|
||||
] + [
|
||||
"--proto_path={}".format(get_include_directory(i))
|
||||
for i in includes.to_list()
|
||||
|
|
@ -110,10 +104,10 @@ _gen_py_aspect = aspect(
|
|||
fragments = ["py"],
|
||||
attrs = {
|
||||
"_protoc": attr.label(
|
||||
default = Label("@com_google_protobuf//:protoc"),
|
||||
default = Label("//external:protocol_compiler"),
|
||||
providers = ["files_to_run"],
|
||||
executable = True,
|
||||
cfg = "exec",
|
||||
cfg = "host",
|
||||
),
|
||||
"_protobuf_library": attr.label(
|
||||
default = Label("@com_google_protobuf//:protobuf_python"),
|
||||
|
|
@ -140,7 +134,7 @@ def _generate_py_impl(context):
|
|||
for py_src in context.attr.deps[0][PyProtoInfo].generated_py_srcs:
|
||||
reimport_py_file = context.actions.declare_file(py_src.basename)
|
||||
py_sources.append(reimport_py_file)
|
||||
import_line = "from %s import *" % py_src.short_path.replace("..", "external").replace("/", ".")[:-len(".py")]
|
||||
import_line = "from %s import *" % py_src.short_path.replace("/", ".")[:-len(".py")]
|
||||
context.actions.write(reimport_py_file, import_line)
|
||||
|
||||
# Collect output PyInfo provider.
|
||||
|
|
@ -166,10 +160,10 @@ py_proto_library = rule(
|
|||
aspects = [_gen_py_aspect],
|
||||
),
|
||||
"_protoc": attr.label(
|
||||
default = Label("@com_google_protobuf//:protoc"),
|
||||
default = Label("//external:protocol_compiler"),
|
||||
providers = ["files_to_run"],
|
||||
executable = True,
|
||||
cfg = "exec",
|
||||
cfg = "host",
|
||||
),
|
||||
"_protobuf_library": attr.label(
|
||||
default = Label("@com_google_protobuf//:protobuf_python"),
|
||||
|
|
@ -190,15 +184,10 @@ def _generate_pb2_grpc_src_impl(context):
|
|||
arguments = []
|
||||
tools = [context.executable._protoc, context.executable._grpc_plugin]
|
||||
out_dir = get_out_dir(protos, context)
|
||||
if out_dir.import_path:
|
||||
# is virtual imports
|
||||
out_path = out_dir.path
|
||||
else:
|
||||
out_path = context.genfiles_dir.path
|
||||
arguments += get_plugin_args(
|
||||
context.executable._grpc_plugin,
|
||||
plugin_flags,
|
||||
out_path,
|
||||
out_dir.path,
|
||||
False,
|
||||
)
|
||||
|
||||
|
|
@ -222,11 +211,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 +241,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 +263,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 +276,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 +290,5 @@ def py_grpc_library(
|
|||
deps = srcs,
|
||||
py_deps = deps,
|
||||
strip_prefixes = strip_prefixes,
|
||||
grpc_library = grpc_library,
|
||||
**kwargs
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,2 +1,3 @@
|
|||
7.1.0
|
||||
6.5.0
|
||||
5.0.0
|
||||
4.2.2
|
||||
3.7.2
|
||||
|
|
|
|||
|
|
@ -1,60 +0,0 @@
|
|||
# Copyright 2023 gRPC authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Auto generated by tools/codegen/core/gen_experiments.py
|
||||
|
||||
"""Dictionary of tags to experiments so we know when to test different experiments."""
|
||||
|
||||
TEST_EXPERIMENT_ENABLES = {
|
||||
"test_experiment_1": "test_experiment_1",
|
||||
"test_experiment_2": "test_experiment_2",
|
||||
"test_experiment_3": "test_experiment_3",
|
||||
"test_experiment_4": "test_experiment_4",
|
||||
}
|
||||
|
||||
TEST_EXPERIMENT_POLLERS = [
|
||||
]
|
||||
|
||||
TEST_EXPERIMENTS = {
|
||||
"windows": {
|
||||
"dbg": {
|
||||
},
|
||||
"off": {
|
||||
"experiments_tag_test": [
|
||||
"test_experiment_1",
|
||||
],
|
||||
},
|
||||
"on": {
|
||||
},
|
||||
},
|
||||
"ios": {
|
||||
"dbg": {
|
||||
},
|
||||
"off": {
|
||||
},
|
||||
"on": {
|
||||
},
|
||||
},
|
||||
"posix": {
|
||||
"dbg": {
|
||||
},
|
||||
"off": {
|
||||
},
|
||||
"on": {
|
||||
"experiments_tag_test": [
|
||||
"test_experiment_1",
|
||||
],
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -57,12 +57,21 @@ 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/1.0.0/bazel-1.0.0-linux-x86_64
|
||||
upload github.com/bazelbuild/bazel/releases/download/1.0.0/bazel-1.0.0-darwin-x86_64
|
||||
upload github.com/bazelbuild/bazel/releases/download/1.0.0/bazel-1.0.0-windows-x86_64.exe
|
||||
|
||||
upload github.com/bazelbuild/bazel/releases/download/2.2.0/bazel-2.2.0-linux-x86_64
|
||||
upload github.com/bazelbuild/bazel/releases/download/2.2.0/bazel-2.2.0-darwin-x86_64
|
||||
upload github.com/bazelbuild/bazel/releases/download/2.2.0/bazel-2.2.0-windows-x86_64.exe
|
||||
|
||||
upload github.com/bazelbuild/bazel/releases/download/3.7.1/bazel-3.7.1-linux-x86_64
|
||||
upload github.com/bazelbuild/bazel/releases/download/3.7.1/bazel-3.7.1-darwin-x86_64
|
||||
upload github.com/bazelbuild/bazel/releases/download/3.7.1/bazel-3.7.1-windows-x86_64.exe
|
||||
|
||||
upload github.com/bazelbuild/bazel/releases/download/4.2.1/bazel-4.2.1-linux-x86_64
|
||||
upload github.com/bazelbuild/bazel/releases/download/4.2.1/bazel-4.2.1-darwin-x86_64
|
||||
upload github.com/bazelbuild/bazel/releases/download/4.2.1/bazel-4.2.1-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
|
||||
|
|
|
|||
55
black.toml
|
|
@ -1,55 +0,0 @@
|
|||
[tool.black]
|
||||
line-length = 80
|
||||
target-version = [
|
||||
"py37",
|
||||
"py38",
|
||||
"py39",
|
||||
"py310",
|
||||
"py311",
|
||||
]
|
||||
extend-exclude = '''
|
||||
# A regex preceded with ^/ will apply only to files and directories
|
||||
# in the root of the project.
|
||||
(
|
||||
site-packages
|
||||
| test/cpp/naming/resolver_component_tests_runner.py # AUTO-GENERATED
|
||||
# AUTO-GENERATED from a template:
|
||||
| grpc_version.py
|
||||
| src/python/grpcio/grpc_core_dependencies.py
|
||||
| src/python/grpcio/grpc/_grpcio_metadata.py
|
||||
# AUTO-GENERATED BY make_grpcio_tools.py
|
||||
| tools/distrib/python/grpcio_tools/protoc_lib_deps.py
|
||||
# AUTO-GENERATED BY make_grpcio_observability.py
|
||||
| src/python/grpcio_observability/observability_lib_deps.py
|
||||
| .*_pb2.py # autogenerated Protocol Buffer files
|
||||
| .*_pb2_grpc.py # autogenerated Protocol Buffer gRPC files
|
||||
# AUTO-GENERATED By tools/distrib/python/xds_protos/build.py
|
||||
| tools/distrib/python/xds_protos/.*
|
||||
)
|
||||
'''
|
||||
|
||||
[tool.isort]
|
||||
profile = "black"
|
||||
line_length = 80
|
||||
src_paths = [
|
||||
"examples/python/data_transmission",
|
||||
"examples/python/async_streaming",
|
||||
"src/python/grpcio_tests",
|
||||
"tools/run_tests",
|
||||
]
|
||||
known_first_party = [
|
||||
"examples",
|
||||
"src",
|
||||
]
|
||||
known_third_party = ["grpc"]
|
||||
skip_glob = [
|
||||
"*/third_party/*",
|
||||
"*/env/*",
|
||||
"*pb2*.py",
|
||||
"*pb2*.pyi",
|
||||
"**/site-packages/**/*",
|
||||
"tools/distrib/python/xds_protos/*",
|
||||
]
|
||||
single_line_exclusions = ["typing"]
|
||||
force_single_line = true
|
||||
force_sort_within_sections = true
|
||||
|
|
@ -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-27.dll'
|
||||
end
|
||||
|
|
|
|||
|
|
@ -12,11 +12,21 @@ 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: 27.0.0
|
||||
csharp_major_version: 2
|
||||
g_stands_for: gnarly
|
||||
protobuf_version: 3.26.1
|
||||
version: 1.65.0-dev
|
||||
g_stands_for: gamma
|
||||
protobuf_version: 3.21.6
|
||||
version: 1.49.4
|
||||
targets:
|
||||
- name: gen_hpack_tables
|
||||
build: tool
|
||||
language: c++
|
||||
src:
|
||||
- tools/codegen/core/gen_hpack_tables.cc
|
||||
deps:
|
||||
- grpc
|
||||
- gpr
|
||||
uses_polling: false
|
||||
configs:
|
||||
asan:
|
||||
CC: clang
|
||||
|
|
@ -29,7 +39,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,11 +63,21 @@ 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
|
||||
basicprof:
|
||||
CPPFLAGS: -O2 -DGRPC_BASIC_PROFILER -DGRPC_TIMERS_RDTSC
|
||||
DEFINES: NDEBUG
|
||||
c++-compat:
|
||||
CFLAGS: -Wc++-compat
|
||||
CPPFLAGS: -O0
|
||||
DEFINES: _DEBUG DEBUG
|
||||
counters:
|
||||
CPPFLAGS: -O2 -DGPR_LOW_LEVEL_COUNTERS
|
||||
DEFINES: NDEBUG
|
||||
counters_with_memory_counter:
|
||||
CPPFLAGS: -O2 -DGPR_LOW_LEVEL_COUNTERS -DGPR_WRAP_MEMORY_COUNTER
|
||||
DEFINES: NDEBUG
|
||||
LDFLAGS: -Wl,--wrap=malloc -Wl,--wrap=calloc -Wl,--wrap=realloc -Wl,--wrap=free
|
||||
dbg:
|
||||
CPPFLAGS: -O0
|
||||
DEFINES: _DEBUG DEBUG
|
||||
|
|
@ -97,6 +117,10 @@ configs:
|
|||
compile_the_world: true
|
||||
test_environ:
|
||||
MSAN_OPTIONS: poison_in_dtor=1
|
||||
mutrace:
|
||||
CPPFLAGS: -O3 -fno-omit-frame-pointer
|
||||
DEFINES: NDEBUG
|
||||
LDFLAGS: -rdynamic
|
||||
noexcept:
|
||||
CPPFLAGS: -O2 -Wframe-larger-than=16384
|
||||
CXXFLAGS: -fno-exceptions
|
||||
|
|
@ -104,6 +128,9 @@ configs:
|
|||
opt:
|
||||
CPPFLAGS: -O2 -Wframe-larger-than=16384
|
||||
DEFINES: NDEBUG
|
||||
stapprof:
|
||||
CPPFLAGS: -O2 -DGRPC_STAP_PROFILER
|
||||
DEFINES: NDEBUG
|
||||
tsan:
|
||||
CC: clang
|
||||
CPPFLAGS: -O0 -fsanitize=thread -fno-omit-frame-pointer -Wno-unused-command-line-argument
|
||||
|
|
@ -115,7 +142,7 @@ configs:
|
|||
LDXX: clang++
|
||||
compile_the_world: true
|
||||
test_environ:
|
||||
TSAN_OPTIONS: suppressions=test/core/test_util/tsan_suppressions.txt:halt_on_error=1:second_deadlock_stack=1
|
||||
TSAN_OPTIONS: suppressions=test/core/util/tsan_suppressions.txt:halt_on_error=1:second_deadlock_stack=1
|
||||
ubsan:
|
||||
CC: clang
|
||||
CPPFLAGS: -O0 -stdlib=libc++ -fsanitize-coverage=edge,trace-pc-guard -fsanitize=undefined
|
||||
|
|
@ -127,27 +154,30 @@ configs:
|
|||
LDXX: clang++
|
||||
compile_the_world: true
|
||||
test_environ:
|
||||
UBSAN_OPTIONS: halt_on_error=1:print_stacktrace=1:suppressions=test/core/test_util/ubsan_suppressions.txt
|
||||
UBSAN_OPTIONS: halt_on_error=1:print_stacktrace=1:suppressions=test/core/util/ubsan_suppressions.txt
|
||||
defaults:
|
||||
boringssl:
|
||||
CFLAGS: -g
|
||||
CPPFLAGS: -Ithird_party/boringssl-with-bazel/src/include -fvisibility=hidden -DOPENSSL_NO_ASM
|
||||
-D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX
|
||||
CXXFLAGS: -fno-exceptions
|
||||
cares:
|
||||
abseil:
|
||||
CPPFLAGS: -g -Ithird_party/abseil-cpp
|
||||
ares:
|
||||
CFLAGS: -g
|
||||
CPPFLAGS: -Ithird_party/cares/cares/include -Ithird_party/cares -Ithird_party/cares/cares
|
||||
-fvisibility=hidden -D_GNU_SOURCE $(if $(subst Darwin,,$(SYSTEM)),,-Ithird_party/cares/config_darwin)
|
||||
$(if $(subst FreeBSD,,$(SYSTEM)),,-Ithird_party/cares/config_freebsd) $(if $(subst
|
||||
Linux,,$(SYSTEM)),,-Ithird_party/cares/config_linux) $(if $(subst OpenBSD,,$(SYSTEM)),,-Ithird_party/cares/config_openbsd)
|
||||
-DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX $(if $(subst MINGW32,,$(SYSTEM)),-DHAVE_CONFIG_H,)
|
||||
benchmark:
|
||||
CPPFLAGS: -Ithird_party/benchmark/include -DHAVE_POSIX_REGEX
|
||||
boringssl:
|
||||
CFLAGS: -g
|
||||
CPPFLAGS: -Ithird_party/boringssl-with-bazel/src/include -fvisibility=hidden -DOPENSSL_NO_ASM
|
||||
-D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX
|
||||
CXXFLAGS: -fno-exceptions
|
||||
global:
|
||||
CFLAGS: -g
|
||||
COREFLAGS: -fno-exceptions
|
||||
CPPFLAGS: -g -Wall -Wextra -DOSATOMIC_USE_INLINED=1 -Ithird_party/abseil-cpp -Ithird_party/re2
|
||||
-Ithird_party/upb -Isrc/core/ext/upb-gen -Isrc/core/ext/upbdefs-gen -Ithird_party/utf8_range
|
||||
-Ithird_party/xxhash -Ithird_party/cares/cares/include -Ithird_party/cares -Ithird_party/cares/cares
|
||||
-Ithird_party/address_sorting/include
|
||||
-Ithird_party/upb -Isrc/core/ext/upb-generated -Isrc/core/ext/upbdefs-generated
|
||||
-Ithird_party/xxhash
|
||||
LDFLAGS: -g
|
||||
zlib:
|
||||
CFLAGS: -fvisibility=hidden
|
||||
|
|
@ -187,7 +217,7 @@ python_dependencies:
|
|||
deps:
|
||||
- grpc
|
||||
- address_sorting
|
||||
- cares
|
||||
- ares
|
||||
- boringssl
|
||||
- re2
|
||||
- z
|
||||
|
|
@ -195,22 +225,7 @@ ruby_gem:
|
|||
deps:
|
||||
- grpc
|
||||
- address_sorting
|
||||
- cares
|
||||
- ares
|
||||
- boringssl
|
||||
- re2
|
||||
- z
|
||||
swift_boringssl_package:
|
||||
deps:
|
||||
- boringssl
|
||||
swift_package:
|
||||
deps:
|
||||
- grpc
|
||||
- grpc_authorization_provider
|
||||
- gpr
|
||||
- upb_base_lib
|
||||
- upb_mem_lib
|
||||
- upb_message_lib
|
||||
- upb_json_lib
|
||||
- upb_textformat_lib
|
||||
- utf8_range_lib
|
||||
- re2
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
set noparent
|
||||
@jtattermusch
|
||||
@apolcyn
|
||||
|
|
@ -8,10 +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)
|
||||
if(NOT CMAKE_CROSSCOMPILING)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/gRPCPluginTargets.cmake)
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -1,34 +0,0 @@
|
|||
# Copyright 2022 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.
|
||||
|
||||
|
||||
find_package(systemd QUIET CONFIG)
|
||||
if(systemd_FOUND)
|
||||
message(STATUS "Found systemd via CMake.")
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(TARGET systemd)
|
||||
message(STATUS "Found systemd via pkg-config already?")
|
||||
return()
|
||||
endif()
|
||||
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(SYSTEMD libsystemd>=233)
|
||||
|
||||
if(SYSTEMD_FOUND)
|
||||
set(systemd_FOUND "${SYSTEMD_FOUND}")
|
||||
add_library(systemd INTERFACE IMPORTED)
|
||||
message(STATUS "Found systemd via pkg-config.")
|
||||
endif()
|
||||
|
|
@ -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()")
|
||||
|
|
@ -1,13 +1,12 @@
|
|||
prefix=@CMAKE_INSTALL_PREFIX@
|
||||
exec_prefix=${prefix}
|
||||
includedir=${prefix}/@gRPC_INSTALL_INCLUDEDIR@
|
||||
libdir=${exec_prefix}/@gRPC_INSTALL_LIBDIR@
|
||||
includedir=${prefix}/include
|
||||
libdir=${exec_prefix}/lib
|
||||
|
||||
Name: @PC_NAME@
|
||||
Description: @PC_DESCRIPTION@
|
||||
Version: @PC_VERSION@
|
||||
Cflags: -I${includedir}
|
||||
Requires: @PC_REQUIRES@
|
||||
Requires.private: @PC_REQUIRES_PRIVATE@
|
||||
Libs: -L${libdir} @PC_LIB@
|
||||
Libs.private: @PC_LIBS_PRIVATE@
|
||||
|
|
|
|||
|
|
@ -28,9 +28,9 @@ if(gRPC_PROTOBUF_PROVIDER STREQUAL "module")
|
|||
set(PROTOBUF_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/protobuf)
|
||||
endif()
|
||||
|
||||
if(EXISTS "${PROTOBUF_ROOT_DIR}/CMakeLists.txt")
|
||||
if(EXISTS "${PROTOBUF_ROOT_DIR}/cmake/CMakeLists.txt")
|
||||
set(protobuf_MSVC_STATIC_RUNTIME OFF CACHE BOOL "Link static runtime libraries")
|
||||
add_subdirectory(${PROTOBUF_ROOT_DIR} third_party/protobuf)
|
||||
add_subdirectory(${PROTOBUF_ROOT_DIR}/cmake third_party/protobuf)
|
||||
if(TARGET ${_gRPC_PROTOBUF_LIBRARY_NAME})
|
||||
set(_gRPC_PROTOBUF_LIBRARIES ${_gRPC_PROTOBUF_LIBRARY_NAME})
|
||||
endif()
|
||||
|
|
@ -55,8 +55,12 @@ if(gRPC_PROTOBUF_PROVIDER STREQUAL "module")
|
|||
set(gRPC_INSTALL FALSE)
|
||||
endif()
|
||||
elseif(gRPC_PROTOBUF_PROVIDER STREQUAL "package")
|
||||
find_package(Protobuf REQUIRED CONFIG)
|
||||
find_package(Protobuf REQUIRED ${gRPC_PROTOBUF_PACKAGE_TYPE})
|
||||
|
||||
# {Protobuf,PROTOBUF}_FOUND is defined based on find_package type ("MODULE" vs "CONFIG").
|
||||
# For "MODULE", the case has also changed between cmake 3.5 and 3.6.
|
||||
# We use the legacy uppercase version for *_LIBRARIES AND *_INCLUDE_DIRS variables
|
||||
# as newer cmake versions provide them too for backward compatibility.
|
||||
if(Protobuf_FOUND OR PROTOBUF_FOUND)
|
||||
if(TARGET protobuf::${_gRPC_PROTOBUF_LIBRARY_NAME})
|
||||
set(_gRPC_PROTOBUF_LIBRARIES protobuf::${_gRPC_PROTOBUF_LIBRARY_NAME})
|
||||
|
|
@ -86,6 +90,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 "if(NOT Protobuf_FOUND AND NOT PROTOBUF_FOUND)\n find_package(Protobuf ${gRPC_PROTOBUF_PACKAGE_TYPE})\nendif()")
|
||||
endif()
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -1,31 +0,0 @@
|
|||
# Copyright 2022 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.
|
||||
|
||||
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()")
|
||||
endif()
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
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_INCLUDE_DIR "${UPB_ROOT_DIR}")
|
||||
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
|
||||
|
|
|
|||
|
|
@ -48,8 +48,7 @@ Content-Type
|
|||
HTTP wire protocols
|
||||
|
||||
1. support any HTTP/*, with no dependency on HTTP/2 specific framing
|
||||
2. header names may be upper- or mixed-case over HTTP/1.1, but trailers encoded in
|
||||
the last length-prefixed message must always use lower-case names.
|
||||
2. use lower-case header/trailer names
|
||||
3. use EOF (end of body) to close the stream
|
||||
|
||||
---
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
|||
http_archive(
|
||||
name = "com_github_grpc_grpc",
|
||||
strip_prefix = "grpc-1.45.0",
|
||||
sha256 = "ec19657a677d49af59aa806ec299c070c882986c9fcc022b1c22c2a3caf01bcd",
|
||||
sha256 = "ec19657a677d49af59aa806ec299c070c882986c9fcc022b1c22c2a3caf01bcd"k
|
||||
urls = ["https://github.com/grpc/grpc/archive/refs/tags/v1.45.0.tar.gz"],
|
||||
)
|
||||
|
||||
|
|
@ -34,16 +34,11 @@ 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.
|
||||
- [`5.0.0`](https://github.com/bazelbuild/bazel/releases/tag/5.0.0)
|
||||
- [`4.2.2`](https://github.com/bazelbuild/bazel/releases/tag/4.2.2)
|
||||
- [`3.7.2`](https://github.com/bazelbuild/bazel/releases/tag/3.7.2)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,88 +0,0 @@
|
|||
# Default HTTP Proxy Mapper User Guide for gRPC Core (and dependents)
|
||||
|
||||
[A1-http-connect-proxy-support.md](https://github.com/grpc/proposal/blob/master/A1-http-connect-proxy-support.md)
|
||||
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
|
||||
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
|
||||
|
||||
C-Core checks the following places to determine the HTTP proxy to use, stopping
|
||||
at the first one that is set:
|
||||
|
||||
1. `GRPC_ARG_HTTP_PROXY` channel arg
|
||||
2. `grpc_proxy` environment variable
|
||||
3. `https_proxy` environment variable
|
||||
4. `http_proxy` environment variable
|
||||
|
||||
If none of the above are set, then no HTTP proxy will be used.
|
||||
|
||||
The allowed format is an [RFC3986](https://www.rfc-editor.org/rfc/rfc3986) URI
|
||||
string where the scheme is expected to be "http" and the authority portion is
|
||||
used to determine the proxy to be used. For example, for an HTTP proxy setting
|
||||
of `http://username:password@proxy.google.com:443`, `username:password` would be
|
||||
used as user credentials for proxy authentication as per
|
||||
[RFC7617](https://www.rfc-editor.org/rfc/rfc7617) and `proxy.google.com:443`
|
||||
would be the host:port HTTP proxy target. If the port part of the authority is
|
||||
omitted, a default port of 443 is used. Note that user credential can also be
|
||||
omitted if the proxy does not need authentication.
|
||||
|
||||
### Disabling HTTP Proxy
|
||||
|
||||
If an HTTP proxy is set, C-Core then checks the following places to exclude
|
||||
traffic destined to listed hosts from going through the proxy determined above,
|
||||
again stopping at the first one that is set:
|
||||
|
||||
1. `no_grpc_proxy` environment variable
|
||||
2. `no_proxy`environment variable
|
||||
|
||||
If none of the above are set, then the previously found HTTP proxy is used.
|
||||
|
||||
The format takes a comma-separated list of names, and if any of these names
|
||||
matches as a suffix of the server host (provided in the channel target), then
|
||||
the proxy will not be used for that target. For example, with a `grpc_proxy`
|
||||
setting of `proxy.google.com` and a `no_grpc_proxy` setting of `example.com,
|
||||
google.com`, channel targets such as `dns:///foo.google.com:50051` and
|
||||
`bar.example.com:1234` will not use the proxy, but `baz.googleapis.com:443`
|
||||
would still use the configured proxy `proxy.google.com`.
|
||||
|
||||
As of [PR#31119](https://github.com/grpc/grpc/pull/31119), CIDR blocks are also
|
||||
supported in the list of names. For example, a `no_proxy` setting of
|
||||
`10.10.0.0/24` would not use the proxy for channel targets that mention IP
|
||||
addresses as the host between the range `10.10.0.0` to `10.10.0.255`.
|
||||
|
||||
### Disabling HTTP Proxy Channel-wide
|
||||
|
||||
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.
|
||||
|
|
@ -24,6 +24,8 @@ There are multiple polling engine implementations depending on the OS and the OS
|
|||
- `poll` (If kernel does not have epoll support)
|
||||
- Mac: **`poll`** (default)
|
||||
- Windows: (no name)
|
||||
- One-off polling engines:
|
||||
- NodeJS : `libuv` polling engine implementation (requires different compile `#define`s)
|
||||
|
||||
## Polling Engine Interface
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ number:
|
|||
- remove `ServerBuilder::SetMaxMessageSize()` method from
|
||||
`include/grpc++/server_builder.h` (commit `6980362`)
|
||||
- remove `ClientContext::set_fail_fast()` method from
|
||||
`include/grpc++/client_context.h` (commit `9477724`)
|
||||
`include/grpc++/impl/codegen/client_context.h` (commit `9477724`)
|
||||
- remove directory `include/grpc++` and all headers in it
|
||||
(commit `eb06572`)
|
||||
- make all `Request` and `Mark` methods in `grpc::Service` take a
|
||||
|
|
|
|||
|
|
@ -41,29 +41,107 @@ 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
|
||||
- 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
|
||||
- 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.
|
||||
|
|
@ -81,11 +159,6 @@ END_GOOGLE_INTERNAL_DOCUMENTATION -->
|
|||
- native - a DNS resolver based around getaddrinfo(), creates a new thread to
|
||||
perform name resolution
|
||||
|
||||
*NetBIOS and DNS*: If your network relies on NetBIOS name resolution or a mixture of
|
||||
DNS and NetBIOS name resolution (e.g. in some Windows networks) then you should use
|
||||
the '*native*' DNS resolver or make sure all NetBIOS names are
|
||||
also configured in DNS. The '*ares*' DNS resolver only supports DNS name resolution.
|
||||
|
||||
* GRPC_CLIENT_CHANNEL_BACKUP_POLL_INTERVAL_MS
|
||||
Default: 5000
|
||||
Declares the interval between two backup polls on client channels. These polls
|
||||
|
|
|
|||
|
|
@ -49,19 +49,3 @@
|
|||
- 1.47 'g' stands for ['gridman'](https://github.com/grpc/grpc/tree/v1.47.x)
|
||||
- 1.48 'g' stands for ['garum'](https://github.com/grpc/grpc/tree/v1.48.x)
|
||||
- 1.49 'g' stands for ['gamma'](https://github.com/grpc/grpc/tree/v1.49.x)
|
||||
- 1.50 'g' stands for ['galley'](https://github.com/grpc/grpc/tree/v1.50.x)
|
||||
- 1.51 'g' stands for ['galaxy'](https://github.com/grpc/grpc/tree/v1.51.x)
|
||||
- 1.52 'g' stands for ['gribkoff'](https://github.com/grpc/grpc/tree/v1.52.x)
|
||||
- 1.53 'g' stands for ['glockenspiel'](https://github.com/grpc/grpc/tree/v1.53.x)
|
||||
- 1.54 'g' stands for ['gracious'](https://github.com/grpc/grpc/tree/v1.54.x)
|
||||
- 1.55 'g' stands for ['grandslam'](https://github.com/grpc/grpc/tree/v1.55.x)
|
||||
- 1.56 'g' stands for ['galvanized'](https://github.com/grpc/grpc/tree/v1.56.x)
|
||||
- 1.57 'g' stands for ['grounded'](https://github.com/grpc/grpc/tree/v1.57.x)
|
||||
- 1.58 'g' stands for ['goku'](https://github.com/grpc/grpc/tree/v1.58.x)
|
||||
- 1.59 'g' stands for ['generative'](https://github.com/grpc/grpc/tree/v1.59.x)
|
||||
- 1.60 'g' stands for ['gjallarhorn'](https://github.com/grpc/grpc/tree/v1.60.x)
|
||||
- 1.61 'g' stands for ['grand'](https://github.com/grpc/grpc/tree/v1.61.x)
|
||||
- 1.62 'g' stands for ['guardian'](https://github.com/grpc/grpc/tree/v1.62.x)
|
||||
- 1.63 'g' stands for ['giggle'](https://github.com/grpc/grpc/tree/v1.63.x)
|
||||
- 1.64 'g' stands for ['grateful'](https://github.com/grpc/grpc/tree/v1.64.x)
|
||||
- 1.65 'g' stands for ['gnarly'](https://github.com/grpc/grpc/tree/master)
|
||||
|
|
|
|||
|
|
@ -58,25 +58,11 @@ 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 |
|
||||
[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 | | | |
|
||||
[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.42.0 | 1.42.0 | |
|
||||
|
|
|
|||
|
|
@ -51,7 +51,8 @@ service Health {
|
|||
|
||||
A client can query the server’s health status by calling the `Check` method, and
|
||||
a deadline should be set on the rpc. The client can optionally set the service
|
||||
name it wants to query for health status.
|
||||
name it wants to query for health status. The suggested format of service name
|
||||
is `package_names.ServiceName`, such as `grpc.health.v1.Health`.
|
||||
|
||||
The server should register all the services manually and set
|
||||
the individual status, including an empty service name and its status. For each
|
||||
|
|
|
|||
|
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 |
|
|
@ -39,18 +39,6 @@ Clients should accept these arguments:
|
|||
* --service_config_json=SERVICE_CONFIG_JSON
|
||||
* Disables service config lookups and sets the provided string as the
|
||||
default service config.
|
||||
* --additional_metadata=ADDITIONAL_METADATA
|
||||
* Additional metadata to send in each request, as a semicolon-separated list
|
||||
of key:value pairs. The first key/value pair is separated by the first colon.
|
||||
The second key/value pair is separated by the next colon *following* the
|
||||
next semi-colon thereafter, and so on. For example:
|
||||
- `abc-key:abc-value;foo-key:foo-value`
|
||||
- Key/value pairs: `abc-key`/`abc-value`, `foo-key`/`foo-value`.
|
||||
- `abc-key:abc:value;foo-key:foo:value`
|
||||
- Key/value pairs: `abc-key`/`abc:value`, `foo-key`/`foo:value`.
|
||||
|
||||
Keys must be ASCII only (no `-bin` headers allowed). Values may contain
|
||||
any character except semi-colons.
|
||||
|
||||
Clients must support TLS with ALPN. Clients must not disable certificate
|
||||
checking.
|
||||
|
|
@ -1164,12 +1152,12 @@ Procedures:
|
|||
}
|
||||
}
|
||||
```
|
||||
2. After getting a response, client waits up to 10 seconds (or a total of 30s
|
||||
for the entire test case) to receive an OOB load report that matches the
|
||||
requested load report in step 1. To wait for load report, client may inject a
|
||||
callback to the custom LB policy, or poll the result by doing empty unary call
|
||||
that carries a reference, e.g. using CallOptions, that will be filled in by the
|
||||
custom LB policy as part of the `OrcaOobReportListener` API.
|
||||
2. After getting a response, client waits up to 5 seconds to receive a OOB load
|
||||
report that matches the requested load report in step 1. To wait for load
|
||||
report, client may inject a callback to the custom LB policy, or poll the result
|
||||
by doing empty unary call that carries a reference, e.g. using
|
||||
CallOptions, that will be filled in by the custom LB policy as part of the
|
||||
`OrcaOobReportListener` API.
|
||||
3. Then client sends:
|
||||
```
|
||||
{
|
||||
|
|
@ -1177,7 +1165,7 @@ custom LB policy as part of the `OrcaOobReportListener` API.
|
|||
cpu_utilization: 0.29309
|
||||
memory_utilization: 0.2
|
||||
utilization: {
|
||||
util: 0.2039
|
||||
util: 100.2039
|
||||
}
|
||||
}
|
||||
response_parameters:{
|
||||
|
|
@ -1185,9 +1173,8 @@ custom LB policy as part of the `OrcaOobReportListener` API.
|
|||
}
|
||||
}
|
||||
```
|
||||
4. After getting a response, client waits up to 10 seconds (or a total of 30s
|
||||
for the entire test case) to receive an OOB load report that matches the
|
||||
requested load report in step 3. Similar to step 2.
|
||||
4. After getting a response, client waits up to 5 seconds to receive a OOB load
|
||||
report that matches the requested load report in step 3. Similar to step 2.
|
||||
5. Client half closes the stream, and asserts the streaming call is successful.
|
||||
|
||||
### Experimental Tests
|
||||
|
|
|
|||
|
|
@ -25,8 +25,6 @@ On the client side, this does not have any effect.
|
|||
|
||||
**IMPORTANT NOTE** - For keepalive to work properly and as intended, all of the above channel arguments should be configured appropriately. The client-side keepalive settings should also be in agreement with the server-side settings. If a client sends pings more often than the server is willing to accept, the connection will be terminated with a GOAWAY frame with "too_many_pings" as the debug data.
|
||||
|
||||
Please refer to the [C++ keepalive example](https://github.com/grpc/grpc/tree/master/examples/cpp/keepalive) for a sample way of setting these arguments.
|
||||
|
||||
### Defaults Values
|
||||
|
||||
Channel Argument| Client|Server
|
||||
|
|
|
|||
|
|
@ -49,12 +49,6 @@ Most gRPC implementations support the following URI schemes:
|
|||
as the first character; the implementation will prepend this null. Do not include
|
||||
the null in `abstract_path`.
|
||||
|
||||
- `vsock:cid:port` -- VSOCK (Linux systems only)
|
||||
- `cid` is 32-bit Context Identifier (CID). It indicates the source or
|
||||
destination, which is either a virtual machine or the host.
|
||||
- `port` is a 32-bit port number. It differentiates between multiple
|
||||
services running on a single machine.
|
||||
|
||||
The following schemes are supported by the gRPC C-core implementation,
|
||||
but may not be supported in other languages:
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||