From 8fb9a4a837689ecfd008809a455174f9d4a0ca0e Mon Sep 17 00:00:00 2001 From: Brenda Chan Date: Tue, 5 Jun 2018 09:48:16 -0400 Subject: [PATCH] Rebasing changes after knative renaming --- Gopkg.lock | 2 +- cmd/queue/BUILD.bazel | 4 +- cmd/queue/main.go | 33 +--- pkg/controller/route/route_test.go | 6 +- pkg/h2c/BUILD.bazel | 2 +- sample/grpc-ping/BUILD | 2 +- sample/grpc-ping/README.md | 6 +- sample/grpc-ping/client/BUILD.bazel | 2 +- sample/grpc-ping/client/client.go | 4 +- sample/grpc-ping/grpc-ping.go | 2 +- sample/grpc-ping/proto/BUILD.bazel | 2 +- sample/grpc-ping/sample.yaml | 6 +- test/conformance/route_test.go | 2 +- test/e2e/BUILD.bazel | 3 + test/e2e/e2e_test.go | 2 +- test/e2e/errorcondition_test.go | 2 +- test/e2e/helloworld_test.go | 9 +- .../test_images/helloworld-grpc/BUILD.bazel | 19 +++ .../test_images/helloworld-grpc/Dockerfile | 2 +- .../test_images/helloworld-grpc/helloworld.go | 2 +- .../helloworld-grpc/proto/BUILD.bazel | 13 ++ .../github.com/golang/protobuf/regenerate.sh | 53 ------ .../x/net/http/httpguts/BUILD.bazel | 9 +- .../x/net/internal/socks/BUILD.bazel | 2 +- .../x/net/internal/timeseries/BUILD.bazel | 2 +- vendor/golang.org/x/net/trace/BUILD.bazel | 2 +- vendor/google.golang.org/genproto/.travis.yml | 12 -- .../genproto/CONTRIBUTING.md | 27 --- vendor/google.golang.org/genproto/README.md | 28 ---- .../googleapis/rpc/status/BUILD.bazel | 2 +- vendor/google.golang.org/genproto/regen.go | 123 -------------- vendor/google.golang.org/genproto/regen.sh | 77 --------- vendor/google.golang.org/grpc/.travis.yml | 24 --- vendor/google.golang.org/grpc/BUILD.bazel | 2 +- vendor/google.golang.org/grpc/CONTRIBUTING.md | 36 ---- vendor/google.golang.org/grpc/Makefile | 48 ------ vendor/google.golang.org/grpc/README.md | 45 ----- .../grpc/balancer/BUILD.bazel | 2 +- .../grpc/balancer/base/BUILD.bazel | 2 +- .../grpc/balancer/roundrobin/BUILD.bazel | 2 +- .../grpc/channelz/BUILD.bazel | 2 +- vendor/google.golang.org/grpc/codegen.sh | 17 -- .../google.golang.org/grpc/codes/BUILD.bazel | 2 +- .../grpc/connectivity/BUILD.bazel | 2 +- .../grpc/credentials/BUILD.bazel | 2 +- .../grpc/encoding/BUILD.bazel | 2 +- .../grpc/encoding/proto/BUILD.bazel | 2 +- .../grpclb/grpc_lb_v1/messages/BUILD.bazel | 2 +- .../grpclb/grpc_lb_v1/messages/messages.proto | 155 ------------------ .../grpc/grpclog/BUILD.bazel | 2 +- .../grpc/internal/BUILD.bazel | 2 +- .../grpc/keepalive/BUILD.bazel | 2 +- .../grpc/metadata/BUILD.bazel | 2 +- .../google.golang.org/grpc/naming/BUILD.bazel | 2 +- .../google.golang.org/grpc/peer/BUILD.bazel | 2 +- .../grpc/resolver/BUILD.bazel | 2 +- .../grpc/resolver/dns/BUILD.bazel | 2 +- .../grpc/resolver/passthrough/BUILD.bazel | 2 +- .../google.golang.org/grpc/stats/BUILD.bazel | 2 +- .../google.golang.org/grpc/status/BUILD.bazel | 2 +- vendor/google.golang.org/grpc/tap/BUILD.bazel | 2 +- .../grpc/transport/BUILD.bazel | 2 +- vendor/google.golang.org/grpc/vet.sh | 93 ----------- 63 files changed, 101 insertions(+), 827 deletions(-) create mode 100644 test/e2e/test_images/helloworld-grpc/BUILD.bazel create mode 100644 test/e2e/test_images/helloworld-grpc/proto/BUILD.bazel delete mode 100755 vendor/github.com/golang/protobuf/regenerate.sh delete mode 100644 vendor/google.golang.org/genproto/.travis.yml delete mode 100644 vendor/google.golang.org/genproto/CONTRIBUTING.md delete mode 100644 vendor/google.golang.org/genproto/README.md delete mode 100644 vendor/google.golang.org/genproto/regen.go delete mode 100755 vendor/google.golang.org/genproto/regen.sh delete mode 100644 vendor/google.golang.org/grpc/.travis.yml delete mode 100644 vendor/google.golang.org/grpc/CONTRIBUTING.md delete mode 100644 vendor/google.golang.org/grpc/Makefile delete mode 100644 vendor/google.golang.org/grpc/README.md delete mode 100755 vendor/google.golang.org/grpc/codegen.sh delete mode 100644 vendor/google.golang.org/grpc/grpclb/grpc_lb_v1/messages/messages.proto delete mode 100755 vendor/google.golang.org/grpc/vet.sh diff --git a/Gopkg.lock b/Gopkg.lock index 96e78bc6faa1..9b9882623363 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -992,6 +992,6 @@ [solve-meta] analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "621e4f5bec0b084d127193a1a2ec95460b8368224d81f7c2611900a91c1bbb12" + inputs-digest = "c12e8a63a189ad92d794fb6e8039b5c8eb8568b21d7335b597312d13d43d2178" solver-name = "gps-cdcl" solver-version = 1 diff --git a/cmd/queue/BUILD.bazel b/cmd/queue/BUILD.bazel index 7eb6cda13212..64d5821a9f6c 100644 --- a/cmd/queue/BUILD.bazel +++ b/cmd/queue/BUILD.bazel @@ -9,14 +9,12 @@ go_library( "//cmd/util:go_default_library", "//pkg/apis/serving/v1alpha1:go_default_library", "//pkg/autoscaler:go_default_library", + "//pkg/h2c:go_default_library", "//pkg/logging:go_default_library", "//pkg/logging/logkey:go_default_library", - "//pkg/h2c:go_default_library", "//pkg/queue:go_default_library", - "//vendor/github.com/golang/glog:go_default_library", "//vendor/github.com/gorilla/websocket:go_default_library", "//vendor/go.uber.org/zap:go_default_library", - "//vendor/golang.org/x/net/http2:go_default_library", "//vendor/k8s.io/client-go/kubernetes:go_default_library", "//vendor/k8s.io/client-go/rest:go_default_library", ], diff --git a/cmd/queue/main.go b/cmd/queue/main.go index 2337588be553..73cab06b711e 100644 --- a/cmd/queue/main.go +++ b/cmd/queue/main.go @@ -19,7 +19,6 @@ import ( "bytes" "context" "encoding/gob" - "errors" "flag" "fmt" "io" @@ -33,7 +32,6 @@ import ( "syscall" "time" - "github.com/google/tcpproxy" "github.com/knative/serving/cmd/util" "github.com/knative/serving/pkg/apis/serving/v1alpha1" "github.com/knative/serving/pkg/autoscaler" @@ -92,11 +90,6 @@ var ( singleConcurrencyBreaker = queue.NewBreaker(singleConcurrencyQueueDepth, 1) ) -type Proxy struct { - HttpProxy *http.Server - TcpProxy *tcpproxy.Proxy -} - func initEnv() { podName = util.GetRequiredEnvOrFatal("ELA_POD", logger) elaNamespace = util.GetRequiredEnvOrFatal("ELA_NAMESPACE", logger) @@ -106,28 +99,6 @@ func initEnv() { elaAutoscalerPort = util.GetRequiredEnvOrFatal("ELA_AUTOSCALER_PORT", logger) } -func (p *Proxy) Run() error { - if p.HttpProxy != nil { - if err := p.HttpProxy.ListenAndServe(); err != nil { - return err - } - } -<<<<<<< HEAD:cmd/queue/main.go - if p.TcpProxy != nil { - if err := p.TcpProxy.Run(); err != nil { - return err - } - } - return errors.New("No proxies to run - both HttpProxy and TcpProxy are nil.") -======= - - httpProxy = httputil.NewSingleHostReverseProxy(target) - - h2cProxy = httputil.NewSingleHostReverseProxy(target) - h2cProxy.Transport = h2c.NewTransport() ->>>>>>> Update the activator to use an h2c server:cmd/ela-queue/main.go -} - func connectStatSink() { autoscalerEndpoint := fmt.Sprintf("ws://%s.%s.svc.cluster.local:%s", elaAutoscaler, queue.AutoscalerNamespace, elaAutoscalerPort) @@ -301,7 +272,9 @@ func main() { if err != nil { logger.Fatal("Failed to parse localhost url", zap.Error(err)) } - proxy = httputil.NewSingleHostReverseProxy(target) + httpProxy = httputil.NewSingleHostReverseProxy(target) + h2cProxy = httputil.NewSingleHostReverseProxy(target) + h2cProxy.Transport = h2c.NewTransport() logger.Info("Queue container is starting") config, err := rest.InClusterConfig() diff --git a/pkg/controller/route/route_test.go b/pkg/controller/route/route_test.go index 795bdce025c7..116ef86856dc 100644 --- a/pkg/controller/route/route_test.go +++ b/pkg/controller/route/route_test.go @@ -1522,7 +1522,7 @@ func TestCreateRouteWithGRPCProtocol(t *testing.T) { rev := getTestRevision("test-rev") rev.Spec.Protocol = "grpc" - elaClient.ElafrosV1alpha1().Revisions(testNamespace).Create(rev) + elaClient.ServingV1alpha1().Revisions(testNamespace).Create(rev) // A route targeting the revision route := getTestRouteWithTrafficTargets( @@ -1533,9 +1533,9 @@ func TestCreateRouteWithGRPCProtocol(t *testing.T) { }, }, ) - elaClient.ElafrosV1alpha1().Routes(testNamespace).Create(route) + elaClient.ServingV1alpha1().Routes(testNamespace).Create(route) // Since updateRouteEvent looks in the lister, we need to add it to the informer - elaInformer.Elafros().V1alpha1().Routes().Informer().GetIndexer().Add(route) + elaInformer.Serving().V1alpha1().Routes().Informer().GetIndexer().Add(route) controller.updateRouteEvent(KeyOrDie(route)) diff --git a/pkg/h2c/BUILD.bazel b/pkg/h2c/BUILD.bazel index 7859da183a8e..b87791284331 100644 --- a/pkg/h2c/BUILD.bazel +++ b/pkg/h2c/BUILD.bazel @@ -6,7 +6,7 @@ go_library( "h2c.go", "transport.go", ], - importpath = "github.com/elafros/elafros/pkg/h2c", + importpath = "github.com/knative/serving/pkg/h2c", visibility = ["//visibility:public"], deps = [ "//vendor/golang.org/x/net/http/httpguts:go_default_library", diff --git a/sample/grpc-ping/BUILD b/sample/grpc-ping/BUILD index 2a9a0ed1f3ea..24b2b4f57a56 100644 --- a/sample/grpc-ping/BUILD +++ b/sample/grpc-ping/BUILD @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") go_library( name = "go_default_library", srcs = ["grpc-ping.go"], - importpath = "github.com/elafros/elafros/sample/grpc-ping", + importpath = "github.com/knative/serving/sample/grpc-ping", visibility = ["//visibility:private"], deps = [ "//sample/grpc-ping/proto:go_default_library", diff --git a/sample/grpc-ping/README.md b/sample/grpc-ping/README.md index e4fbe879c609..04ba83ed56fa 100644 --- a/sample/grpc-ping/README.md +++ b/sample/grpc-ping/README.md @@ -4,7 +4,7 @@ A simple gRPC server written in Go that you can use for testing. ## Prerequisites -1. [Install Elafros](https://github.com/elafros/install/blob/master/README.md) +1. [Install Knative](https://github.com/knative/install/blob/master/README.md) 1. Install [docker](https://www.docker.com/) ## Build and run the gRPC server @@ -22,9 +22,9 @@ docker build \ docker push "${REPO}/sample/grpc-ping" # Replace the image reference with our published image. -perl -pi -e "s@github.com/elafros/elafros/sample/grpc-ping@${REPO}/sample/grpc-ping@g" sample/grpc-ping/*.yaml +perl -pi -e "s@github.com/knative/serving/sample/grpc-ping@${REPO}/sample/grpc-ping@g" sample/grpc-ping/*.yaml -# Deploy the Elafros sample +# Deploy the Knative sample kubectl apply -f sample/grpc-ping/sample.yaml ``` diff --git a/sample/grpc-ping/client/BUILD.bazel b/sample/grpc-ping/client/BUILD.bazel index b9922ad86be7..4bd4b040ac58 100644 --- a/sample/grpc-ping/client/BUILD.bazel +++ b/sample/grpc-ping/client/BUILD.bazel @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") go_library( name = "go_default_library", srcs = ["client.go"], - importpath = "github.com/elafros/elafros/sample/grpc-ping/client", + importpath = "github.com/knative/serving/sample/grpc-ping/client", visibility = ["//visibility:private"], deps = [ "//sample/grpc-ping/proto:go_default_library", diff --git a/sample/grpc-ping/client/client.go b/sample/grpc-ping/client/client.go index 4b786c4f95eb..e40f7245b129 100644 --- a/sample/grpc-ping/client/client.go +++ b/sample/grpc-ping/client/client.go @@ -7,14 +7,14 @@ import ( "log" "time" - pb "github.com/elafros/elafros/sample/grpc-ping/proto" + pb "github.com/knative/serving/sample/grpc-ping/proto" "golang.org/x/net/context" "google.golang.org/grpc" ) var ( serverAddr = flag.String("server_addr", "127.0.0.1:8080", "The server address in the format of host:port") - serverHostOverride = flag.String("server_host_override", "grpc.elafros.dev", "") + serverHostOverride = flag.String("server_host_override", "grpc.knative.dev", "") ) func main() { diff --git a/sample/grpc-ping/grpc-ping.go b/sample/grpc-ping/grpc-ping.go index 2b4c804f0e1d..fc630f4581c1 100644 --- a/sample/grpc-ping/grpc-ping.go +++ b/sample/grpc-ping/grpc-ping.go @@ -7,7 +7,7 @@ import ( "net" "time" - ping "github.com/elafros/elafros/sample/grpc-ping/proto" + ping "github.com/knative/serving/sample/grpc-ping/proto" "golang.org/x/net/context" "google.golang.org/grpc" ) diff --git a/sample/grpc-ping/proto/BUILD.bazel b/sample/grpc-ping/proto/BUILD.bazel index 95deccf9b1a4..675211399a43 100644 --- a/sample/grpc-ping/proto/BUILD.bazel +++ b/sample/grpc-ping/proto/BUILD.bazel @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", srcs = ["ping.pb.go"], - importpath = "github.com/elafros/elafros/sample/grpc-ping/proto", + importpath = "github.com/knative/serving/sample/grpc-ping/proto", visibility = ["//visibility:public"], deps = [ "//vendor/github.com/golang/protobuf/proto:go_default_library", diff --git a/sample/grpc-ping/sample.yaml b/sample/grpc-ping/sample.yaml index ecb31190c851..d9d532c077ae 100644 --- a/sample/grpc-ping/sample.yaml +++ b/sample/grpc-ping/sample.yaml @@ -1,5 +1,5 @@ --- -apiVersion: elafros.dev/v1alpha1 +apiVersion: serving.knative.dev/v1alpha1 kind: Route metadata: name: grpc-ping @@ -9,7 +9,7 @@ spec: - configurationName: grpc-ping percent: 100 --- -apiVersion: elafros.dev/v1alpha1 +apiVersion: serving.knative.dev/v1alpha1 kind: Configuration metadata: name: grpc-ping @@ -22,4 +22,4 @@ spec: spec: protocol: grpc container: - image: github.com/elafros/elafros/sample/grpc-ping + image: github.com/knative/serving/sample/grpc-ping diff --git a/test/conformance/route_test.go b/test/conformance/route_test.go index 400490de19d6..a9946066322d 100644 --- a/test/conformance/route_test.go +++ b/test/conformance/route_test.go @@ -43,7 +43,7 @@ const ( ) func createRouteAndConfig(clients *test.Clients, imagePaths []string) error { - _, err := clients.Configs.Create(test.Configuration(namespaceName, configName, imagePaths[0])) + _, err := clients.Configs.Create(test.Configuration(namespaceName, configName, imagePaths[0], v1alpha1.RevisionProtocolHTTP)) if err != nil { return err } diff --git a/test/e2e/BUILD.bazel b/test/e2e/BUILD.bazel index 3db34a4f8f78..09b1675c222f 100644 --- a/test/e2e/BUILD.bazel +++ b/test/e2e/BUILD.bazel @@ -10,9 +10,12 @@ go_test( deps = [ "//pkg/apis/serving/v1alpha1:go_default_library", "//test:go_default_library", + "//test/e2e/test_images/helloworld-grpc/proto:go_default_library", + "//vendor/google.golang.org/grpc:go_default_library", "//vendor/k8s.io/api/core/v1:go_default_library", "//vendor/k8s.io/api/extensions/v1beta1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", "//vendor/k8s.io/client-go/plugin/pkg/client/auth/gcp:go_default_library", ], ) diff --git a/test/e2e/e2e_test.go b/test/e2e/e2e_test.go index 2d48cea8ec33..ebea6ff8e7f0 100644 --- a/test/e2e/e2e_test.go +++ b/test/e2e/e2e_test.go @@ -3,7 +3,7 @@ package e2e import ( "testing" - "github.com/knative/serving/pkg/apis/ela/v1alpha1" + "github.com/knative/serving/pkg/apis/serving/v1alpha1" "github.com/knative/serving/test" // Mysteriously required to support GCP auth (required by k8s libs). // Apparently just importing it is enough. @_@ side effects @_@. diff --git a/test/e2e/errorcondition_test.go b/test/e2e/errorcondition_test.go index f7eb878b65ea..4f23a4fd854a 100644 --- a/test/e2e/errorcondition_test.go +++ b/test/e2e/errorcondition_test.go @@ -45,7 +45,7 @@ func TestContainerErrorMsg(t *testing.T) { imagePath := strings.Join([]string{test.Flags.DockerRepo, "invalidhelloworld"}, "/") log.Printf("Creating a new Route and Configuration %s", imagePath) - err := CreateRouteAndConfig(clients, imagePath) + err := CreateRouteAndConfig(clients, imagePath, v1alpha1.RevisionProtocolHTTP) if err != nil { t.Fatalf("Failed to create Route and Configuration: %v", err) } diff --git a/test/e2e/helloworld_test.go b/test/e2e/helloworld_test.go index c07f7f085aa8..836456f16daa 100644 --- a/test/e2e/helloworld_test.go +++ b/test/e2e/helloworld_test.go @@ -130,9 +130,12 @@ func waitForHelloWorldGRPCEndpoint(address string, spoofDomain string) error { ctx, cancel := context.WithTimeout(context.Background(), 120*time.Second) defer cancel() - resp, err := client.Hello(ctx, &hello.Request{Msg: "world"}) + req := &hello.Request{Msg: "world"} + log.Printf("Retrying gRPC request: %+v", req) + resp, err := client.Hello(ctx, req) if err != nil { - return true, err + // Continue to poll since the Ingress may take a while to start serving requests + return false, nil } expectedResponse := "Hello world" @@ -141,7 +144,7 @@ func waitForHelloWorldGRPCEndpoint(address string, spoofDomain string) error { if receivedResponse == expectedResponse { return true, nil } - return false, fmt.Errorf("Did not get expected response message %s, got %s", expectedResponse, receivedResponse) + return true, fmt.Errorf("Did not get expected response message %s, got %s", expectedResponse, receivedResponse) }) return err } diff --git a/test/e2e/test_images/helloworld-grpc/BUILD.bazel b/test/e2e/test_images/helloworld-grpc/BUILD.bazel new file mode 100644 index 000000000000..d81f969cfee3 --- /dev/null +++ b/test/e2e/test_images/helloworld-grpc/BUILD.bazel @@ -0,0 +1,19 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") + +go_library( + name = "go_default_library", + srcs = ["helloworld.go"], + importpath = "github.com/knative/serving/test/e2e/test_images/helloworld-grpc", + visibility = ["//visibility:private"], + deps = [ + "//test/e2e/test_images/helloworld-grpc/proto:go_default_library", + "//vendor/golang.org/x/net/context:go_default_library", + "//vendor/google.golang.org/grpc:go_default_library", + ], +) + +go_binary( + name = "helloworld-grpc", + embed = [":go_default_library"], + visibility = ["//visibility:public"], +) diff --git a/test/e2e/test_images/helloworld-grpc/Dockerfile b/test/e2e/test_images/helloworld-grpc/Dockerfile index 61bd3e4dd158..f4f63a1779eb 100644 --- a/test/e2e/test_images/helloworld-grpc/Dockerfile +++ b/test/e2e/test_images/helloworld-grpc/Dockerfile @@ -1,6 +1,6 @@ FROM golang:latest -ENV APP ${GOPATH}/src/github.com/elafros/elafros/test/e2e/test_images/helloworld-grpc +ENV APP ${GOPATH}/src/github.com/knative/serving/test/e2e/test_images/helloworld-grpc RUN mkdir -p "$APP" ADD . "$APP" diff --git a/test/e2e/test_images/helloworld-grpc/helloworld.go b/test/e2e/test_images/helloworld-grpc/helloworld.go index 408c14ef1d8f..4734732e5816 100644 --- a/test/e2e/test_images/helloworld-grpc/helloworld.go +++ b/test/e2e/test_images/helloworld-grpc/helloworld.go @@ -5,7 +5,7 @@ import ( "log" "net" - hello "github.com/elafros/elafros/test/e2e/test_images/helloworld-grpc/proto" + hello "github.com/knative/serving/test/e2e/test_images/helloworld-grpc/proto" "golang.org/x/net/context" "google.golang.org/grpc" ) diff --git a/test/e2e/test_images/helloworld-grpc/proto/BUILD.bazel b/test/e2e/test_images/helloworld-grpc/proto/BUILD.bazel new file mode 100644 index 000000000000..76df3d403b27 --- /dev/null +++ b/test/e2e/test_images/helloworld-grpc/proto/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = ["helloworld.pb.go"], + importpath = "github.com/knative/serving/test/e2e/test_images/helloworld-grpc/proto", + visibility = ["//visibility:public"], + deps = [ + "//vendor/github.com/golang/protobuf/proto:go_default_library", + "//vendor/golang.org/x/net/context:go_default_library", + "//vendor/google.golang.org/grpc:go_default_library", + ], +) diff --git a/vendor/github.com/golang/protobuf/regenerate.sh b/vendor/github.com/golang/protobuf/regenerate.sh deleted file mode 100755 index dc7e2d1f6102..000000000000 --- a/vendor/github.com/golang/protobuf/regenerate.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash - -set -e - -# Install the working tree's protoc-gen-gen in a tempdir. -tmpdir=$(mktemp -d -t regen-wkt.XXXXXX) -trap 'rm -rf $tmpdir' EXIT -mkdir -p $tmpdir/bin -PATH=$tmpdir/bin:$PATH -GOBIN=$tmpdir/bin go install ./protoc-gen-go - -# Public imports require at least Go 1.9. -supportTypeAliases="" -if go list -f '{{context.ReleaseTags}}' runtime | grep -q go1.9; then - supportTypeAliases=1 -fi - -# Generate various test protos. -PROTO_DIRS=( - conformance/internal/conformance_proto - jsonpb/jsonpb_test_proto - proto - protoc-gen-go/testdata -) -for dir in ${PROTO_DIRS[@]}; do - for p in `find $dir -name "*.proto"`; do - if [[ $p == */import_public/* && ! $supportTypeAliases ]]; then - echo "# $p (skipped)" - continue; - fi - echo "# $p" - protoc -I$dir --go_out=plugins=grpc,paths=source_relative:$dir $p - done -done - -# Deriving the location of the source protos from the path to the -# protoc binary may be a bit odd, but this is what protoc itself does. -PROTO_INCLUDE=$(dirname $(dirname $(which protoc)))/include - -# Well-known types. -WKT_PROTOS=(any duration empty struct timestamp wrappers) -for p in ${WKT_PROTOS[@]}; do - echo "# google/protobuf/$p.proto" - protoc --go_out=paths=source_relative:$tmpdir google/protobuf/$p.proto - cp $tmpdir/google/protobuf/$p.pb.go ptypes/$p - cp $PROTO_INCLUDE/google/protobuf/$p.proto ptypes/$p -done - -# descriptor.proto. -echo "# google/protobuf/descriptor.proto" -protoc --go_out=paths=source_relative:$tmpdir google/protobuf/descriptor.proto -cp $tmpdir/google/protobuf/descriptor.pb.go protoc-gen-go/descriptor -cp $PROTO_INCLUDE/google/protobuf/descriptor.proto protoc-gen-go/descriptor diff --git a/vendor/golang.org/x/net/http/httpguts/BUILD.bazel b/vendor/golang.org/x/net/http/httpguts/BUILD.bazel index 24f6bca64127..1c1f26a9265e 100644 --- a/vendor/golang.org/x/net/http/httpguts/BUILD.bazel +++ b/vendor/golang.org/x/net/http/httpguts/BUILD.bazel @@ -2,9 +2,12 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", - srcs = ["httplex.go"], - importmap = "knative/vendor/golang.org/x/net/lex/httplex", - importpath = "golang.org/x/net/lex/httplex", + srcs = [ + "guts.go", + "httplex.go", + ], + importmap = "knative/vendor/golang.org/x/net/http/httpguts", + importpath = "golang.org/x/net/http/httpguts", visibility = ["//visibility:public"], deps = ["//vendor/golang.org/x/net/idna:go_default_library"], ) diff --git a/vendor/golang.org/x/net/internal/socks/BUILD.bazel b/vendor/golang.org/x/net/internal/socks/BUILD.bazel index fca09805f4f9..3cca3544da39 100644 --- a/vendor/golang.org/x/net/internal/socks/BUILD.bazel +++ b/vendor/golang.org/x/net/internal/socks/BUILD.bazel @@ -6,7 +6,7 @@ go_library( "client.go", "socks.go", ], - importmap = "elafros/vendor/golang.org/x/net/internal/socks", + importmap = "knative/vendor/golang.org/x/net/internal/socks", importpath = "golang.org/x/net/internal/socks", visibility = ["//vendor/golang.org/x/net:__subpackages__"], ) diff --git a/vendor/golang.org/x/net/internal/timeseries/BUILD.bazel b/vendor/golang.org/x/net/internal/timeseries/BUILD.bazel index c07af1cf522b..b9f038699041 100644 --- a/vendor/golang.org/x/net/internal/timeseries/BUILD.bazel +++ b/vendor/golang.org/x/net/internal/timeseries/BUILD.bazel @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", srcs = ["timeseries.go"], - importmap = "elafros/vendor/golang.org/x/net/internal/timeseries", + importmap = "knative/vendor/golang.org/x/net/internal/timeseries", importpath = "golang.org/x/net/internal/timeseries", visibility = ["//vendor/golang.org/x/net:__subpackages__"], ) diff --git a/vendor/golang.org/x/net/trace/BUILD.bazel b/vendor/golang.org/x/net/trace/BUILD.bazel index 4f38dd736e79..24811c991319 100644 --- a/vendor/golang.org/x/net/trace/BUILD.bazel +++ b/vendor/golang.org/x/net/trace/BUILD.bazel @@ -9,7 +9,7 @@ go_library( "trace_go16.go", "trace_go17.go", ], - importmap = "elafros/vendor/golang.org/x/net/trace", + importmap = "knative/vendor/golang.org/x/net/trace", importpath = "golang.org/x/net/trace", visibility = ["//visibility:public"], deps = [ diff --git a/vendor/google.golang.org/genproto/.travis.yml b/vendor/google.golang.org/genproto/.travis.yml deleted file mode 100644 index e673e05e6c38..000000000000 --- a/vendor/google.golang.org/genproto/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: go -go: - - 1.6 - - 1.7 - - 1.8 -go_import_path: google.golang.org/genproto - -script: -- go test -v ./... -- if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]]; then - go get -u -v cloud.google.com/go/...; - fi diff --git a/vendor/google.golang.org/genproto/CONTRIBUTING.md b/vendor/google.golang.org/genproto/CONTRIBUTING.md deleted file mode 100644 index 2827b7d3fa27..000000000000 --- a/vendor/google.golang.org/genproto/CONTRIBUTING.md +++ /dev/null @@ -1,27 +0,0 @@ -Want to contribute? Great! First, read this page (including the small print at the end). - -### Before you contribute -Before we can use your code, you must sign the -[Google Individual Contributor License Agreement] -(https://cla.developers.google.com/about/google-individual) -(CLA), which you can do online. The CLA is necessary mainly because you own the -copyright to your changes, even after your contribution becomes part of our -codebase, so we need your permission to use and distribute your code. We also -need to be sure of various other things—for instance that you'll tell us if you -know that your code infringes on other people's patents. You don't have to sign -the CLA until after you've submitted your code for review and a member has -approved it, but you must do it before we can put your code into our codebase. -Before you start working on a larger contribution, you should get in touch with -us first through the issue tracker with your idea so that we can help out and -possibly guide you. Coordinating up front makes it much easier to avoid -frustration later on. - -### Code reviews -All submissions, including submissions by project members, require review. We -use Github pull requests for this purpose. - -### The small print -Contributions made by corporations are covered by a different agreement than -the one above, the -[Software Grant and Corporate Contributor License Agreement] -(https://cla.developers.google.com/about/google-corporate). diff --git a/vendor/google.golang.org/genproto/README.md b/vendor/google.golang.org/genproto/README.md deleted file mode 100644 index 51d0bae5f71f..000000000000 --- a/vendor/google.golang.org/genproto/README.md +++ /dev/null @@ -1,28 +0,0 @@ -Go generated proto packages -=========================== - -[![Build Status](https://travis-ci.org/google/go-genproto.svg?branch=master)](https://travis-ci.org/google/go-genproto) -[![GoDoc](https://godoc.org/google.golang.org/genproto?status.svg)](https://godoc.org/google.golang.org/genproto) - -> **IMPORTANT** This repository is currently experimental. The structure -> of the contained packages is subject to change. Please see the original -> source repositories (listed below) to find out the status of the each -> protocol buffer's associated service. - -This repository contains the generated Go packages for common protocol buffer -types, and the generated [gRPC][1] code necessary for interacting with Google's gRPC -APIs. - -There are two sources for the proto files used in this repository: - -1. [google/protobuf][2]: the code in the `protobuf` and `ptypes` subdirectories - is derived from this repo. The messages in `protobuf` are used to describe - protocol buffer messages themselves. The messages under `ptypes` define the - common well-known types. -2. [googleapis/googleapis][3]: the code in the `googleapis` is derived from this - repo. The packages here contain types specifically for interacting with Google - APIs. - -[1]: http://grpc.io -[2]: https://github.com/google/protobuf/ -[3]: https://github.com/googleapis/googleapis/ diff --git a/vendor/google.golang.org/genproto/googleapis/rpc/status/BUILD.bazel b/vendor/google.golang.org/genproto/googleapis/rpc/status/BUILD.bazel index 5537b4e89a01..42b26817a2d4 100644 --- a/vendor/google.golang.org/genproto/googleapis/rpc/status/BUILD.bazel +++ b/vendor/google.golang.org/genproto/googleapis/rpc/status/BUILD.bazel @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", srcs = ["status.pb.go"], - importmap = "elafros/vendor/google.golang.org/genproto/googleapis/rpc/status", + importmap = "knative/vendor/google.golang.org/genproto/googleapis/rpc/status", importpath = "google.golang.org/genproto/googleapis/rpc/status", visibility = ["//visibility:public"], deps = [ diff --git a/vendor/google.golang.org/genproto/regen.go b/vendor/google.golang.org/genproto/regen.go deleted file mode 100644 index 9c906f2095be..000000000000 --- a/vendor/google.golang.org/genproto/regen.go +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright 2016 Google Inc. -// -// 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. - -// +build ignore - -// Regen.go regenerates the genproto repository. -// -// Regen.go recursively walks through each directory named by given arguments, -// looking for all .proto files. (Symlinks are not followed.) -// If the pkg_prefix flag is not an empty string, -// any proto file without `go_package` option -// or whose option does not begin with the prefix is ignored. -// Protoc is executed on remaining files, -// one invocation per set of files declaring the same Go package. -package main - -import ( - "flag" - "fmt" - "io/ioutil" - "log" - "os" - "os/exec" - "path/filepath" - "regexp" - "strconv" - "strings" -) - -var goPkgOptRe = regexp.MustCompile(`(?m)^option go_package = (.*);`) - -func usage() { - fmt.Fprintln(os.Stderr, `usage: go run regen.go -go_out=path/to/output [-pkg_prefix=pkg/prefix] roots... - -Most users will not need to run this file directly. -To regenerate this repository, run regen.sh instead.`) - flag.PrintDefaults() -} - -func main() { - goOutDir := flag.String("go_out", "", "go_out argument to pass to protoc-gen-go") - pkgPrefix := flag.String("pkg_prefix", "", "only include proto files with go_package starting with this prefix") - flag.Usage = usage - flag.Parse() - - if *goOutDir == "" { - log.Fatal("need go_out flag") - } - - pkgFiles := make(map[string][]string) - walkFn := func(path string, info os.FileInfo, err error) error { - if err != nil { - return err - } - if !info.Mode().IsRegular() || !strings.HasSuffix(path, ".proto") { - return nil - } - pkg, err := goPkg(path) - if err != nil { - return err - } - pkgFiles[pkg] = append(pkgFiles[pkg], path) - return nil - } - for _, root := range flag.Args() { - if err := filepath.Walk(root, walkFn); err != nil { - log.Fatal(err) - } - } - for pkg, fnames := range pkgFiles { - if !strings.HasPrefix(pkg, *pkgPrefix) { - continue - } - if out, err := protoc(*goOutDir, flag.Args(), fnames); err != nil { - log.Fatalf("error executing protoc: %s\n%s", err, out) - } - } -} - -// goPkg reports the import path declared in the given file's -// `go_package` option. If the option is missing, goPkg returns empty string. -func goPkg(fname string) (string, error) { - content, err := ioutil.ReadFile(fname) - if err != nil { - return "", err - } - - var pkgName string - if match := goPkgOptRe.FindSubmatch(content); len(match) > 0 { - pn, err := strconv.Unquote(string(match[1])) - if err != nil { - return "", err - } - pkgName = pn - } - if p := strings.IndexRune(pkgName, ';'); p > 0 { - pkgName = pkgName[:p] - } - return pkgName, nil -} - -// protoc executes the "protoc" command on files named in fnames, -// passing go_out and include flags specified in goOut and includes respectively. -// protoc returns combined output from stdout and stderr. -func protoc(goOut string, includes, fnames []string) ([]byte, error) { - args := []string{"--go_out=plugins=grpc:" + goOut} - for _, inc := range includes { - args = append(args, "-I", inc) - } - args = append(args, fnames...) - return exec.Command("protoc", args...).CombinedOutput() -} diff --git a/vendor/google.golang.org/genproto/regen.sh b/vendor/google.golang.org/genproto/regen.sh deleted file mode 100755 index 8d9c73197de0..000000000000 --- a/vendor/google.golang.org/genproto/regen.sh +++ /dev/null @@ -1,77 +0,0 @@ -#!/bin/bash -# -# Copyright 2016 Google Inc. -# -# 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. - -# This script rebuilds the generated code for the protocol buffers. -# To run this you will need protoc and goprotobuf installed; -# see https://github.com/golang/protobuf for instructions. -# You also need Go and Git installed. - -set -e - -PKG=google.golang.org/genproto -PROTO_REPO=https://github.com/google/protobuf -PROTO_SUBDIR=src/google/protobuf -API_REPO=https://github.com/googleapis/googleapis - -function die() { - echo 1>&2 $* - exit 1 -} - -# Sanity check that the right tools are accessible. -for tool in go git protoc protoc-gen-go; do - q=$(which $tool) || die "didn't find $tool" - echo 1>&2 "$tool: $q" -done - -root=$(go list -f '{{.Root}}' $PKG/... | head -n1) -if [ -z "$root" ]; then - die "cannot find root of $PKG" -fi - -remove_dirs= -trap 'rm -rf $remove_dirs' EXIT - -if [ -z "$PROTOBUF" ]; then - proto_repo_dir=$(mktemp -d -t regen-cds-proto.XXXXXX) - git clone -q $PROTO_REPO $proto_repo_dir & - remove_dirs="$proto_repo_dir" - # The protoc include directory is actually the "src" directory of the repo. - protodir="$proto_repo_dir/src" -else - protodir="$PROTOBUF/src" -fi - -if [ -z "$GOOGLEAPIS" ]; then - apidir=$(mktemp -d -t regen-cds-api.XXXXXX) - git clone -q $API_REPO $apidir & - remove_dirs="$remove_dirs $apidir" -else - apidir="$GOOGLEAPIS" -fi - -wait - -# Nuke everything, we'll generate them back -rm -r googleapis/ protobuf/ - -go run regen.go -go_out "$root/src" -pkg_prefix "$PKG" "$apidir" "$protodir" - -# Sanity check the build. -echo 1>&2 "Checking that the libraries build..." -go build -v ./... - -echo 1>&2 "All done!" diff --git a/vendor/google.golang.org/grpc/.travis.yml b/vendor/google.golang.org/grpc/.travis.yml deleted file mode 100644 index 3c2621ab750a..000000000000 --- a/vendor/google.golang.org/grpc/.travis.yml +++ /dev/null @@ -1,24 +0,0 @@ -language: go - -go: - - 1.6.x - - 1.7.x - - 1.8.x - - 1.9.x - - 1.10.x - -matrix: - include: - - go: 1.10.x - env: RUN386=1 - -go_import_path: google.golang.org/grpc - -before_install: - - if [[ -n "$RUN386" ]]; then export GOARCH=386; fi - - if [[ "$TRAVIS_GO_VERSION" = 1.10* && "$GOARCH" != "386" ]]; then ./vet.sh -install || exit 1; fi - -script: - - if [[ "$TRAVIS_GO_VERSION" = 1.10* && "$GOARCH" != "386" ]]; then ./vet.sh || exit 1; fi - - make test || exit 1 - - if [[ "$GOARCH" != "386" ]]; then make testrace; fi diff --git a/vendor/google.golang.org/grpc/BUILD.bazel b/vendor/google.golang.org/grpc/BUILD.bazel index d34aeb2e6e53..b96fec5cd526 100644 --- a/vendor/google.golang.org/grpc/BUILD.bazel +++ b/vendor/google.golang.org/grpc/BUILD.bazel @@ -29,7 +29,7 @@ go_library( "stream.go", "trace.go", ], - importmap = "elafros/vendor/google.golang.org/grpc", + importmap = "knative/vendor/google.golang.org/grpc", importpath = "google.golang.org/grpc", visibility = ["//visibility:public"], deps = [ diff --git a/vendor/google.golang.org/grpc/CONTRIBUTING.md b/vendor/google.golang.org/grpc/CONTRIBUTING.md deleted file mode 100644 index 0863eb26b602..000000000000 --- a/vendor/google.golang.org/grpc/CONTRIBUTING.md +++ /dev/null @@ -1,36 +0,0 @@ -# How to contribute - -We definitely welcome your patches and contributions to gRPC! - -If you are new to github, please start by reading [Pull Request howto](https://help.github.com/articles/about-pull-requests/) - -## Legal requirements - -In order to protect both you and ourselves, you will need to sign the -[Contributor License Agreement](https://identity.linuxfoundation.org/projects/cncf). - -## Guidelines for Pull Requests -How to get your contributions merged smoothly and quickly. - -- Create **small PRs** that are narrowly focused on **addressing a single concern**. We often times receive PRs that are trying to fix several things at a time, but only one fix is considered acceptable, nothing gets merged and both author's & review's time is wasted. Create more PRs to address different concerns and everyone will be happy. - -- For speculative changes, consider opening an issue and discussing it first. If you are suggesting a behavioral or API change, consider starting with a [gRFC proposal](https://github.com/grpc/proposal). - -- Provide a good **PR description** as a record of **what** change is being made and **why** it was made. Link to a github issue if it exists. - -- Don't fix code style and formatting unless you are already changing that line to address an issue. PRs with irrelevant changes won't be merged. If you do want to fix formatting or style, do that in a separate PR. - -- Unless your PR is trivial, you should expect there will be reviewer comments that you'll need to address before merging. We expect you to be reasonably responsive to those comments, otherwise the PR will be closed after 2-3 weeks of inactivity. - -- Maintain **clean commit history** and use **meaningful commit messages**. PRs with messy commit history are difficult to review and won't be merged. Use `rebase -i upstream/master` to curate your commit history and/or to bring in latest changes from master (but avoid rebasing in the middle of a code review). - -- Keep your PR up to date with upstream/master (if there are merge conflicts, we can't really merge your change). - -- **All tests need to be passing** before your change can be merged. We recommend you **run tests locally** before creating your PR to catch breakages early on. - - `make all` to test everything, OR - - `make vet` to catch vet errors - - `make test` to run the tests - - `make testrace` to run tests in race mode - -- Exceptions to the rules can be made if there's a compelling reason for doing so. - diff --git a/vendor/google.golang.org/grpc/Makefile b/vendor/google.golang.org/grpc/Makefile deleted file mode 100644 index 6f393a808dfa..000000000000 --- a/vendor/google.golang.org/grpc/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -all: vet test testrace - -deps: - go get -d -v google.golang.org/grpc/... - -updatedeps: - go get -d -v -u -f google.golang.org/grpc/... - -testdeps: - go get -d -v -t google.golang.org/grpc/... - -updatetestdeps: - go get -d -v -t -u -f google.golang.org/grpc/... - -build: deps - go build google.golang.org/grpc/... - -proto: - @ if ! which protoc > /dev/null; then \ - echo "error: protoc not installed" >&2; \ - exit 1; \ - fi - go generate google.golang.org/grpc/... - -vet: - ./vet.sh - -test: testdeps - go test -cpu 1,4 -timeout 5m google.golang.org/grpc/... - -testrace: testdeps - go test -race -cpu 1,4 -timeout 7m google.golang.org/grpc/... - -clean: - go clean -i google.golang.org/grpc/... - -.PHONY: \ - all \ - deps \ - updatedeps \ - testdeps \ - updatetestdeps \ - build \ - proto \ - vet \ - test \ - testrace \ - clean diff --git a/vendor/google.golang.org/grpc/README.md b/vendor/google.golang.org/grpc/README.md deleted file mode 100644 index 789adfd65362..000000000000 --- a/vendor/google.golang.org/grpc/README.md +++ /dev/null @@ -1,45 +0,0 @@ -# gRPC-Go - -[![Build Status](https://travis-ci.org/grpc/grpc-go.svg)](https://travis-ci.org/grpc/grpc-go) [![GoDoc](https://godoc.org/google.golang.org/grpc?status.svg)](https://godoc.org/google.golang.org/grpc) [![GoReportCard](https://goreportcard.com/badge/grpc/grpc-go)](https://goreportcard.com/report/github.com/grpc/grpc-go) - -The Go implementation of [gRPC](https://grpc.io/): A high performance, open source, general RPC framework that puts mobile and HTTP/2 first. For more information see the [gRPC Quick Start: Go](https://grpc.io/docs/quickstart/go.html) guide. - -Installation ------------- - -To install this package, you need to install Go and setup your Go workspace on your computer. The simplest way to install the library is to run: - -``` -$ go get -u google.golang.org/grpc -``` - -Prerequisites -------------- - -This requires Go 1.6 or later. Go 1.7 will be required soon. - -Constraints ------------ -The grpc package should only depend on standard Go packages and a small number of exceptions. If your contribution introduces new dependencies which are NOT in the [list](http://godoc.org/google.golang.org/grpc?imports), you need a discussion with gRPC-Go authors and consultants. - -Documentation -------------- -See [API documentation](https://godoc.org/google.golang.org/grpc) for package and API descriptions and find examples in the [examples directory](examples/). - -Performance ------------ -See the current benchmarks for some of the languages supported in [this dashboard](https://performance-dot-grpc-testing.appspot.com/explore?dashboard=5652536396611584&widget=490377658&container=1286539696). - -Status ------- -General Availability [Google Cloud Platform Launch Stages](https://cloud.google.com/terms/launch-stages). - -FAQ ---- - -#### Compiling error, undefined: grpc.SupportPackageIsVersion - -Please update proto package, gRPC package and rebuild the proto files: - - `go get -u github.com/golang/protobuf/{proto,protoc-gen-go}` - - `go get -u google.golang.org/grpc` - - `protoc --go_out=plugins=grpc:. *.proto` diff --git a/vendor/google.golang.org/grpc/balancer/BUILD.bazel b/vendor/google.golang.org/grpc/balancer/BUILD.bazel index 72e6e240aefa..0a2cb26145f4 100644 --- a/vendor/google.golang.org/grpc/balancer/BUILD.bazel +++ b/vendor/google.golang.org/grpc/balancer/BUILD.bazel @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", srcs = ["balancer.go"], - importmap = "elafros/vendor/google.golang.org/grpc/balancer", + importmap = "knative/vendor/google.golang.org/grpc/balancer", importpath = "google.golang.org/grpc/balancer", visibility = ["//visibility:public"], deps = [ diff --git a/vendor/google.golang.org/grpc/balancer/base/BUILD.bazel b/vendor/google.golang.org/grpc/balancer/base/BUILD.bazel index 8b3d8a175e85..11348670c05c 100644 --- a/vendor/google.golang.org/grpc/balancer/base/BUILD.bazel +++ b/vendor/google.golang.org/grpc/balancer/base/BUILD.bazel @@ -6,7 +6,7 @@ go_library( "balancer.go", "base.go", ], - importmap = "elafros/vendor/google.golang.org/grpc/balancer/base", + importmap = "knative/vendor/google.golang.org/grpc/balancer/base", importpath = "google.golang.org/grpc/balancer/base", visibility = ["//visibility:public"], deps = [ diff --git a/vendor/google.golang.org/grpc/balancer/roundrobin/BUILD.bazel b/vendor/google.golang.org/grpc/balancer/roundrobin/BUILD.bazel index dd3201d26adc..bc2a51e401b7 100644 --- a/vendor/google.golang.org/grpc/balancer/roundrobin/BUILD.bazel +++ b/vendor/google.golang.org/grpc/balancer/roundrobin/BUILD.bazel @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", srcs = ["roundrobin.go"], - importmap = "elafros/vendor/google.golang.org/grpc/balancer/roundrobin", + importmap = "knative/vendor/google.golang.org/grpc/balancer/roundrobin", importpath = "google.golang.org/grpc/balancer/roundrobin", visibility = ["//visibility:public"], deps = [ diff --git a/vendor/google.golang.org/grpc/channelz/BUILD.bazel b/vendor/google.golang.org/grpc/channelz/BUILD.bazel index 0621d9bf54b3..5b9ea9dd50f7 100644 --- a/vendor/google.golang.org/grpc/channelz/BUILD.bazel +++ b/vendor/google.golang.org/grpc/channelz/BUILD.bazel @@ -6,7 +6,7 @@ go_library( "funcs.go", "types.go", ], - importmap = "elafros/vendor/google.golang.org/grpc/channelz", + importmap = "knative/vendor/google.golang.org/grpc/channelz", importpath = "google.golang.org/grpc/channelz", visibility = ["//visibility:public"], deps = [ diff --git a/vendor/google.golang.org/grpc/codegen.sh b/vendor/google.golang.org/grpc/codegen.sh deleted file mode 100755 index 4cdc6ba7c090..000000000000 --- a/vendor/google.golang.org/grpc/codegen.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash - -# This script serves as an example to demonstrate how to generate the gRPC-Go -# interface and the related messages from .proto file. -# -# It assumes the installation of i) Google proto buffer compiler at -# https://github.com/google/protobuf (after v2.6.1) and ii) the Go codegen -# plugin at https://github.com/golang/protobuf (after 2015-02-20). If you have -# not, please install them first. -# -# We recommend running this script at $GOPATH/src. -# -# If this is not what you need, feel free to make your own scripts. Again, this -# script is for demonstration purpose. -# -proto=$1 -protoc --go_out=plugins=grpc:. $proto diff --git a/vendor/google.golang.org/grpc/codes/BUILD.bazel b/vendor/google.golang.org/grpc/codes/BUILD.bazel index fa53b2fff359..a0b1a93bdbe5 100644 --- a/vendor/google.golang.org/grpc/codes/BUILD.bazel +++ b/vendor/google.golang.org/grpc/codes/BUILD.bazel @@ -6,7 +6,7 @@ go_library( "code_string.go", "codes.go", ], - importmap = "elafros/vendor/google.golang.org/grpc/codes", + importmap = "knative/vendor/google.golang.org/grpc/codes", importpath = "google.golang.org/grpc/codes", visibility = ["//visibility:public"], ) diff --git a/vendor/google.golang.org/grpc/connectivity/BUILD.bazel b/vendor/google.golang.org/grpc/connectivity/BUILD.bazel index 243a8742277e..21c6c3588c62 100644 --- a/vendor/google.golang.org/grpc/connectivity/BUILD.bazel +++ b/vendor/google.golang.org/grpc/connectivity/BUILD.bazel @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", srcs = ["connectivity.go"], - importmap = "elafros/vendor/google.golang.org/grpc/connectivity", + importmap = "knative/vendor/google.golang.org/grpc/connectivity", importpath = "google.golang.org/grpc/connectivity", visibility = ["//visibility:public"], deps = [ diff --git a/vendor/google.golang.org/grpc/credentials/BUILD.bazel b/vendor/google.golang.org/grpc/credentials/BUILD.bazel index 4e14653267a3..1d4541814bc7 100644 --- a/vendor/google.golang.org/grpc/credentials/BUILD.bazel +++ b/vendor/google.golang.org/grpc/credentials/BUILD.bazel @@ -8,7 +8,7 @@ go_library( "credentials_util_go18.go", "credentials_util_pre_go17.go", ], - importmap = "elafros/vendor/google.golang.org/grpc/credentials", + importmap = "knative/vendor/google.golang.org/grpc/credentials", importpath = "google.golang.org/grpc/credentials", visibility = ["//visibility:public"], deps = ["//vendor/golang.org/x/net/context:go_default_library"], diff --git a/vendor/google.golang.org/grpc/encoding/BUILD.bazel b/vendor/google.golang.org/grpc/encoding/BUILD.bazel index 6368eb42f12c..12a1806eed74 100644 --- a/vendor/google.golang.org/grpc/encoding/BUILD.bazel +++ b/vendor/google.golang.org/grpc/encoding/BUILD.bazel @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", srcs = ["encoding.go"], - importmap = "elafros/vendor/google.golang.org/grpc/encoding", + importmap = "knative/vendor/google.golang.org/grpc/encoding", importpath = "google.golang.org/grpc/encoding", visibility = ["//visibility:public"], ) diff --git a/vendor/google.golang.org/grpc/encoding/proto/BUILD.bazel b/vendor/google.golang.org/grpc/encoding/proto/BUILD.bazel index 1010dc46a2f3..95bec0b04034 100644 --- a/vendor/google.golang.org/grpc/encoding/proto/BUILD.bazel +++ b/vendor/google.golang.org/grpc/encoding/proto/BUILD.bazel @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", srcs = ["proto.go"], - importmap = "elafros/vendor/google.golang.org/grpc/encoding/proto", + importmap = "knative/vendor/google.golang.org/grpc/encoding/proto", importpath = "google.golang.org/grpc/encoding/proto", visibility = ["//visibility:public"], deps = [ diff --git a/vendor/google.golang.org/grpc/grpclb/grpc_lb_v1/messages/BUILD.bazel b/vendor/google.golang.org/grpc/grpclb/grpc_lb_v1/messages/BUILD.bazel index 847f6e27ab20..1bb3297c7604 100644 --- a/vendor/google.golang.org/grpc/grpclb/grpc_lb_v1/messages/BUILD.bazel +++ b/vendor/google.golang.org/grpc/grpclb/grpc_lb_v1/messages/BUILD.bazel @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", srcs = ["messages.pb.go"], - importmap = "elafros/vendor/google.golang.org/grpc/grpclb/grpc_lb_v1/messages", + importmap = "knative/vendor/google.golang.org/grpc/grpclb/grpc_lb_v1/messages", importpath = "google.golang.org/grpc/grpclb/grpc_lb_v1/messages", visibility = ["//visibility:public"], deps = ["//vendor/github.com/golang/protobuf/proto:go_default_library"], diff --git a/vendor/google.golang.org/grpc/grpclb/grpc_lb_v1/messages/messages.proto b/vendor/google.golang.org/grpc/grpclb/grpc_lb_v1/messages/messages.proto deleted file mode 100644 index 42d99c109fe6..000000000000 --- a/vendor/google.golang.org/grpc/grpclb/grpc_lb_v1/messages/messages.proto +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright 2016 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. - -syntax = "proto3"; - -package grpc.lb.v1; -option go_package = "google.golang.org/grpc/grpclb/grpc_lb_v1/messages"; - -message Duration { - // Signed seconds of the span of time. Must be from -315,576,000,000 - // to +315,576,000,000 inclusive. - int64 seconds = 1; - - // Signed fractions of a second at nanosecond resolution of the span - // of time. Durations less than one second are represented with a 0 - // `seconds` field and a positive or negative `nanos` field. For durations - // of one second or more, a non-zero value for the `nanos` field must be - // of the same sign as the `seconds` field. Must be from -999,999,999 - // to +999,999,999 inclusive. - int32 nanos = 2; -} - -message Timestamp { - // Represents seconds of UTC time since Unix epoch - // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - // 9999-12-31T23:59:59Z inclusive. - int64 seconds = 1; - - // Non-negative fractions of a second at nanosecond resolution. Negative - // second values with fractions must still have non-negative nanos values - // that count forward in time. Must be from 0 to 999,999,999 - // inclusive. - int32 nanos = 2; -} - -message LoadBalanceRequest { - oneof load_balance_request_type { - // This message should be sent on the first request to the load balancer. - InitialLoadBalanceRequest initial_request = 1; - - // The client stats should be periodically reported to the load balancer - // based on the duration defined in the InitialLoadBalanceResponse. - ClientStats client_stats = 2; - } -} - -message InitialLoadBalanceRequest { - // Name of load balanced service (IE, balancer.service.com) - // length should be less than 256 bytes. - string name = 1; -} - -// Contains client level statistics that are useful to load balancing. Each -// count except the timestamp should be reset to zero after reporting the stats. -message ClientStats { - // The timestamp of generating the report. - Timestamp timestamp = 1; - - // The total number of RPCs that started. - int64 num_calls_started = 2; - - // The total number of RPCs that finished. - int64 num_calls_finished = 3; - - // The total number of RPCs that were dropped by the client because of rate - // limiting. - int64 num_calls_finished_with_drop_for_rate_limiting = 4; - - // The total number of RPCs that were dropped by the client because of load - // balancing. - int64 num_calls_finished_with_drop_for_load_balancing = 5; - - // The total number of RPCs that failed to reach a server except dropped RPCs. - int64 num_calls_finished_with_client_failed_to_send = 6; - - // The total number of RPCs that finished and are known to have been received - // by a server. - int64 num_calls_finished_known_received = 7; -} - -message LoadBalanceResponse { - oneof load_balance_response_type { - // This message should be sent on the first response to the client. - InitialLoadBalanceResponse initial_response = 1; - - // Contains the list of servers selected by the load balancer. The client - // should send requests to these servers in the specified order. - ServerList server_list = 2; - } -} - -message InitialLoadBalanceResponse { - // This is an application layer redirect that indicates the client should use - // the specified server for load balancing. When this field is non-empty in - // the response, the client should open a separate connection to the - // load_balancer_delegate and call the BalanceLoad method. Its length should - // be less than 64 bytes. - string load_balancer_delegate = 1; - - // This interval defines how often the client should send the client stats - // to the load balancer. Stats should only be reported when the duration is - // positive. - Duration client_stats_report_interval = 2; -} - -message ServerList { - // Contains a list of servers selected by the load balancer. The list will - // be updated when server resolutions change or as needed to balance load - // across more servers. The client should consume the server list in order - // unless instructed otherwise via the client_config. - repeated Server servers = 1; - - // Was google.protobuf.Duration expiration_interval. - reserved 3; -} - -// Contains server information. When none of the [drop_for_*] fields are true, -// use the other fields. When drop_for_rate_limiting is true, ignore all other -// fields. Use drop_for_load_balancing only when it is true and -// drop_for_rate_limiting is false. -message Server { - // A resolved address for the server, serialized in network-byte-order. It may - // either be an IPv4 or IPv6 address. - bytes ip_address = 1; - - // A resolved port number for the server. - int32 port = 2; - - // An opaque but printable token given to the frontend for each pick. All - // frontend requests for that pick must include the token in its initial - // metadata. The token is used by the backend to verify the request and to - // allow the backend to report load to the gRPC LB system. - // - // Its length is variable but less than 50 bytes. - string load_balance_token = 3; - - // Indicates whether this particular request should be dropped by the client - // for rate limiting. - bool drop_for_rate_limiting = 4; - - // Indicates whether this particular request should be dropped by the client - // for load balancing. - bool drop_for_load_balancing = 5; -} diff --git a/vendor/google.golang.org/grpc/grpclog/BUILD.bazel b/vendor/google.golang.org/grpc/grpclog/BUILD.bazel index ef9f3b56b464..b25c9a8f9ec3 100644 --- a/vendor/google.golang.org/grpc/grpclog/BUILD.bazel +++ b/vendor/google.golang.org/grpc/grpclog/BUILD.bazel @@ -7,7 +7,7 @@ go_library( "logger.go", "loggerv2.go", ], - importmap = "elafros/vendor/google.golang.org/grpc/grpclog", + importmap = "knative/vendor/google.golang.org/grpc/grpclog", importpath = "google.golang.org/grpc/grpclog", visibility = ["//visibility:public"], ) diff --git a/vendor/google.golang.org/grpc/internal/BUILD.bazel b/vendor/google.golang.org/grpc/internal/BUILD.bazel index 3e4e07808d4f..79e2ffb019c1 100644 --- a/vendor/google.golang.org/grpc/internal/BUILD.bazel +++ b/vendor/google.golang.org/grpc/internal/BUILD.bazel @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", srcs = ["internal.go"], - importmap = "elafros/vendor/google.golang.org/grpc/internal", + importmap = "knative/vendor/google.golang.org/grpc/internal", importpath = "google.golang.org/grpc/internal", visibility = ["//visibility:public"], ) diff --git a/vendor/google.golang.org/grpc/keepalive/BUILD.bazel b/vendor/google.golang.org/grpc/keepalive/BUILD.bazel index 99f0e4a52e31..ab5bc3730945 100644 --- a/vendor/google.golang.org/grpc/keepalive/BUILD.bazel +++ b/vendor/google.golang.org/grpc/keepalive/BUILD.bazel @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", srcs = ["keepalive.go"], - importmap = "elafros/vendor/google.golang.org/grpc/keepalive", + importmap = "knative/vendor/google.golang.org/grpc/keepalive", importpath = "google.golang.org/grpc/keepalive", visibility = ["//visibility:public"], ) diff --git a/vendor/google.golang.org/grpc/metadata/BUILD.bazel b/vendor/google.golang.org/grpc/metadata/BUILD.bazel index 41df69fee68f..6ae45e9f25ba 100644 --- a/vendor/google.golang.org/grpc/metadata/BUILD.bazel +++ b/vendor/google.golang.org/grpc/metadata/BUILD.bazel @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", srcs = ["metadata.go"], - importmap = "elafros/vendor/google.golang.org/grpc/metadata", + importmap = "knative/vendor/google.golang.org/grpc/metadata", importpath = "google.golang.org/grpc/metadata", visibility = ["//visibility:public"], deps = ["//vendor/golang.org/x/net/context:go_default_library"], diff --git a/vendor/google.golang.org/grpc/naming/BUILD.bazel b/vendor/google.golang.org/grpc/naming/BUILD.bazel index ca984f2505a7..3e307c2060f8 100644 --- a/vendor/google.golang.org/grpc/naming/BUILD.bazel +++ b/vendor/google.golang.org/grpc/naming/BUILD.bazel @@ -8,7 +8,7 @@ go_library( "go18.go", "naming.go", ], - importmap = "elafros/vendor/google.golang.org/grpc/naming", + importmap = "knative/vendor/google.golang.org/grpc/naming", importpath = "google.golang.org/grpc/naming", visibility = ["//visibility:public"], deps = [ diff --git a/vendor/google.golang.org/grpc/peer/BUILD.bazel b/vendor/google.golang.org/grpc/peer/BUILD.bazel index f5ca2aa93262..5e244dcaa6d0 100644 --- a/vendor/google.golang.org/grpc/peer/BUILD.bazel +++ b/vendor/google.golang.org/grpc/peer/BUILD.bazel @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", srcs = ["peer.go"], - importmap = "elafros/vendor/google.golang.org/grpc/peer", + importmap = "knative/vendor/google.golang.org/grpc/peer", importpath = "google.golang.org/grpc/peer", visibility = ["//visibility:public"], deps = [ diff --git a/vendor/google.golang.org/grpc/resolver/BUILD.bazel b/vendor/google.golang.org/grpc/resolver/BUILD.bazel index 8857604ab2ca..be411045b94a 100644 --- a/vendor/google.golang.org/grpc/resolver/BUILD.bazel +++ b/vendor/google.golang.org/grpc/resolver/BUILD.bazel @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", srcs = ["resolver.go"], - importmap = "elafros/vendor/google.golang.org/grpc/resolver", + importmap = "knative/vendor/google.golang.org/grpc/resolver", importpath = "google.golang.org/grpc/resolver", visibility = ["//visibility:public"], ) diff --git a/vendor/google.golang.org/grpc/resolver/dns/BUILD.bazel b/vendor/google.golang.org/grpc/resolver/dns/BUILD.bazel index 000e4f850c32..702cf317fe16 100644 --- a/vendor/google.golang.org/grpc/resolver/dns/BUILD.bazel +++ b/vendor/google.golang.org/grpc/resolver/dns/BUILD.bazel @@ -7,7 +7,7 @@ go_library( "go17.go", "go18.go", ], - importmap = "elafros/vendor/google.golang.org/grpc/resolver/dns", + importmap = "knative/vendor/google.golang.org/grpc/resolver/dns", importpath = "google.golang.org/grpc/resolver/dns", visibility = ["//visibility:public"], deps = [ diff --git a/vendor/google.golang.org/grpc/resolver/passthrough/BUILD.bazel b/vendor/google.golang.org/grpc/resolver/passthrough/BUILD.bazel index 1a34eb64d96e..5e020a289678 100644 --- a/vendor/google.golang.org/grpc/resolver/passthrough/BUILD.bazel +++ b/vendor/google.golang.org/grpc/resolver/passthrough/BUILD.bazel @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", srcs = ["passthrough.go"], - importmap = "elafros/vendor/google.golang.org/grpc/resolver/passthrough", + importmap = "knative/vendor/google.golang.org/grpc/resolver/passthrough", importpath = "google.golang.org/grpc/resolver/passthrough", visibility = ["//visibility:public"], deps = ["//vendor/google.golang.org/grpc/resolver:go_default_library"], diff --git a/vendor/google.golang.org/grpc/stats/BUILD.bazel b/vendor/google.golang.org/grpc/stats/BUILD.bazel index a31ba7a42b4f..f987aa175d14 100644 --- a/vendor/google.golang.org/grpc/stats/BUILD.bazel +++ b/vendor/google.golang.org/grpc/stats/BUILD.bazel @@ -6,7 +6,7 @@ go_library( "handlers.go", "stats.go", ], - importmap = "elafros/vendor/google.golang.org/grpc/stats", + importmap = "knative/vendor/google.golang.org/grpc/stats", importpath = "google.golang.org/grpc/stats", visibility = ["//visibility:public"], deps = ["//vendor/golang.org/x/net/context:go_default_library"], diff --git a/vendor/google.golang.org/grpc/status/BUILD.bazel b/vendor/google.golang.org/grpc/status/BUILD.bazel index e970d63298cd..dd96472bf0e0 100644 --- a/vendor/google.golang.org/grpc/status/BUILD.bazel +++ b/vendor/google.golang.org/grpc/status/BUILD.bazel @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", srcs = ["status.go"], - importmap = "elafros/vendor/google.golang.org/grpc/status", + importmap = "knative/vendor/google.golang.org/grpc/status", importpath = "google.golang.org/grpc/status", visibility = ["//visibility:public"], deps = [ diff --git a/vendor/google.golang.org/grpc/tap/BUILD.bazel b/vendor/google.golang.org/grpc/tap/BUILD.bazel index 73754d385b16..843dd981a1ec 100644 --- a/vendor/google.golang.org/grpc/tap/BUILD.bazel +++ b/vendor/google.golang.org/grpc/tap/BUILD.bazel @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", srcs = ["tap.go"], - importmap = "elafros/vendor/google.golang.org/grpc/tap", + importmap = "knative/vendor/google.golang.org/grpc/tap", importpath = "google.golang.org/grpc/tap", visibility = ["//visibility:public"], deps = ["//vendor/golang.org/x/net/context:go_default_library"], diff --git a/vendor/google.golang.org/grpc/transport/BUILD.bazel b/vendor/google.golang.org/grpc/transport/BUILD.bazel index 1a4a3b934c26..9ab97fe189e7 100644 --- a/vendor/google.golang.org/grpc/transport/BUILD.bazel +++ b/vendor/google.golang.org/grpc/transport/BUILD.bazel @@ -15,7 +15,7 @@ go_library( "log.go", "transport.go", ], - importmap = "elafros/vendor/google.golang.org/grpc/transport", + importmap = "knative/vendor/google.golang.org/grpc/transport", importpath = "google.golang.org/grpc/transport", visibility = ["//visibility:public"], deps = [ diff --git a/vendor/google.golang.org/grpc/vet.sh b/vendor/google.golang.org/grpc/vet.sh deleted file mode 100755 index 6126ab64bd17..000000000000 --- a/vendor/google.golang.org/grpc/vet.sh +++ /dev/null @@ -1,93 +0,0 @@ -#!/bin/bash - -if [[ `uname -a` = *"Darwin"* ]]; then - echo "It seems you are running on Mac. This script does not work on Mac. See https://github.com/grpc/grpc-go/issues/2047" - exit 1 -fi - -set -ex # Exit on error; debugging enabled. -set -o pipefail # Fail a pipe if any sub-command fails. - -die() { - echo "$@" >&2 - exit 1 -} - -PATH="$GOPATH/bin:$GOROOT/bin:$PATH" - -# Check proto in manual runs or cron runs. -if [[ "$TRAVIS" != "true" || "$TRAVIS_EVENT_TYPE" = "cron" ]]; then - check_proto="true" -fi - -if [ "$1" = "-install" ]; then - go get -d \ - google.golang.org/grpc/... - go get -u \ - github.com/golang/lint/golint \ - golang.org/x/tools/cmd/goimports \ - honnef.co/go/tools/cmd/staticcheck \ - github.com/client9/misspell/cmd/misspell \ - github.com/golang/protobuf/protoc-gen-go - if [[ "$check_proto" = "true" ]]; then - if [[ "$TRAVIS" = "true" ]]; then - PROTOBUF_VERSION=3.3.0 - PROTOC_FILENAME=protoc-${PROTOBUF_VERSION}-linux-x86_64.zip - pushd /home/travis - wget https://github.com/google/protobuf/releases/download/v${PROTOBUF_VERSION}/${PROTOC_FILENAME} - unzip ${PROTOC_FILENAME} - bin/protoc --version - popd - elif ! which protoc > /dev/null; then - die "Please install protoc into your path" - fi - fi - exit 0 -elif [[ "$#" -ne 0 ]]; then - die "Unknown argument(s): $*" -fi - -# TODO: Remove this check and the mangling below once "context" is imported -# directly. -if git status --porcelain | read; then - die "Uncommitted or untracked files found; commit changes first" -fi - -git ls-files "*.go" | xargs grep -L "\(Copyright [0-9]\{4,\} gRPC authors\)\|DO NOT EDIT" 2>&1 | tee /dev/stderr | (! read) -git ls-files "*.go" | xargs grep -l "\"unsafe\"" 2>&1 | (! grep -v '_test.go') | tee /dev/stderr | (! read) -gofmt -s -d -l . 2>&1 | tee /dev/stderr | (! read) -goimports -l . 2>&1 | tee /dev/stderr | (! read) -golint ./... 2>&1 | (grep -vE "(_mock|\.pb)\.go:" || true) | tee /dev/stderr | (! read) - -# Undo any edits made by this script. -cleanup() { - git reset --hard HEAD -} -trap cleanup EXIT - -# Rewrite golang.org/x/net/context -> context imports (see grpc/grpc-go#1484). -# TODO: Remove this mangling once "context" is imported directly (grpc/grpc-go#711). -git ls-files "*.go" | xargs sed -i 's:"golang.org/x/net/context":"context":' -set +o pipefail -# TODO: Stop filtering pb.go files once golang/protobuf#214 is fixed. -go tool vet -all . 2>&1 | grep -vE '(clientconn|transport\/transport_test).go:.*cancel (function|var)' | grep -vF '.pb.go:' | tee /dev/stderr | (! read) -set -o pipefail -git reset --hard HEAD - -if [[ "$check_proto" = "true" ]]; then - PATH="/home/travis/bin:$PATH" make proto && \ - git status --porcelain 2>&1 | (! read) || \ - (git status; git --no-pager diff; exit 1) -fi - -# TODO(menghanl): fix errors in transport_test. -staticcheck -ignore ' -google.golang.org/grpc/transport/transport_test.go:SA2002 -google.golang.org/grpc/benchmark/benchmain/main.go:SA1019 -google.golang.org/grpc/stats/stats_test.go:SA1019 -google.golang.org/grpc/test/end2end_test.go:SA1019 -google.golang.org/grpc/balancer_test.go:SA1019 -google.golang.org/grpc/balancer.go:SA1019 -google.golang.org/grpc/clientconn_test.go:SA1019 -' ./... -misspell -error .