upgrade to latest dependencies (#530)

bumping knative.dev/pkg d569db3...d4505c6:
  > d4505c6 Source validation fixes (# 2251)
  > fb7ee28 when testing downstream use the correct release branch (# 2265)
  > bfab3c8 Add back inadvertedly deleted call to ObserveKind (# 2282)

Signed-off-by: Knative Automation <automation@knative.team>
This commit is contained in:
knative-automation 2021-09-10 02:36:32 -04:00 committed by GitHub
parent 33ee55cdfd
commit a51cf6760e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 60 additions and 5 deletions

2
go.mod
View File

@ -21,5 +21,5 @@ require (
k8s.io/code-generator v0.21.4
k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7
knative.dev/hack v0.0.0-20210806075220-815cd312d65c
knative.dev/pkg v0.0.0-20210909102158-d569db39a812
knative.dev/pkg v0.0.0-20210909165259-d4505c660535
)

4
go.sum
View File

@ -978,8 +978,8 @@ k8s.io/utils v0.0.0-20201110183641-67b214c5f920 h1:CbnUZsM497iRC5QMVkHwyl8s2tB3g
k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
knative.dev/hack v0.0.0-20210806075220-815cd312d65c h1:nOXoDWAAItwr4o0dp3nHr6skgpVD4IvME/UX84YNl5k=
knative.dev/hack v0.0.0-20210806075220-815cd312d65c/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
knative.dev/pkg v0.0.0-20210909102158-d569db39a812 h1:8EQzOnAxqP1inXNlfeFrjcRUbuwZ7HldgJLqNQnuOxY=
knative.dev/pkg v0.0.0-20210909102158-d569db39a812/go.mod h1:jMSqkNMsrzuy+XR4Yr/BMy7SDVbUOl3KKB6+5MR+ZU8=
knative.dev/pkg v0.0.0-20210909165259-d4505c660535 h1:1bbKs8NGGodV0LjOyn6s5lo+oAJ/9KtTURUZtpRxr60=
knative.dev/pkg v0.0.0-20210909165259-d4505c660535/go.mod h1:jMSqkNMsrzuy+XR4Yr/BMy7SDVbUOl3KKB6+5MR+ZU8=
pgregory.net/rapid v0.3.3/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU=
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=

View File

@ -251,6 +251,10 @@ func (r *reconcilerImpl) Reconcile(ctx context.Context, key string) error {
return fmt.Errorf("failed to clear finalizers: %w", err)
}
case reconciler.DoObserveKind:
// Observe any changes to this resource, since we are not the leader.
reconcileEvent = do(ctx, resource)
}
// Synchronize the status.

View File

@ -302,7 +302,11 @@ is used with duck types:
                ...
        }
logger := c.Logger.Named("Revisions")
        impl := controller.NewImpl(c, logger, "Revisions")
        impl := controller.NewContext(
ctx,
c,
controller.ControllerOptions{WorkQueueName: "Revisions", Logger: logger},
)
// Calls to Track create a 30 minute lease before they must be renewed.
// Coordinate this value with controller resync periods.

View File

@ -17,6 +17,7 @@ limitations under the License.
package v1
import (
"context"
"time"
corev1 "k8s.io/api/core/v1"
@ -170,3 +171,45 @@ type SourceList struct {
Items []Source `json:"items"`
}
func (s *Source) Validate(ctx context.Context) *apis.FieldError {
if s == nil {
return nil
}
return s.Spec.Validate(ctx).ViaField("spec")
}
func (s *SourceSpec) Validate(ctx context.Context) *apis.FieldError {
return s.CloudEventOverrides.Validate(ctx).ViaField("ceOverrides")
}
func (ceOverrides *CloudEventOverrides) Validate(ctx context.Context) *apis.FieldError {
for key := range ceOverrides.Extensions {
if err := validateExtensionName(key); err != nil {
return err.ViaField("extensions")
}
}
return nil
}
func validateExtensionName(key string) *apis.FieldError {
if key == "" {
return apis.ErrInvalidKeyName(
key,
"",
"keys MUST NOT be empty",
)
}
for _, c := range key {
if !((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9')) {
return apis.ErrInvalidKeyName(
key,
"",
"keys are expected to be alphanumeric",
)
}
}
return nil
}

View File

@ -465,6 +465,10 @@ func (r *reconcilerImpl) Reconcile(ctx {{.contextContext|raw}}, key string) erro
return {{.fmtErrorf|raw}}("failed to clear finalizers: %w", err)
}
case {{.doObserveKind|raw}}:
// Observe any changes to this resource, since we are not the leader.
reconcileEvent = do(ctx, resource)
}
{{if .hasStatus}}

2
vendor/modules.txt vendored
View File

@ -612,7 +612,7 @@ k8s.io/utils/trace
# knative.dev/hack v0.0.0-20210806075220-815cd312d65c
## explicit
knative.dev/hack
# knative.dev/pkg v0.0.0-20210909102158-d569db39a812
# knative.dev/pkg v0.0.0-20210909165259-d4505c660535
## explicit
knative.dev/pkg/apis
knative.dev/pkg/apis/duck