Skip to content

Commit

Permalink
Merge branch 'grpc:master' into server-stream-context-with-rpc-info
Browse files Browse the repository at this point in the history
  • Loading branch information
eafzali committed May 17, 2021
2 parents 1b4fdb6 + a12250e commit 6f24a0e
Show file tree
Hide file tree
Showing 635 changed files with 90,674 additions and 33,476 deletions.
11 changes: 8 additions & 3 deletions .github/ISSUE_TEMPLATE/bug.md
@@ -1,12 +1,17 @@
---
name: Bug Report
about: Create a report to help us improve
about: Report a non-security bug. For suspected security vulnerabilities or crashes, please use "Report a Security Vulnerability", below.
labels: 'Type: Bug'

---

Please see the FAQ in our main README.md, then answer the questions below before
submitting your issue.
NOTE: if you are reporting is a potential security vulnerability or a crash,
please follow our CVE process at
https://github.com/grpc/proposal/blob/master/P4-grpc-cve-process.md instead of
filing an issue here.

Please see the FAQ in our main README.md, then answer the questions below
before submitting your issue.

### What version of gRPC are you using?

Expand Down
4 changes: 2 additions & 2 deletions .github/stale.yml
@@ -1,7 +1,7 @@
# Configuration for probot-stale - https://github.com/probot/stale

# Number of days of inactivity before an Issue or Pull Request becomes stale
daysUntilStale: 7
daysUntilStale: 6

# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
Expand Down Expand Up @@ -29,7 +29,7 @@ staleLabel: "stale"
# Comment to post when marking as stale. Set to `false` to disable
markComment: >
This issue is labeled as requiring an update from the reporter, and no update has been received
after 7 days. If no update is provided in the next 7 days, this issue will be automatically closed.
after 6 days. If no update is provided in the next 7 days, this issue will be automatically closed.
# Comment to post when removing the stale label.
# unmarkComment: >
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/codeql-analysis.yml
@@ -0,0 +1,31 @@
name: "CodeQL"

on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '24 20 * * 3'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

strategy:
fail-fast: false

steps:
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: go

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
61 changes: 61 additions & 0 deletions .github/workflows/release.yml
@@ -0,0 +1,61 @@
name: Release

on:
release:
types: [published]

jobs:
release:
name: Release cmd/protoc-gen-go-grpc
runs-on: ubuntu-latest
if: startsWith(github.event.release.tag_name, 'cmd/protoc-gen-go-grpc/')
strategy:
matrix:
goos: [linux, darwin, windows]
goarch: [386, amd64]
exclude:
- goos: darwin
goarch: 386

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2

- name: Download dependencies
run: |
cd cmd/protoc-gen-go-grpc
go mod download
- name: Prepare build directory
run: |
mkdir -p build/
cp README.md build/
cp LICENSE build/
- name: Build
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
run: |
cd cmd/protoc-gen-go-grpc
go build -trimpath -o $GITHUB_WORKSPACE/build
- name: Create package
id: package
run: |
PACKAGE_NAME=protoc-gen-go-grpc.${GITHUB_REF#refs/tags/cmd/protoc-gen-go-grpc/}.${{ matrix.goos }}.${{ matrix.goarch }}.tar.gz
tar -czvf $PACKAGE_NAME -C build .
echo ::set-output name=name::${PACKAGE_NAME}
- name: Upload asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./${{ steps.package.outputs.name }}
asset_name: ${{ steps.package.outputs.name }}
asset_content_type: application/gzip
117 changes: 117 additions & 0 deletions .github/workflows/testing.yml
@@ -0,0 +1,117 @@
name: Testing

# Trigger on pushes, PRs (excluding documentation changes), and nightly.
on:
push:
pull_request:
schedule:
- cron: 0 0 * * * # daily at 00:00

# Always force the use of Go modules
env:
GO111MODULE: on

jobs:
# Check generated protos match their source repos (optional for PRs).
vet-proto:
runs-on: ubuntu-latest
steps:
# Setup the environment.
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: 1.15
- name: Checkout repo
uses: actions/checkout@v2

# Run the vet checks.
- name: vet
run: ./vet.sh -install && ./vet.sh

# Run the main gRPC-Go tests.
tests:
# Proto checks are run in the above job.
env:
VET_SKIP_PROTO: 1
runs-on: ubuntu-latest
strategy:
matrix:
include:
- type: vet+tests
goversion: 1.16

- type: tests
goversion: 1.16
testflags: -race

- type: tests
goversion: 1.16
grpcenv: GRPC_GO_RETRY=on

- type: extras
goversion: 1.16

- type: tests
goversion: 1.16
goarch: 386

- type: tests
goversion: 1.16
goarch: arm64

- type: tests
goversion: 1.15

- type: tests
goversion: 1.14

- type: tests # Keep until interop tests no longer require Go1.11
goversion: 1.11

steps:
# Setup the environment.
- name: Setup GOARCH
if: matrix.goarch != ''
run: echo "GOARCH=${{ matrix.goarch }}" >> $GITHUB_ENV

- name: Setup qemu emulator
if: matrix.goarch == 'arm64'
# setup qemu-user-static emulator and register it with binfmt_misc so that aarch64 binaries
# are automatically executed using qemu.
run: docker run --rm --privileged multiarch/qemu-user-static:5.2.0-2 --reset --credential yes --persistent yes

- name: Setup GRPC environment
if: matrix.grpcenv != ''
run: echo "${{ matrix.grpcenv }}" >> $GITHUB_ENV

- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.goversion }}

- name: Checkout repo
uses: actions/checkout@v2

# Only run vet for 'vet' runs.
- name: Run vet.sh
if: startsWith(matrix.type, 'vet')
run: ./vet.sh -install && ./vet.sh

# Main tests run for everything except when testing "extras"
# (where we run a reduced set of tests).
- name: Run tests
if: contains(matrix.type, 'tests')
run: |
go version
go test ${{ matrix.testflags }} -cpu 1,4 -timeout 7m google.golang.org/grpc/...
# Non-core gRPC tests (examples, interop, etc)
- name: Run extras tests
if: matrix.type == 'extras'
run: |
go version
examples/examples_test.sh
security/advancedtls/examples/examples_test.sh
interop/interop_test.sh
cd ${GITHUB_WORKSPACE}/security/advancedtls && go test -cpu 1,4 -timeout 7m google.golang.org/grpc/security/advancedtls/...
cd ${GITHUB_WORKSPACE}/security/authorization && go test -cpu 1,4 -timeout 7m google.golang.org/grpc/security/authorization/...
18 changes: 9 additions & 9 deletions .travis.yml
Expand Up @@ -2,22 +2,22 @@ language: go

matrix:
include:
- go: 1.13.x
- go: 1.14.x
env: VET=1 GO111MODULE=on
- go: 1.13.x
- go: 1.14.x
env: RACE=1 GO111MODULE=on
- go: 1.13.x
- go: 1.14.x
env: RUN386=1
- go: 1.13.x
- go: 1.14.x
env: GRPC_GO_RETRY=on
- go: 1.13.x
- go: 1.14.x
env: TESTEXTRAS=1
- go: 1.13.x
env: GO111MODULE=on
- go: 1.12.x
env: GO111MODULE=on
- go: 1.11.x
- go: 1.11.x # Keep until interop tests no longer require Go1.11
env: GO111MODULE=on
- go: 1.9.x
env: GAE=1

go_import_path: google.golang.org/grpc

Expand All @@ -35,7 +35,7 @@ install:

script:
- set -e
- if [[ -n "${TESTEXTRAS}" ]]; then examples/examples_test.sh; interop/interop_test.sh; make testsubmodule; exit 0; fi
- if [[ -n "${TESTEXTRAS}" ]]; then examples/examples_test.sh; security/advancedtls/examples/examples_test.sh; interop/interop_test.sh; make testsubmodule; exit 0; fi
- if [[ -n "${VET}" ]]; then ./vet.sh; fi
- if [[ -n "${GAE}" ]]; then make testappengine; exit 0; fi
- if [[ -n "${RACE}" ]]; then make testrace; exit 0; fi
Expand Down
1 change: 0 additions & 1 deletion CONTRIBUTING.md
Expand Up @@ -57,6 +57,5 @@ How to get your contributions merged smoothly and quickly.
- `make vet` to catch vet errors
- `make test` to run the tests
- `make testrace` to run tests in race mode
- optional `make testappengine` to run tests with appengine

- Exceptions to the rules can be made if there's a compelling reason for doing so.
2 changes: 1 addition & 1 deletion Documentation/encoding.md
Expand Up @@ -132,7 +132,7 @@ As a reminder, all `CallOption`s may be converted into `DialOption`s that become
the default for all RPCs sent through a client using `grpc.WithDefaultCallOptions`:

```go
myclient := grpc.Dial(ctx, target, grpc.WithDefaultCallOptions(grpc.UseCompresor("gzip")))
myclient := grpc.Dial(ctx, target, grpc.WithDefaultCallOptions(grpc.UseCompressor("gzip")))
```

When specified in either of these ways, messages will be compressed using this
Expand Down

0 comments on commit 6f24a0e

Please sign in to comment.