Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump to go1.14.4 #1722

Merged
merged 2 commits into from
Jul 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .go-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.13.9
1.14.4
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
language: go

go:
- 1.13.9
- 1.14.4

cache:
directories:
Expand Down
10 changes: 6 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,13 @@ protoc_dir = $(build_dir)/protoc/$(protoc_version)
protoc_bin = $(protoc_dir)/bin/protoc

protoc_gen_go_version := $(shell grep github.com/golang/protobuf go.mod | awk '{print $$2}')
protoc_gen_go_dir := $(build_dir)/protoc-gen-go/$(protoc_gen_go_version)
protoc_gen_go_base_dir := $(build_dir)/protoc-gen-go
protoc_gen_go_dir := $(protoc_gen_go_base_dir)/$(protoc_gen_go_version)-go$(go_version)
protoc_gen_go_bin := $(protoc_gen_go_dir)/protoc-gen-go

mockgen_version := $(shell grep github.com/golang/mock go.mod | awk '{print $$2}')
mockgen_dir := $(build_dir)/mockgen/$(mockgen_version)
mockgen_base_dir := $(build_dir)/mockgen
mockgen_dir := $(mockgen_base_dir)/$(mockgen_version)-go$(go_version)
mockgen_bin := $(mockgen_dir)/mockgen

# There may be more than one tag. Only use one that starts with 'v' followed by
Expand Down Expand Up @@ -513,14 +515,14 @@ install-protoc-gen-go: $(protoc_gen_go_bin)

$(protoc_gen_go_bin): | go-check
@echo "Installing protoc-gen-go $(protoc_gen_go_version)..."
$(E)rm -rf $(dir $(protoc_gen_go_dir))
$(E)rm -rf $(protoc_gen_go_base_dir)
$(E)mkdir -p $(protoc_gen_go_dir)
$(E)$(go) build -o $(protoc_gen_go_bin) github.com/golang/protobuf/protoc-gen-go

install-mockgen: $(mockgen_bin)

$(mockgen_bin): | go-check
@echo "Installing mockgen $(mockgen_version)..."
$(E)rm -rf $(dir $(mockgen_dir))
$(E)rm -rf $(mockgen_base_dir)
$(E)mkdir -p $(mockgen_dir)
$(E)$(go) build -o $(mockgen_bin) github.com/golang/mock/mockgen
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/spiffe/spire

go 1.13
go 1.14

replace github.com/spiffe/spire/proto/spire => ./proto/spire

Expand Down
8 changes: 4 additions & 4 deletions pkg/server/api/agent/v1/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -435,13 +435,13 @@ func TestBanAgent(t *testing.T) {
Path: agentPath,
TrustDomain: "ex ample.org",
},
expectedErr: status.Error(codes.InvalidArgument, "invalid SPIFFE ID: spiffeid: unable to parse: parse spiffe://ex ample.org: invalid character \" \" in host name"),
expectedErr: status.Error(codes.InvalidArgument, `invalid SPIFFE ID: spiffeid: unable to parse: parse "spiffe://ex ample.org": invalid character " " in host name`),
expectedLogMsgs: []spiretest.LogEntry{
{
Level: logrus.ErrorLevel,
Message: "Invalid request: invalid SPIFFE ID",
Data: logrus.Fields{
logrus.ErrorKey: "spiffeid: unable to parse: parse spiffe://ex ample.org: invalid character \" \" in host name",
logrus.ErrorKey: `spiffeid: unable to parse: parse "spiffe://ex ample.org": invalid character " " in host name`,
},
},
},
Expand Down Expand Up @@ -833,11 +833,11 @@ func TestGetAgent(t *testing.T) {
Level: logrus.ErrorLevel,
Message: "Failed to parse agent ID",
Data: logrus.Fields{
logrus.ErrorKey: "spiffeid: unable to parse: parse spiffe://invalid domain: invalid character \" \" in host name",
logrus.ErrorKey: `spiffeid: unable to parse: parse "spiffe://invalid domain": invalid character " " in host name`,
},
},
},
err: `spiffeid: unable to parse: parse spiffe://invalid domain: invalid character " " in host name`,
err: `spiffeid: unable to parse: parse "spiffe://invalid domain": invalid character " " in host name`,
code: codes.InvalidArgument,
},
{
Expand Down
20 changes: 10 additions & 10 deletions pkg/server/api/bundle/v1/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,14 @@ func TestGetFederatedBundle(t *testing.T) {
name: "Trust domain is not a valid trust domain",
isAdmin: true,
trustDomain: "malformed id",
err: `rpc error: code = InvalidArgument desc = trust domain argument is not valid: spiffeid: unable to parse: parse spiffe://malformed id: invalid character " " in host name`,
err: `rpc error: code = InvalidArgument desc = trust domain argument is not valid: spiffeid: unable to parse: parse "spiffe://malformed id": invalid character " " in host name`,
expectLogs: []spiretest.LogEntry{
{
Level: logrus.ErrorLevel,
Message: "Invalid request: trust domain argument is not valid",
Data: logrus.Fields{
telemetry.TrustDomainID: "malformed id",
logrus.ErrorKey: `spiffeid: unable to parse: parse spiffe://malformed id: invalid character " " in host name`,
logrus.ErrorKey: `spiffeid: unable to parse: parse "spiffe://malformed id": invalid character " " in host name`,
},
},
},
Expand Down Expand Up @@ -410,14 +410,14 @@ func TestAppendBundle(t *testing.T) {
TrustDomain: "malformed id",
},
code: codes.InvalidArgument,
err: `trust domain argument is not valid: spiffeid: unable to parse: parse spiffe://malformed id: invalid character " " in host name`,
err: `trust domain argument is not valid: spiffeid: unable to parse: parse "spiffe://malformed id": invalid character " " in host name`,
expectLogs: []spiretest.LogEntry{
{
Level: logrus.ErrorLevel,
Message: "Invalid request: trust domain argument is not valid",
Data: logrus.Fields{
telemetry.TrustDomainID: "malformed id",
logrus.ErrorKey: `spiffeid: unable to parse: parse spiffe://malformed id: invalid character " " in host name`,
logrus.ErrorKey: `spiffeid: unable to parse: parse "spiffe://malformed id": invalid character " " in host name`,
},
},
},
Expand Down Expand Up @@ -637,7 +637,7 @@ func TestBatchDeleteFederatedBundle(t *testing.T) {
Level: logrus.ErrorLevel,
Message: "Invalid request: trust domain argument is not valid",
Data: logrus.Fields{
logrus.ErrorKey: `spiffeid: unable to parse: parse spiffe://malformed TD: invalid character " " in host name`,
logrus.ErrorKey: `spiffeid: unable to parse: parse "spiffe://malformed TD": invalid character " " in host name`,
telemetry.TrustDomainID: "malformed TD",
},
},
Expand All @@ -646,7 +646,7 @@ func TestBatchDeleteFederatedBundle(t *testing.T) {
{
Status: &types.Status{
Code: int32(codes.InvalidArgument),
Message: `trust domain argument is not valid: spiffeid: unable to parse: parse spiffe://malformed TD: invalid character " " in host name`,
Message: `trust domain argument is not valid: spiffeid: unable to parse: parse "spiffe://malformed TD": invalid character " " in host name`,
},
TrustDomain: "malformed TD",
},
Expand Down Expand Up @@ -1143,15 +1143,15 @@ func TestBatchCreateFederatedBundle(t *testing.T) {
}(),
},
expectedResults: []*bundlepb.BatchCreateFederatedBundleResponse_Result{
{Status: api.CreateStatus(codes.InvalidArgument, `trust domain argument is not valid: spiffeid: unable to parse: parse spiffe://malformed id: invalid character " " in host name`)},
{Status: api.CreateStatus(codes.InvalidArgument, `trust domain argument is not valid: spiffeid: unable to parse: parse "spiffe://malformed id": invalid character " " in host name`)},
},
expectedLogMsgs: []spiretest.LogEntry{
{
Level: logrus.ErrorLevel,
Message: `Invalid request: trust domain argument is not valid`,
Data: logrus.Fields{
telemetry.TrustDomainID: "malformed id",
logrus.ErrorKey: `spiffeid: unable to parse: parse spiffe://malformed id: invalid character " " in host name`,
logrus.ErrorKey: `spiffeid: unable to parse: parse "spiffe://malformed id": invalid character " " in host name`,
},
},
},
Expand Down Expand Up @@ -1376,15 +1376,15 @@ func TestBatchUpdateFederatedBundle(t *testing.T) {
}(),
},
expectedResults: []*bundlepb.BatchCreateFederatedBundleResponse_Result{
{Status: api.CreateStatus(codes.InvalidArgument, `trust domain argument is not valid: spiffeid: unable to parse: parse spiffe://malformed id: invalid character " " in host name`)},
{Status: api.CreateStatus(codes.InvalidArgument, `trust domain argument is not valid: spiffeid: unable to parse: parse "spiffe://malformed id": invalid character " " in host name`)},
},
expectedLogMsgs: []spiretest.LogEntry{
{
Level: logrus.ErrorLevel,
Message: `Invalid request: trust domain argument is not valid`,
Data: logrus.Fields{
telemetry.TrustDomainID: "malformed id",
logrus.ErrorKey: `spiffeid: unable to parse: parse spiffe://malformed id: invalid character " " in host name`,
logrus.ErrorKey: `spiffeid: unable to parse: parse "spiffe://malformed id": invalid character " " in host name`,
},
},
},
Expand Down
8 changes: 4 additions & 4 deletions pkg/server/api/bundle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ func TestBundleToProto(t *testing.T) {
}, {
name: "invalid trust domain",
bundle: &common.Bundle{
TrustDomainId: "invaid TD",
TrustDomainId: "invalid TD",
},
expectError: `spiffeid: unable to parse: parse spiffe://invaid TD: invalid character " " in host name`,
expectError: `spiffeid: unable to parse: parse "spiffe://invalid TD": invalid character " " in host name`,
},
} {
tt := tt
Expand Down Expand Up @@ -179,9 +179,9 @@ func TestProtoToBundle(t *testing.T) {
{
name: "invalid trust domain",
bundle: &types.Bundle{
TrustDomain: "invaid TD",
TrustDomain: "invalid TD",
},
expectError: `spiffeid: unable to parse: parse spiffe://invaid TD: invalid character " " in host name`,
expectError: `spiffeid: unable to parse: parse "spiffe://invalid TD": invalid character " " in host name`,
},
} {
tt := tt
Expand Down
2 changes: 1 addition & 1 deletion pkg/server/api/entry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ func TestProtoToRegistrationEntry(t *testing.T) {
},
{
name: "malformed federated trust domain",
err: "invalid federated trust domain: spiffeid: unable to parse: parse spiffe://malformed td:",
err: `invalid federated trust domain: spiffeid: unable to parse: parse "spiffe://malformed td":`,
entry: &types.Entry{
SpiffeId: &types.SPIFFEID{TrustDomain: "example.org", Path: "/foo"},
ParentId: &types.SPIFFEID{TrustDomain: "example.org", Path: "/bar"},
Expand Down
18 changes: 12 additions & 6 deletions proto/spire-next/api/server/bundle/v1/bundle.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion proto/spire-next/types/attestation.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.