Skip to content

Commit

Permalink
project rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
odra committed Aug 2, 2019
1 parent b2383f0 commit 0a18252
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ require (
github.com/mitchellh/go-homedir v1.1.0
github.com/modern-go/reflect2 v1.0.1 // indirect
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
github.com/pkg/errors v0.8.1 // indirect
github.com/pkg/errors v0.8.1
github.com/spf13/cobra v0.0.3
github.com/spf13/pflag v1.0.3
github.com/spf13/viper v1.3.1
Expand Down
2 changes: 1 addition & 1 deletion pkg/errors/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (

func isCRDError(status api_errors.APIStatus) bool {
for _, cause := range status.Status().Details.Causes {
if strings.HasPrefix(cause.Message, "404") && cause.Type == v1.CauseTypeUnexpectedServerResponse {
if strings.HasPrefix(cause.Message, "404") && cause.Type == v1.CauseTypeUnexpectedServerResponse {
return true
}
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/errors/factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ func TestBuild(t *testing.T) {
assert.Error(t, err, "my-custom-error")

gv := schema.GroupResource{
Group: "serving.knative.dev",
Group: "serving.knative.dev",
Resource: "service",
}

//api error containing expected error when knative crd is not available
apiError := api_errors.NewNotFound(gv, "serv")
apiError.Status().Details.Causes = []v1.StatusCause{
{
Type: "UnexpectedServerResponse",
Type: "UnexpectedServerResponse",
Message: "404 page not found",
},
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/errors/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ import api_errors "k8s.io/apimachinery/pkg/api/errors"

type KNError struct {
Status api_errors.APIStatus
msg string
}
msg string
}
1 change: 0 additions & 1 deletion pkg/serving/v1alpha1/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,4 +319,3 @@ func serviceConditionExtractor(obj runtime.Object) (apis.Conditions, error) {
}
return apis.Conditions(service.Status.Conditions), nil
}

14 changes: 7 additions & 7 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -205,25 +205,26 @@ k8s.io/api/storage/v1
k8s.io/api/storage/v1alpha1
k8s.io/api/storage/v1beta1
# k8s.io/apimachinery v0.0.0-20190221084156-01f179d85dbc
k8s.io/apimachinery/pkg/api/errors
k8s.io/apimachinery/pkg/apis/meta/v1
k8s.io/apimachinery/pkg/util/duration
k8s.io/apimachinery/pkg/apis/meta/v1beta1
k8s.io/apimachinery/pkg/runtime
k8s.io/apimachinery/pkg/api/errors
k8s.io/apimachinery/pkg/api/resource
k8s.io/apimachinery/pkg/api/meta
k8s.io/apimachinery/pkg/util/runtime
k8s.io/apimachinery/pkg/runtime/schema
k8s.io/apimachinery/pkg/fields
k8s.io/apimachinery/pkg/labels
k8s.io/apimachinery/pkg/watch
k8s.io/apimachinery/pkg/api/equality
k8s.io/apimachinery/pkg/api/validation
k8s.io/apimachinery/pkg/runtime/serializer
k8s.io/apimachinery/pkg/types
k8s.io/apimachinery/pkg/util/validation/field
k8s.io/apimachinery/pkg/conversion
k8s.io/apimachinery/pkg/selection
k8s.io/apimachinery/pkg/types
k8s.io/apimachinery/pkg/util/intstr
k8s.io/apimachinery/pkg/api/equality
k8s.io/apimachinery/pkg/api/validation
k8s.io/apimachinery/pkg/runtime/serializer
k8s.io/apimachinery/pkg/util/json
k8s.io/apimachinery/pkg/util/strategicpatch
k8s.io/apimachinery/pkg/util/errors
Expand All @@ -232,16 +233,15 @@ k8s.io/apimachinery/pkg/util/sets
k8s.io/apimachinery/pkg/apis/meta/v1/unstructured
k8s.io/apimachinery/pkg/conversion/queryparams
k8s.io/apimachinery/pkg/util/naming
k8s.io/apimachinery/pkg/util/validation/field
k8s.io/apimachinery/pkg/util/net
k8s.io/apimachinery/pkg/util/yaml
k8s.io/apimachinery/third_party/forked/golang/reflect
k8s.io/apimachinery/pkg/apis/meta/v1/validation
k8s.io/apimachinery/pkg/runtime/serializer/json
k8s.io/apimachinery/pkg/runtime/serializer/protobuf
k8s.io/apimachinery/pkg/runtime/serializer/recognizer
k8s.io/apimachinery/pkg/runtime/serializer/versioning
k8s.io/apimachinery/pkg/runtime/serializer/streaming
k8s.io/apimachinery/third_party/forked/golang/reflect
k8s.io/apimachinery/pkg/util/mergepatch
k8s.io/apimachinery/third_party/forked/golang/json
k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructuredscheme
Expand Down

0 comments on commit 0a18252

Please sign in to comment.