Bump github.com/jhump/protoreflect from 1.13.0 to 1.14.0 (#343)
* Bump github.com/jhump/protoreflect from 1.13.0 to 1.14.0 Bumps [github.com/jhump/protoreflect](https://github.com/jhump/protoreflect) from 1.13.0 to 1.14.0. - [Release notes](https://github.com/jhump/protoreflect/releases) - [Commits](https://github.com/jhump/protoreflect/compare/v1.13.0...v1.14.0) --- updated-dependencies: - dependency-name: github.com/jhump/protoreflect dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * fix ci * what can we even build on? * stop testing old things Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Scott Blum <dragonsinth@gmail.com>
This commit is contained in:
parent
81c624c41f
commit
dd2f60135c
|
|
@ -1,11 +1,5 @@
|
||||||
shared_configs:
|
shared_configs:
|
||||||
simple_job_steps: &simple_job_steps
|
simple_job_steps: &simple_job_steps
|
||||||
- checkout
|
|
||||||
- run:
|
|
||||||
name: Run tests
|
|
||||||
command: |
|
|
||||||
make deps test
|
|
||||||
full_job_steps: &full_job_steps
|
|
||||||
- checkout
|
- checkout
|
||||||
- run:
|
- run:
|
||||||
name: Run tests
|
name: Run tests
|
||||||
|
|
@ -15,18 +9,6 @@ shared_configs:
|
||||||
# Use the latest 2.1 version of CircleCI pipeline process engine. See: https://circleci.com/docs/2.0/configuration-reference
|
# Use the latest 2.1 version of CircleCI pipeline process engine. See: https://circleci.com/docs/2.0/configuration-reference
|
||||||
version: 2.1
|
version: 2.1
|
||||||
jobs:
|
jobs:
|
||||||
build-1-15:
|
|
||||||
working_directory: ~/repo
|
|
||||||
docker:
|
|
||||||
- image: cimg/go:1.15
|
|
||||||
steps: *simple_job_steps
|
|
||||||
|
|
||||||
build-1-16:
|
|
||||||
working_directory: ~/repo
|
|
||||||
docker:
|
|
||||||
- image: cimg/go:1.16
|
|
||||||
steps: *full_job_steps
|
|
||||||
|
|
||||||
build-1-17:
|
build-1-17:
|
||||||
working_directory: ~/repo
|
working_directory: ~/repo
|
||||||
docker:
|
docker:
|
||||||
|
|
@ -39,10 +21,15 @@ jobs:
|
||||||
- image: cimg/go:1.18
|
- image: cimg/go:1.18
|
||||||
steps: *simple_job_steps
|
steps: *simple_job_steps
|
||||||
|
|
||||||
|
build-1-19:
|
||||||
|
working_directory: ~/repo
|
||||||
|
docker:
|
||||||
|
- image: cimg/go:1.19
|
||||||
|
steps: *simple_job_steps
|
||||||
|
|
||||||
workflows:
|
workflows:
|
||||||
pr-build-test:
|
pr-build-test:
|
||||||
jobs:
|
jobs:
|
||||||
- build-1-15
|
|
||||||
- build-1-16
|
|
||||||
- build-1-17
|
- build-1-17
|
||||||
- build-1-18
|
- build-1-18
|
||||||
|
- build-1-19
|
||||||
|
|
|
||||||
14
Makefile
14
Makefile
|
|
@ -42,11 +42,9 @@ checkgofmt:
|
||||||
vet:
|
vet:
|
||||||
go vet ./...
|
go vet ./...
|
||||||
|
|
||||||
# This all works fine with Go modules, but without modules,
|
|
||||||
# CI is just getting latest master for dependencies like grpc.
|
|
||||||
.PHONY: staticcheck
|
.PHONY: staticcheck
|
||||||
staticcheck:
|
staticcheck:
|
||||||
@go install honnef.co/go/tools/cmd/staticcheck@v0.0.1-2020.1.4
|
@go install honnef.co/go/tools/cmd/staticcheck@v0.3.3
|
||||||
staticcheck ./...
|
staticcheck ./...
|
||||||
|
|
||||||
.PHONY: ineffassign
|
.PHONY: ineffassign
|
||||||
|
|
@ -56,21 +54,19 @@ ineffassign:
|
||||||
|
|
||||||
.PHONY: predeclared
|
.PHONY: predeclared
|
||||||
predeclared:
|
predeclared:
|
||||||
@go install github.com/nishanths/predeclared@86fad755b4d3
|
@go install github.com/nishanths/predeclared@5f2f810c9ae6
|
||||||
predeclared .
|
predeclared ./...
|
||||||
|
|
||||||
# Intentionally omitted from CI, but target here for ad-hoc reports.
|
# Intentionally omitted from CI, but target here for ad-hoc reports.
|
||||||
.PHONY: golint
|
.PHONY: golint
|
||||||
golint:
|
golint:
|
||||||
# TODO: pin version
|
@go install golang.org/x/lint/golint@v0.0.0-20210508222113-6edffad5e616
|
||||||
@go install golang.org/x/lint/golint@latest
|
|
||||||
golint -min_confidence 0.9 -set_exit_status ./...
|
golint -min_confidence 0.9 -set_exit_status ./...
|
||||||
|
|
||||||
# Intentionally omitted from CI, but target here for ad-hoc reports.
|
# Intentionally omitted from CI, but target here for ad-hoc reports.
|
||||||
.PHONY: errcheck
|
.PHONY: errcheck
|
||||||
errcheck:
|
errcheck:
|
||||||
# TODO: pin version
|
@go install github.com/kisielk/errcheck@v1.2.0
|
||||||
@go install github.com/kisielk/errcheck@latest
|
|
||||||
errcheck ./...
|
errcheck ./...
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build go1.10
|
||||||
// +build go1.10
|
// +build go1.10
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build !go1.10
|
||||||
// +build !go1.10
|
// +build !go1.10
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
|
||||||
|
|
@ -38,9 +38,9 @@ import (
|
||||||
// the response status codes emitted use an offest of 64
|
// the response status codes emitted use an offest of 64
|
||||||
const statusCodeOffset = 64
|
const statusCodeOffset = 64
|
||||||
|
|
||||||
const no_version = "dev build <no version set>"
|
const noVersion = "dev build <no version set>"
|
||||||
|
|
||||||
var version = no_version
|
var version = noVersion
|
||||||
|
|
||||||
var (
|
var (
|
||||||
exit = os.Exit
|
exit = os.Exit
|
||||||
|
|
@ -445,7 +445,7 @@ func main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
grpcurlUA := "grpcurl/" + version
|
grpcurlUA := "grpcurl/" + version
|
||||||
if version == no_version {
|
if version == noVersion {
|
||||||
grpcurlUA = "grpcurl/dev-build (no version set)"
|
grpcurlUA = "grpcurl/dev-build (no version set)"
|
||||||
}
|
}
|
||||||
if *userAgent != "" {
|
if *userAgent != "" {
|
||||||
|
|
@ -508,7 +508,7 @@ func main() {
|
||||||
md := grpcurl.MetadataFromHeaders(append(addlHeaders, reflHeaders...))
|
md := grpcurl.MetadataFromHeaders(append(addlHeaders, reflHeaders...))
|
||||||
refCtx := metadata.NewOutgoingContext(ctx, md)
|
refCtx := metadata.NewOutgoingContext(ctx, md)
|
||||||
cc = dial()
|
cc = dial()
|
||||||
refClient = grpcreflect.NewClient(refCtx, reflectpb.NewServerReflectionClient(cc))
|
refClient = grpcreflect.NewClientV1Alpha(refCtx, reflectpb.NewServerReflectionClient(cc))
|
||||||
reflSource := grpcurl.DescriptorSourceFromServer(ctx, refClient)
|
reflSource := grpcurl.DescriptorSourceFromServer(ctx, refClient)
|
||||||
if fileSource != nil {
|
if fileSource != nil {
|
||||||
descSource = compositeSource{reflSource, fileSource}
|
descSource = compositeSource{reflSource, fileSource}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || windows
|
||||||
// +build darwin dragonfly freebsd linux netbsd openbsd solaris windows
|
// +build darwin dragonfly freebsd linux netbsd openbsd solaris windows
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
|
||||||
10
format.go
10
format.go
|
|
@ -197,10 +197,20 @@ func (tf *textFormatter) format(m proto.Message) (string, error) {
|
||||||
return str, nil
|
return str, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Format of request data. The allowed values are 'json' or 'text'.
|
||||||
type Format string
|
type Format string
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
// FormatJSON specifies input data in JSON format. Multiple request values
|
||||||
|
// may be concatenated (messages with a JSON representation other than
|
||||||
|
// object must be separated by whitespace, such as a newline)
|
||||||
FormatJSON = Format("json")
|
FormatJSON = Format("json")
|
||||||
|
|
||||||
|
// FormatText specifies input data must be in the protobuf text format.
|
||||||
|
// Multiple request values must be separated by the "record separator"
|
||||||
|
// ASCII character: 0x1E. The stream should not end in a record separator.
|
||||||
|
// If it does, it will be interpreted as a final, blank message after the
|
||||||
|
// separator.
|
||||||
FormatText = Format("text")
|
FormatText = Format("text")
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
2
go.mod
2
go.mod
|
|
@ -6,7 +6,7 @@ require (
|
||||||
cloud.google.com/go v0.56.0 // indirect
|
cloud.google.com/go v0.56.0 // indirect
|
||||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||||
github.com/golang/protobuf v1.5.2
|
github.com/golang/protobuf v1.5.2
|
||||||
github.com/jhump/protoreflect v1.13.0
|
github.com/jhump/protoreflect v1.14.0
|
||||||
golang.org/x/text v0.3.7 // indirect
|
golang.org/x/text v0.3.7 // indirect
|
||||||
google.golang.org/grpc v1.50.1
|
google.golang.org/grpc v1.50.1
|
||||||
google.golang.org/protobuf v1.28.1
|
google.golang.org/protobuf v1.28.1
|
||||||
|
|
|
||||||
4
go.sum
4
go.sum
|
|
@ -111,8 +111,8 @@ github.com/jhump/gopoet v0.0.0-20190322174617-17282ff210b3/go.mod h1:me9yfT6IJSl
|
||||||
github.com/jhump/gopoet v0.1.0/go.mod h1:me9yfT6IJSlOL3FCfrg+L6yzUEZ+5jW6WHt4Sk+UPUI=
|
github.com/jhump/gopoet v0.1.0/go.mod h1:me9yfT6IJSlOL3FCfrg+L6yzUEZ+5jW6WHt4Sk+UPUI=
|
||||||
github.com/jhump/goprotoc v0.5.0/go.mod h1:VrbvcYrQOrTi3i0Vf+m+oqQWk9l72mjkJCYo7UvLHRQ=
|
github.com/jhump/goprotoc v0.5.0/go.mod h1:VrbvcYrQOrTi3i0Vf+m+oqQWk9l72mjkJCYo7UvLHRQ=
|
||||||
github.com/jhump/protoreflect v1.11.0/go.mod h1:U7aMIjN0NWq9swDP7xDdoMfRHb35uiuTd3Z9nFXJf5E=
|
github.com/jhump/protoreflect v1.11.0/go.mod h1:U7aMIjN0NWq9swDP7xDdoMfRHb35uiuTd3Z9nFXJf5E=
|
||||||
github.com/jhump/protoreflect v1.13.0 h1:zrrZqa7JAc2YGgPSzZZkmUXJ5G6NRPdxOg/9t7ISImA=
|
github.com/jhump/protoreflect v1.14.0 h1:MBbQK392K3u8NTLbKOCIi3XdI+y+c6yt5oMq0X3xviw=
|
||||||
github.com/jhump/protoreflect v1.13.0/go.mod h1:JytZfP5d0r8pVNLZvai7U/MCuTWITgrI4tTg7puQFKI=
|
github.com/jhump/protoreflect v1.14.0/go.mod h1:JytZfP5d0r8pVNLZvai7U/MCuTWITgrI4tTg7puQFKI=
|
||||||
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
|
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
|
||||||
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
|
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
|
||||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||||
|
|
|
||||||
|
|
@ -407,9 +407,9 @@ func makeTemplate(md *desc.MessageDescriptor, path []*desc.MessageDescriptor) pr
|
||||||
case "google.protobuf.Any":
|
case "google.protobuf.Any":
|
||||||
// empty type URL is not allowed by JSON representation
|
// empty type URL is not allowed by JSON representation
|
||||||
// so we must give it a dummy type
|
// so we must give it a dummy type
|
||||||
var any anypb.Any
|
var anyVal anypb.Any
|
||||||
_ = anypb.MarshalFrom(&any, &emptypb.Empty{}, protov2.MarshalOptions{})
|
_ = anypb.MarshalFrom(&anyVal, &emptypb.Empty{}, protov2.MarshalOptions{})
|
||||||
return &any
|
return &anyVal
|
||||||
case "google.protobuf.Value":
|
case "google.protobuf.Value":
|
||||||
// unset kind is not allowed by JSON representation
|
// unset kind is not allowed by JSON representation
|
||||||
// so we must give it something
|
// so we must give it something
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ func TestMain(m *testing.M) {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
defer ccReflect.Close()
|
defer ccReflect.Close()
|
||||||
refClient := grpcreflect.NewClient(context.Background(), reflectpb.NewServerReflectionClient(ccReflect))
|
refClient := grpcreflect.NewClientV1Alpha(context.Background(), reflectpb.NewServerReflectionClient(ccReflect))
|
||||||
defer refClient.Reset()
|
defer refClient.Reset()
|
||||||
|
|
||||||
sourceReflect = DescriptorSourceFromServer(context.Background(), refClient)
|
sourceReflect = DescriptorSourceFromServer(context.Background(), refClient)
|
||||||
|
|
@ -118,7 +118,7 @@ func TestMain(m *testing.M) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestServerDoesNotSupportReflection(t *testing.T) {
|
func TestServerDoesNotSupportReflection(t *testing.T) {
|
||||||
refClient := grpcreflect.NewClient(context.Background(), reflectpb.NewServerReflectionClient(ccNoReflect))
|
refClient := grpcreflect.NewClientV1Alpha(context.Background(), reflectpb.NewServerReflectionClient(ccNoReflect))
|
||||||
defer refClient.Reset()
|
defer refClient.Reset()
|
||||||
|
|
||||||
refSource := DescriptorSourceFromServer(context.Background(), refClient)
|
refSource := DescriptorSourceFromServer(context.Background(), refClient)
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
|
||||||
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
|
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
|
||||||
|
|
@ -170,8 +170,8 @@ func TestBrokenTLS_ServerPlainText(t *testing.T) {
|
||||||
|
|
||||||
e, err := createTestServerAndClient(nil, clientCreds)
|
e, err := createTestServerAndClient(nil, clientCreds)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
t.Fatal("expecting TLS failure setting up server and client")
|
|
||||||
e.Close()
|
e.Close()
|
||||||
|
t.Fatal("expecting TLS failure setting up server and client")
|
||||||
}
|
}
|
||||||
if !strings.Contains(err.Error(), "first record does not look like a TLS handshake") {
|
if !strings.Contains(err.Error(), "first record does not look like a TLS handshake") {
|
||||||
t.Fatalf("expecting TLS handshake failure, got: %v", err)
|
t.Fatalf("expecting TLS handshake failure, got: %v", err)
|
||||||
|
|
@ -190,8 +190,8 @@ func TestBrokenTLS_ServerUsesWrongCert(t *testing.T) {
|
||||||
|
|
||||||
e, err := createTestServerAndClient(serverCreds, clientCreds)
|
e, err := createTestServerAndClient(serverCreds, clientCreds)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
t.Fatal("expecting TLS failure setting up server and client")
|
|
||||||
e.Close()
|
e.Close()
|
||||||
|
t.Fatal("expecting TLS failure setting up server and client")
|
||||||
}
|
}
|
||||||
if !strings.Contains(err.Error(), "certificate is valid for") {
|
if !strings.Contains(err.Error(), "certificate is valid for") {
|
||||||
t.Fatalf("expecting TLS certificate error, got: %v", err)
|
t.Fatalf("expecting TLS certificate error, got: %v", err)
|
||||||
|
|
@ -210,8 +210,8 @@ func TestBrokenTLS_ClientHasExpiredCert(t *testing.T) {
|
||||||
|
|
||||||
e, err := createTestServerAndClient(serverCreds, clientCreds)
|
e, err := createTestServerAndClient(serverCreds, clientCreds)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
t.Fatal("expecting TLS failure setting up server and client")
|
|
||||||
e.Close()
|
e.Close()
|
||||||
|
t.Fatal("expecting TLS failure setting up server and client")
|
||||||
}
|
}
|
||||||
if !strings.Contains(err.Error(), "bad certificate") {
|
if !strings.Contains(err.Error(), "bad certificate") {
|
||||||
t.Fatalf("expecting TLS certificate error, got: %v", err)
|
t.Fatalf("expecting TLS certificate error, got: %v", err)
|
||||||
|
|
@ -230,8 +230,8 @@ func TestBrokenTLS_ServerHasExpiredCert(t *testing.T) {
|
||||||
|
|
||||||
e, err := createTestServerAndClient(serverCreds, clientCreds)
|
e, err := createTestServerAndClient(serverCreds, clientCreds)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
t.Fatal("expecting TLS failure setting up server and client")
|
|
||||||
e.Close()
|
e.Close()
|
||||||
|
t.Fatal("expecting TLS failure setting up server and client")
|
||||||
}
|
}
|
||||||
if !strings.Contains(err.Error(), "certificate has expired or is not yet valid") {
|
if !strings.Contains(err.Error(), "certificate has expired or is not yet valid") {
|
||||||
t.Fatalf("expecting TLS certificate expired, got: %v", err)
|
t.Fatalf("expecting TLS certificate expired, got: %v", err)
|
||||||
|
|
@ -250,8 +250,8 @@ func TestBrokenTLS_ClientNotTrusted(t *testing.T) {
|
||||||
|
|
||||||
e, err := createTestServerAndClient(serverCreds, clientCreds)
|
e, err := createTestServerAndClient(serverCreds, clientCreds)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
t.Fatal("expecting TLS failure setting up server and client")
|
|
||||||
e.Close()
|
e.Close()
|
||||||
|
t.Fatal("expecting TLS failure setting up server and client")
|
||||||
}
|
}
|
||||||
if !strings.Contains(err.Error(), "bad certificate") {
|
if !strings.Contains(err.Error(), "bad certificate") {
|
||||||
t.Fatalf("expecting TLS certificate error, got: %v", err)
|
t.Fatalf("expecting TLS certificate error, got: %v", err)
|
||||||
|
|
@ -270,10 +270,10 @@ func TestBrokenTLS_ServerNotTrusted(t *testing.T) {
|
||||||
|
|
||||||
e, err := createTestServerAndClient(serverCreds, clientCreds)
|
e, err := createTestServerAndClient(serverCreds, clientCreds)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
t.Fatal("expecting TLS failure setting up server and client")
|
|
||||||
e.Close()
|
e.Close()
|
||||||
|
t.Fatal("expecting TLS failure setting up server and client")
|
||||||
}
|
}
|
||||||
if !strings.Contains(err.Error(), "certificate signed by unknown authority") {
|
if !strings.Contains(err.Error(), "certificate") {
|
||||||
t.Fatalf("expecting TLS certificate error, got: %v", err)
|
t.Fatalf("expecting TLS certificate error, got: %v", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -290,8 +290,8 @@ func TestBrokenTLS_RequireClientCertButNonePresented(t *testing.T) {
|
||||||
|
|
||||||
e, err := createTestServerAndClient(serverCreds, clientCreds)
|
e, err := createTestServerAndClient(serverCreds, clientCreds)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
t.Fatal("expecting TLS failure setting up server and client")
|
|
||||||
e.Close()
|
e.Close()
|
||||||
|
t.Fatal("expecting TLS failure setting up server and client")
|
||||||
}
|
}
|
||||||
if !strings.Contains(err.Error(), "bad certificate") {
|
if !strings.Contains(err.Error(), "bad certificate") {
|
||||||
t.Fatalf("expecting TLS certificate error, got: %v", err)
|
t.Fatalf("expecting TLS certificate error, got: %v", err)
|
||||||
|
|
@ -349,7 +349,7 @@ type testEnv struct {
|
||||||
cc *grpc.ClientConn
|
cc *grpc.ClientConn
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e testEnv) Close() {
|
func (e *testEnv) Close() {
|
||||||
if e.cc != nil {
|
if e.cc != nil {
|
||||||
e.cc.Close()
|
e.cc.Close()
|
||||||
e.cc = nil
|
e.cc = nil
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue