Skip to content

Commit

Permalink
Bump github.com/jhump/protoreflect from 1.13.0 to 1.14.0 (#343)
Browse files Browse the repository at this point in the history
* 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](jhump/protoreflect@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>
  • Loading branch information
dependabot[bot] and dragonsinth authored Nov 1, 2022
1 parent 81c624c commit dd2f601
Show file tree
Hide file tree
Showing 13 changed files with 47 additions and 50 deletions.
27 changes: 7 additions & 20 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
shared_configs:
simple_job_steps: &simple_job_steps
- checkout
- run:
name: Run tests
command: |
make deps test
full_job_steps: &full_job_steps
- checkout
- run:
name: Run tests
Expand All @@ -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
version: 2.1
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:
working_directory: ~/repo
docker:
Expand All @@ -39,10 +21,15 @@ jobs:
- image: cimg/go:1.18
steps: *simple_job_steps

build-1-19:
working_directory: ~/repo
docker:
- image: cimg/go:1.19
steps: *simple_job_steps

workflows:
pr-build-test:
jobs:
- build-1-15
- build-1-16
- build-1-17
- build-1-18
- build-1-19
14 changes: 5 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,9 @@ checkgofmt:
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
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 ./...

.PHONY: ineffassign
Expand All @@ -56,21 +54,19 @@ ineffassign:

.PHONY: predeclared
predeclared:
@go install github.com/nishanths/predeclared@86fad755b4d3
predeclared .
@go install github.com/nishanths/predeclared@5f2f810c9ae6
predeclared ./...

# Intentionally omitted from CI, but target here for ad-hoc reports.
.PHONY: golint
golint:
# TODO: pin version
@go install golang.org/x/lint/golint@latest
@go install golang.org/x/lint/golint@v0.0.0-20210508222113-6edffad5e616
golint -min_confidence 0.9 -set_exit_status ./...

# Intentionally omitted from CI, but target here for ad-hoc reports.
.PHONY: errcheck
errcheck:
# TODO: pin version
@go install github.com/kisielk/errcheck@latest
@go install github.com/kisielk/errcheck@v1.2.0
errcheck ./...

.PHONY: test
Expand Down
1 change: 1 addition & 0 deletions cmd/grpcurl/go1_10.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build go1.10
// +build go1.10

package main
Expand Down
1 change: 1 addition & 0 deletions cmd/grpcurl/go1_9.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !go1.10
// +build !go1.10

package main
Expand Down
8 changes: 4 additions & 4 deletions cmd/grpcurl/grpcurl.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ import (
// the response status codes emitted use an offest of 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 (
exit = os.Exit
Expand Down Expand Up @@ -445,7 +445,7 @@ func main() {
}

grpcurlUA := "grpcurl/" + version
if version == no_version {
if version == noVersion {
grpcurlUA = "grpcurl/dev-build (no version set)"
}
if *userAgent != "" {
Expand Down Expand Up @@ -508,7 +508,7 @@ func main() {
md := grpcurl.MetadataFromHeaders(append(addlHeaders, reflHeaders...))
refCtx := metadata.NewOutgoingContext(ctx, md)
cc = dial()
refClient = grpcreflect.NewClient(refCtx, reflectpb.NewServerReflectionClient(cc))
refClient = grpcreflect.NewClientV1Alpha(refCtx, reflectpb.NewServerReflectionClient(cc))
reflSource := grpcurl.DescriptorSourceFromServer(ctx, refClient)
if fileSource != nil {
descSource = compositeSource{reflSource, fileSource}
Expand Down
1 change: 1 addition & 0 deletions cmd/grpcurl/unix.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || windows
// +build darwin dragonfly freebsd linux netbsd openbsd solaris windows

package main
Expand Down
10 changes: 10 additions & 0 deletions format.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,20 @@ func (tf *textFormatter) format(m proto.Message) (string, error) {
return str, nil
}

// Format of request data. The allowed values are 'json' or 'text'.
type Format string

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")

// 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")
)

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
cloud.google.com/go v0.56.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
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
google.golang.org/grpc v1.50.1
google.golang.org/protobuf v1.28.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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/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.13.0 h1:zrrZqa7JAc2YGgPSzZZkmUXJ5G6NRPdxOg/9t7ISImA=
github.com/jhump/protoreflect v1.13.0/go.mod h1:JytZfP5d0r8pVNLZvai7U/MCuTWITgrI4tTg7puQFKI=
github.com/jhump/protoreflect v1.14.0 h1:MBbQK392K3u8NTLbKOCIi3XdI+y+c6yt5oMq0X3xviw=
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.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
Expand Down
6 changes: 3 additions & 3 deletions grpcurl.go
Original file line number Diff line number Diff line change
Expand Up @@ -407,9 +407,9 @@ func makeTemplate(md *desc.MessageDescriptor, path []*desc.MessageDescriptor) pr
case "google.protobuf.Any":
// empty type URL is not allowed by JSON representation
// so we must give it a dummy type
var any anypb.Any
_ = anypb.MarshalFrom(&any, &emptypb.Empty{}, protov2.MarshalOptions{})
return &any
var anyVal anypb.Any
_ = anypb.MarshalFrom(&anyVal, &emptypb.Empty{}, protov2.MarshalOptions{})
return &anyVal
case "google.protobuf.Value":
// unset kind is not allowed by JSON representation
// so we must give it something
Expand Down
4 changes: 2 additions & 2 deletions grpcurl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func TestMain(m *testing.M) {
panic(err)
}
defer ccReflect.Close()
refClient := grpcreflect.NewClient(context.Background(), reflectpb.NewServerReflectionClient(ccReflect))
refClient := grpcreflect.NewClientV1Alpha(context.Background(), reflectpb.NewServerReflectionClient(ccReflect))
defer refClient.Reset()

sourceReflect = DescriptorSourceFromServer(context.Background(), refClient)
Expand Down Expand Up @@ -118,7 +118,7 @@ func TestMain(m *testing.M) {
}

func TestServerDoesNotSupportReflection(t *testing.T) {
refClient := grpcreflect.NewClient(context.Background(), reflectpb.NewServerReflectionClient(ccNoReflect))
refClient := grpcreflect.NewClientV1Alpha(context.Background(), reflectpb.NewServerReflectionClient(ccNoReflect))
defer refClient.Reset()

refSource := DescriptorSourceFromServer(context.Background(), refClient)
Expand Down
1 change: 1 addition & 0 deletions internal/testing/cmd/testserver/unix.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
// +build darwin dragonfly freebsd linux netbsd openbsd solaris

package main
Expand Down
18 changes: 9 additions & 9 deletions tls_settings_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ func TestBrokenTLS_ServerPlainText(t *testing.T) {

e, err := createTestServerAndClient(nil, clientCreds)
if err == nil {
t.Fatal("expecting TLS failure setting up server and client")
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") {
t.Fatalf("expecting TLS handshake failure, got: %v", err)
Expand All @@ -190,8 +190,8 @@ func TestBrokenTLS_ServerUsesWrongCert(t *testing.T) {

e, err := createTestServerAndClient(serverCreds, clientCreds)
if err == nil {
t.Fatal("expecting TLS failure setting up server and client")
e.Close()
t.Fatal("expecting TLS failure setting up server and client")
}
if !strings.Contains(err.Error(), "certificate is valid for") {
t.Fatalf("expecting TLS certificate error, got: %v", err)
Expand All @@ -210,8 +210,8 @@ func TestBrokenTLS_ClientHasExpiredCert(t *testing.T) {

e, err := createTestServerAndClient(serverCreds, clientCreds)
if err == nil {
t.Fatal("expecting TLS failure setting up server and client")
e.Close()
t.Fatal("expecting TLS failure setting up server and client")
}
if !strings.Contains(err.Error(), "bad certificate") {
t.Fatalf("expecting TLS certificate error, got: %v", err)
Expand All @@ -230,8 +230,8 @@ func TestBrokenTLS_ServerHasExpiredCert(t *testing.T) {

e, err := createTestServerAndClient(serverCreds, clientCreds)
if err == nil {
t.Fatal("expecting TLS failure setting up server and client")
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") {
t.Fatalf("expecting TLS certificate expired, got: %v", err)
Expand All @@ -250,8 +250,8 @@ func TestBrokenTLS_ClientNotTrusted(t *testing.T) {

e, err := createTestServerAndClient(serverCreds, clientCreds)
if err == nil {
t.Fatal("expecting TLS failure setting up server and client")
e.Close()
t.Fatal("expecting TLS failure setting up server and client")
}
if !strings.Contains(err.Error(), "bad certificate") {
t.Fatalf("expecting TLS certificate error, got: %v", err)
Expand All @@ -270,10 +270,10 @@ func TestBrokenTLS_ServerNotTrusted(t *testing.T) {

e, err := createTestServerAndClient(serverCreds, clientCreds)
if err == nil {
t.Fatal("expecting TLS failure setting up server and client")
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)
}
}
Expand All @@ -290,8 +290,8 @@ func TestBrokenTLS_RequireClientCertButNonePresented(t *testing.T) {

e, err := createTestServerAndClient(serverCreds, clientCreds)
if err == nil {
t.Fatal("expecting TLS failure setting up server and client")
e.Close()
t.Fatal("expecting TLS failure setting up server and client")
}
if !strings.Contains(err.Error(), "bad certificate") {
t.Fatalf("expecting TLS certificate error, got: %v", err)
Expand Down Expand Up @@ -349,7 +349,7 @@ type testEnv struct {
cc *grpc.ClientConn
}

func (e testEnv) Close() {
func (e *testEnv) Close() {
if e.cc != nil {
e.cc.Close()
e.cc = nil
Expand Down

0 comments on commit dd2f601

Please sign in to comment.