Skip to content

Commit

Permalink
upgrade to latest dependencies (#739)
Browse files Browse the repository at this point in the history
bumping google.golang.org/genproto/googleapis/api d264139...ef581f9:
  > ef581f9 chore(all): update all (# 1132)
  > 5315273 chore(all): update all (# 1131)
  > a332354 chore(all): auto-regenerate .pb.go files (# 1130)
bumping knative.dev/pkg 339c22b...3f6a546:
  > 3f6a546 Fix rand source in name (# 3070)
  > ee1db86 Update linter config and address lint warnings/failures (# 3068)
  > 26bc7b4 Register AuthenticatableType in schema (# 3069)
  > 8535fcc gofumpt the repo (# 3067)
  > fc0720b [logstream] test polling should use a different context (# 3066)
  > 51dec91 drop test-infra code (# 3065)
  > b5bb12c drop unused OWNERS files and update script (# 3064)
  > 915c009 drop google/s2a-go (# 3062)
  > cd0e61e drop mako (# 3060)
  > fe2597a drop eventing kafka from downstream tests - repo is archived (# 3061)
  > b94232c Bump cloud.google.com/go/storage from 1.41.0 to 1.42.0 (# 3057)

Signed-off-by: Knative Automation <[email protected]>
  • Loading branch information
knative-automation authored Jun 27, 2024
1 parent 5bf0b86 commit 0377f8e
Show file tree
Hide file tree
Showing 42 changed files with 108 additions and 122 deletions.
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module knative.dev/reconciler-test

go 1.21
go 1.22

require (
github.com/cloudevents/conformance v0.2.0
Expand All @@ -22,7 +22,7 @@ require (
k8s.io/client-go v0.29.2
k8s.io/utils v0.0.0-20240102154912-e7106e64919e
knative.dev/hack v0.0.0-20240607132042-09143140a254
knative.dev/pkg v0.0.0-20240614135239-339c22b8218c
knative.dev/pkg v0.0.0-20240626134149-3f6a546ac3a4
sigs.k8s.io/yaml v1.4.0
)

Expand Down Expand Up @@ -74,7 +74,7 @@ require (
golang.org/x/tools v0.22.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/api v0.183.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240521202816-d264139d666e // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 // indirect
google.golang.org/grpc v1.64.0 // indirect
google.golang.org/protobuf v1.34.1 // indirect
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -640,8 +640,8 @@ google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7Fc
google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto/googleapis/api v0.0.0-20240521202816-d264139d666e h1:SkdGTrROJl2jRGT/Fxv5QUf9jtdKCQh4KQJXbXVLAi0=
google.golang.org/genproto/googleapis/api v0.0.0-20240521202816-d264139d666e/go.mod h1:LweJcLbyVij6rCex8YunD8DYR5VDonap/jYl3ZRxcIU=
google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117 h1:+rdxYoE3E5htTEWIe15GlN6IfvbURM//Jt0mmkmm6ZU=
google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117/go.mod h1:OimBR/bc1wPO9iV4NC2bpyjy3VnAwZh5EBPQdtaE5oo=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 h1:Zy9XzmMEflZ/MAaA7vNcoebnRAld7FsPW1EeBB7V0m8=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
Expand Down Expand Up @@ -725,8 +725,8 @@ k8s.io/utils v0.0.0-20240102154912-e7106e64919e h1:eQ/4ljkx21sObifjzXwlPKpdGLrCf
k8s.io/utils v0.0.0-20240102154912-e7106e64919e/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
knative.dev/hack v0.0.0-20240607132042-09143140a254 h1:1YFnu3U6dWZg0oxm6GU8kEdA9A+BvSWKJO7sg3N0kq8=
knative.dev/hack v0.0.0-20240607132042-09143140a254/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q=
knative.dev/pkg v0.0.0-20240614135239-339c22b8218c h1:OaKrY7L6rzWTvs51JlieJajL40F6CpBbvO1aZspg2EA=
knative.dev/pkg v0.0.0-20240614135239-339c22b8218c/go.mod h1:l7R8/SteYph0mZDsVgq3fVs4mWp1DaYx9BJJX68U6ik=
knative.dev/pkg v0.0.0-20240626134149-3f6a546ac3a4 h1:slPKf3UKdBFZlz+hFy+KXzTgY9yOePLzRuEhKzgc5a4=
knative.dev/pkg v0.0.0-20240626134149-3f6a546ac3a4/go.mod h1:Wikg4u73T6vk9TctrxZt60VXzqmGEQIx0iKfk1+9o4c=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
Expand Down
6 changes: 3 additions & 3 deletions vendor/knative.dev/pkg/apis/condition_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ limitations under the License.
package apis

import (
"errors"
"fmt"
"reflect"
"sort"
"time"

"fmt"

corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
Expand Down Expand Up @@ -234,7 +234,7 @@ func (r conditionsImpl) ClearCondition(t ConditionType) error {
}
// Terminal conditions are not handled as they can't be nil
if r.isTerminal(t) {
return fmt.Errorf("clearing terminal conditions not implemented")
return errors.New("clearing terminal conditions not implemented")
}
cond := r.GetCondition(t)
if cond == nil {
Expand Down
2 changes: 0 additions & 2 deletions vendor/knative.dev/pkg/apis/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ func ConvertToViaProxy(
ctx context.Context,
source, proxy, sink Convertible,
) error {

if err := source.ConvertTo(ctx, proxy); err != nil {
return err
}
Expand All @@ -38,7 +37,6 @@ func ConvertFromViaProxy(
ctx context.Context,
source, proxy, sink Convertible,
) error {

if err := proxy.ConvertFrom(ctx, source); err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion vendor/knative.dev/pkg/apis/deprecated.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func getPrefixedNamedFieldValues(prefix string, obj interface{}) (map[string]ref
return fields, inlined
}

for i := 0; i < objValue.NumField(); i++ {
for i := range objValue.NumField() {
tf := objValue.Type().Field(i)
if v := objValue.Field(i); v.IsValid() {
jTag := tf.Tag.Get("json")
Expand Down
6 changes: 2 additions & 4 deletions vendor/knative.dev/pkg/apis/duck/v1/addressable_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,8 @@ type Addressable struct {
Audience *string `json:"audience,omitempty"`
}

var (
// Addressable is a Convertible type.
_ apis.Convertible = (*Addressable)(nil)
)
// Addressable is a Convertible type.
var _ apis.Convertible = (*Addressable)(nil)

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

Expand Down
4 changes: 2 additions & 2 deletions vendor/knative.dev/pkg/apis/duck/v1/destination.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,11 @@ func (d *Destination) SetDefaults(ctx context.Context) {
}
}

func validateCACerts(CACert *string) *apis.FieldError {
func validateCACerts(caCert *string) *apis.FieldError {
// Check the object.
var errs *apis.FieldError

block, err := pem.Decode([]byte(*CACert))
block, err := pem.Decode([]byte(*caCert))
if err != nil && block == nil {
errs = errs.Also(apis.ErrInvalidValue("CA Cert provided is invalid", "caCert"))
return errs
Expand Down
1 change: 0 additions & 1 deletion vendor/knative.dev/pkg/apis/duck/v1/knative_reference.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ func (kr *KReference) Validate(ctx context.Context) *apis.FieldError {
Details: fmt.Sprintf("parent namespace: %q does not match ref: %q", parentNS, kr.Namespace),
})
}

}
}
return errs
Expand Down
2 changes: 1 addition & 1 deletion vendor/knative.dev/pkg/apis/duck/v1/kresource_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func (t *KResource) Populate() {
// Populate ALL fields
Type: "Birthday",
Status: corev1.ConditionTrue,
LastTransitionTime: apis.VolatileTime{Inner: metav1.NewTime(time.Date(1984, 02, 28, 18, 52, 00, 00, time.UTC))},
LastTransitionTime: apis.VolatileTime{Inner: metav1.NewTime(time.Date(1984, 2, 28, 18, 52, 0, 0, time.UTC))},
Reason: "Celebrate",
Message: "n3wScott, find your party hat :tada:",
}}
Expand Down
2 changes: 2 additions & 0 deletions vendor/knative.dev/pkg/apis/duck/v1/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ func addKnownTypes(scheme *runtime.Scheme) error {
(&KResource{}).GetListType(),
&AddressableType{},
(&AddressableType{}).GetListType(),
&AuthenticatableType{},
(&AuthenticatableType{}).GetListType(),
&Source{},
(&Source{}).GetListType(),
&WithPod{},
Expand Down
2 changes: 1 addition & 1 deletion vendor/knative.dev/pkg/apis/duck/v1/source_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ func (s *Source) Populate() {
// Populate ALL fields
Type: SourceConditionSinkProvided,
Status: corev1.ConditionTrue,
LastTransitionTime: apis.VolatileTime{Inner: metav1.NewTime(time.Date(1984, 02, 28, 18, 52, 00, 00, time.UTC))},
LastTransitionTime: apis.VolatileTime{Inner: metav1.NewTime(time.Date(1984, 2, 28, 18, 52, 0, 0, time.UTC))},
}}
s.Status.SinkURI = &apis.URL{
Scheme: "https",
Expand Down
1 change: 0 additions & 1 deletion vendor/knative.dev/pkg/apis/duck/v1/status_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ func (s *Status) ConvertTo(ctx context.Context, sink *Status, predicates ...func

conditions := make(apis.Conditions, 0, len(s.Conditions))
for _, c := range s.Conditions {

// Copy over the "happy" condition, which is the only condition that
// we can reliably transfer.
if c.Type == apis.ConditionReady || c.Type == apis.ConditionSucceeded {
Expand Down
6 changes: 4 additions & 2 deletions vendor/knative.dev/pkg/apis/duck/verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ import (
"knative.dev/pkg/kmp"
)

type Implementable = ducktypes.Implementable
type Populatable = ducktypes.Populatable
type (
Implementable = ducktypes.Implementable
Populatable = ducktypes.Populatable
)

// VerifyType verifies that a particular concrete resource properly implements
// the provided Implementable duck type. It is expected that under the resource
Expand Down
5 changes: 2 additions & 3 deletions vendor/knative.dev/pkg/apis/kind2resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ limitations under the License.
package apis

import (
"fmt"
"strings"

"k8s.io/apimachinery/pkg/runtime/schema"
Expand All @@ -41,7 +40,7 @@ func KindToResource(gvk schema.GroupVersionKind) schema.GroupVersionResource {
func pluralizeKind(kind string) string {
ret := strings.ToLower(kind)
if strings.HasSuffix(ret, "s") {
return fmt.Sprintf("%ses", ret)
return ret + "es"
}
return fmt.Sprintf("%ss", ret)
return ret + "s"
}
8 changes: 4 additions & 4 deletions vendor/knative.dev/pkg/codegen/cmd/injection-gen/args/args.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
package args

import (
"fmt"
"errors"

"github.com/spf13/pflag"
"k8s.io/gengo/args"
Expand Down Expand Up @@ -59,13 +59,13 @@ func Validate(genericArgs *args.GeneratorArgs) error {
customArgs := genericArgs.CustomArgs.(*CustomArgs)

if len(genericArgs.OutputPackagePath) == 0 {
return fmt.Errorf("output package cannot be empty")
return errors.New("output package cannot be empty")
}
if len(customArgs.VersionedClientSetPackage) == 0 {
return fmt.Errorf("versioned clientset package cannot be empty")
return errors.New("versioned clientset package cannot be empty")
}
if len(customArgs.ExternalVersionsInformersPackage) == 0 {
return fmt.Errorf("external versions informers package cannot be empty")
return errors.New("external versions informers package cannot be empty")
}

return nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat
klog.Fatalf("Wrong CustomArgs type: %T", arguments.CustomArgs)
}

versionPackagePath := filepath.Join(arguments.OutputPackagePath)
versionPackagePath := filepath.Clean(arguments.OutputPackagePath)

var packageList generator.Packages

Expand Down Expand Up @@ -389,8 +389,6 @@ func versionInformerPackages(basePackage string, groupPkgName string, gv clientg
vers := make([]generator.Package, 0, 2*len(typesToGenerate))

for _, t := range typesToGenerate {
// Fix for golang iterator bug.
t := t
packagePath := packagePath + "/" + strings.ToLower(t.Name.Name)
typedInformerPackage := typedInformerPackage(groupPkgName, gv, customArgs.ExternalVersionsInformersPackage)

Expand Down Expand Up @@ -501,7 +499,6 @@ func versionInformerPackages(basePackage string, groupPkgName string, gv clientg
return tags.NeedsInformerInjection()
},
})

}
return vers
}
Expand All @@ -513,8 +510,6 @@ func reconcilerPackages(basePackage string, groupPkgName string, gv clientgentyp
vers := make([]generator.Package, 0, 4*len(typesToGenerate))

for _, t := range typesToGenerate {
// Fix for golang iterator bug.
t := t
extracted := extractCommentTags(t)
reconcilerClasses, hasReconcilerClass := extractReconcilerClassesTag(extracted)
nonNamespaced := isNonNamespaced(extracted)
Expand Down Expand Up @@ -677,7 +672,6 @@ func versionDuckPackages(basePackage string, groupPkgName string, gv clientgenty

for _, t := range typesToGenerate {
// Fix for golang iterator bug.
t := t
packagePath := filepath.Join(packagePath, strings.ToLower(t.Name.Name))

// Impl
Expand Down
6 changes: 2 additions & 4 deletions vendor/knative.dev/pkg/configmap/example.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,8 @@ const (
ExampleChecksumAnnotation = "knative.dev/example-checksum"
)

var (
// Allows for normalizing by collapsing newlines.
sequentialNewlines = regexp.MustCompile("(?:\r?\n)+")
)
// Allows for normalizing by collapsing newlines.
var sequentialNewlines = regexp.MustCompile("(?:\r?\n)+")

// Checksum generates a checksum for the example value to be compared against
// a respective annotation.
Expand Down
8 changes: 4 additions & 4 deletions vendor/knative.dev/pkg/configmap/filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
package configmap

import (
"fmt"
"errors"
"reflect"

corev1 "k8s.io/api/core/v1"
Expand Down Expand Up @@ -58,17 +58,17 @@ func ValidateConstructor(constructor interface{}) error {
cType := reflect.TypeOf(constructor)

if cType.Kind() != reflect.Func {
return fmt.Errorf("config constructor must be a function")
return errors.New("config constructor must be a function")
}

if cType.NumIn() != 1 || cType.In(0) != reflect.TypeOf(&corev1.ConfigMap{}) {
return fmt.Errorf("config constructor must be of the type func(*k8s.io/api/core/v1/ConfigMap) (..., error)")
return errors.New("config constructor must be of the type func(*k8s.io/api/core/v1/ConfigMap) (..., error)")
}

errorType := reflect.TypeOf((*error)(nil)).Elem()

if cType.NumOut() != 2 || !cType.Out(1).Implements(errorType) {
return fmt.Errorf("config constructor must be of the type func(*k8s.io/api/core/v1/ConfigMap) (..., error)")
return errors.New("config constructor must be of the type func(*k8s.io/api/core/v1/ConfigMap) (..., error)")
}
return nil
}
4 changes: 2 additions & 2 deletions vendor/knative.dev/pkg/configmap/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ func NewUntypedStore(
name string,
logger Logger,
constructors Constructors,
onAfterStore ...func(name string, value interface{})) *UntypedStore {

onAfterStore ...func(name string, value interface{}),
) *UntypedStore {
store := &UntypedStore{
name: name,
logger: logger,
Expand Down
Loading

0 comments on commit 0377f8e

Please sign in to comment.