Skip to content

Commit

Permalink
upgrade to latest dependencies
Browse files Browse the repository at this point in the history
bumping knative.dev/pkg 6040b3a...0d31134:
  > 0d31134 Fix nil pointer panic in kvstore (# 2002)
bumping knative.dev/serving e61294b...fbbbb98:
  > fbbbb98 Make route stop using the `DeprecatedServiceName` field (# 10638)
  > bf35e3f 💄 updating the HPAs to v2beta2 API usage (# 10631)
  > 51a9c0b Update net-certmanager nightly (# 10636)
  > e5c5c08 Export MESH env value in test script (# 10635)
  > 4a3274c Remove unused constants, make some other small tidy-ups (# 10637)
  > b083383 fix the broken doc's link (# 10634)
  > aac0df2 Deprecate the service name on the revision. (# 10633)
  > 0aa3d0b Remove the propagation from SKS->PA->Rev.Status of the K8s service (# 10632)
  > db90f4f Update net-contour nightly (# 10597)
  > 981c601 Update net-istio nightly (# 10619)
  > 8922f35 Update net-kourier nightly (# 10599)
  > df11c15 chore: Set background to white for autoscaling diagrams ... (# 10629)
  > f637b5a Remove naked returns (# 10618)
  > 6cde241 Improve rollout test to check duration (# 10625)
  > 7700811 At 100ms we still see failures on prow (# 10626)
  > c081a82 Make the singlethreaded code simpler by using boolean guard (# 10624)
  > 55a7edf upgrade to latest dependencies (# 10627)
  > 53d4d5b Fix some annoying nits in the route e2e tests (# 10623)
  > 2c781c7 upgrade to latest dependencies (# 10620)
  > 6dba44a The year was 2021.. (# 10621)
  > 39d33bf upgrade to latest dependencies (# 10617)
bumping knative.dev/networking 8b522a9...94433ab:
  > 94433ab upgrade to latest dependencies (# 341)
bumping knative.dev/eventing ea452b5...1725902:
  > 1725902 Update COMMUNITY_CONTACTS.md test grid link (# 4798)
  > b75d03a Adding new source conformance testcase for CRD Source Registry Spec (# 4780)
  > 77fc350 upgrade to latest dependencies (# 4797)

Signed-off-by: Knative Automation <[email protected]>
  • Loading branch information
knative-automation committed Jan 28, 2021
1 parent f15f275 commit b98498b
Show file tree
Hide file tree
Showing 12 changed files with 50 additions and 122 deletions.
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ require (
k8s.io/cli-runtime v0.19.7
k8s.io/client-go v0.19.7
k8s.io/code-generator v0.19.7
knative.dev/eventing v0.20.1-0.20210127134430-ea452b5b6655
knative.dev/eventing v0.20.1-0.20210128132430-1725902f7e39
knative.dev/hack v0.0.0-20210120165453-8d623a0af457
knative.dev/networking v0.0.0-20210123150554-8b522a9049a1
knative.dev/pkg v0.0.0-20210125222030-6040b3af4803
knative.dev/serving v0.20.1-0.20210123202654-e61294b2ca32
knative.dev/networking v0.0.0-20210125050654-94433ab7f620
knative.dev/pkg v0.0.0-20210127163530-0d31134d5f4e
knative.dev/serving v0.20.1-0.20210128035538-fbbbb98dc9a6
sigs.k8s.io/yaml v1.2.0
)
63 changes: 11 additions & 52 deletions go.sum

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func validateKnativeAnnotations(annotations map[string]string) (errs *apis.Field
errs = errs.Also(apis.ErrInvalidKeyName(key, apis.CurrentField))
}
}
return
return errs
}

// ValidateHasNoAutoscalingAnnotation validates that the respective entity does not have
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@ func (c *Configuration) validateLabels() (errs *apis.FieldError) {
}
}
}
return
return errs
}

// verifyLabelOwnerRef function verifies the owner references of resource with label key has val value.
func verifyLabelOwnerRef(val, label, resource string, ownerRefs []metav1.OwnerReference) (errs *apis.FieldError) {
for _, ref := range ownerRefs {
if ref.Kind == resource && val == ref.Name {
return
if ref.Kind == resource && ref.Name == val {
return nil
}
}
return errs.Also(apis.ErrMissingField(label))
return apis.ErrMissingField(label)
}
51 changes: 10 additions & 41 deletions vendor/knative.dev/serving/pkg/apis/serving/v1/revision_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const (

// QueueAdminPortName specifies the port name for
// health check and lifecycle hooks for queue-proxy.
QueueAdminPortName string = "http-queueadm"
QueueAdminPortName = "http-queueadm"

// AutoscalingQueueMetricsPortName specifies the port name to use for metrics
// emitted by queue-proxy for autoscaler.
Expand All @@ -48,15 +48,8 @@ const (
UserQueueMetricsPortName = "http-usermetric"
)

const (
// AnnotationParseErrorTypeMissing is the value of the Type field for
// AnnotationParseErrors which indicate an annotation was missing.
AnnotationParseErrorTypeMissing = "Missing"

// AnnotationParseErrorTypeInvalid is the value of the Type field for
// AnnotationParseErrors which indicate an annotation was invalid.
AnnotationParseErrorTypeInvalid = "Invalid"
)
// RoutingState represents states of a revision with regards to serving a route.
type RoutingState string

const (
// RoutingStateUnset is the empty value for routing state, this state is unexpected.
Expand All @@ -67,30 +60,14 @@ const (
// of revision garbage collection.
RoutingStatePending RoutingState = "pending"

// RoutingStateActive is a state for a revision which are actively referenced by a Route.
// RoutingStateActive is a state for a revision which is actively referenced by a Route.
RoutingStateActive RoutingState = "active"

// RoutingStateReserve is a state for a revision which is no longer referenced by a Route,
// and is scaled down, but may be rapidly pinned to a route to be made active again.
RoutingStateReserve RoutingState = "reserve"
)

type (
// RoutingState represents states of a revision with regards to serving a route.
RoutingState string

// +k8s:deepcopy-gen=false

// AnnotationParseError is the error type representing failures to parse annotations.
AnnotationParseError struct {
Type string
Value string
Err error
}

// +k8s:deepcopy-gen=false
)

// GetContainer returns a pointer to the relevant corev1.Container field.
// It is never nil and should be exactly the specified container if len(containers) == 1 or
// if there are multiple containers it returns the container which has Ports
Expand Down Expand Up @@ -157,25 +134,17 @@ func (r *Revision) IsReachable() bool {
}

// GetProtocol returns the app level network protocol.
func (r *Revision) GetProtocol() (p net.ProtocolType) {
p = net.ProtocolHTTP1

func (r *Revision) GetProtocol() net.ProtocolType {
ports := r.Spec.GetContainer().Ports
if len(ports) == 0 {
return
if len(ports) > 0 && ports[0].Name == string(net.ProtocolH2C) {
return net.ProtocolH2C
}

if ports[0].Name == string(net.ProtocolH2C) {
p = net.ProtocolH2C
}

return
return net.ProtocolHTTP1
}

// IsActivationRequired returns true if activation is required.
func (rs *RevisionStatus) IsActivationRequired() bool {
if c := revisionCondSet.Manage(rs).GetCondition(RevisionConditionActive); c != nil {
return c.Status != corev1.ConditionTrue
}
return false
c := revisionCondSet.Manage(rs).GetCondition(RevisionConditionActive)
return c != nil && c.Status != corev1.ConditionTrue
}
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,6 @@ func (rs *RevisionStatus) PropagateDeploymentStatus(original *appsv1.DeploymentS

// PropagateAutoscalerStatus propagates autoscaler's status to the revision's status.
func (rs *RevisionStatus) PropagateAutoscalerStatus(ps *av1alpha1.PodAutoscalerStatus) {
// Propagate the service name from the PA.
rs.ServiceName = ps.ServiceName

// Reflect the PA status in our own.
cond := ps.GetCondition(av1alpha1.PodAutoscalerConditionReady)
if cond == nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,14 @@ func IsRevisionCondition(t apis.ConditionType) bool {
type RevisionStatus struct {
duckv1.Status `json:",inline"`

// ServiceName holds the name of a core Kubernetes Service resource that
// DeprecatedServiceName holds the name of a core Kubernetes Service resource that
// load balances over the pods backing this Revision.
// DEPRECATED: revision service name is effectively equal to the revision name,
// as per #10540.
// 0.23 — stop populating
// 0.25 — remove.
// +optional
ServiceName string `json:"serviceName,omitempty"`
DeprecatedServiceName string `json:"serviceName,omitempty"`

// LogURL specifies the generated logging url for this particular revision
// based on the revision url template specified in the controller's config.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func (r *Revision) ValidateLabels() (errs *apis.FieldError) {
}
}
}
return
return errs
}

// validateRevisionName validates name and generateName for the revisionTemplate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,12 @@ func (tt *TrafficTarget) validateURL(ctx context.Context, errs *apis.FieldError)
return errs
}

func validateClusterVisibilityLabel(label string) (errs *apis.FieldError) {
func validateClusterVisibilityLabel(label string) *apis.FieldError {
if label != serving.VisibilityClusterLocal {
errs = apis.ErrInvalidValue(label, network.VisibilityLabelKey)
return apis.ErrInvalidValue(label, network.VisibilityLabelKey)
}
return

return nil
}

// validateLabels function validates route labels.
Expand All @@ -215,5 +216,5 @@ func (r *Route) validateLabels() (errs *apis.FieldError) {
}
}
}
return
return errs
}
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,5 @@ func (s *Service) validateLabels() (errs *apis.FieldError) {
errs = errs.Also(apis.ErrInvalidKeyName(key, apis.CurrentField))
}
}
return
return errs
}
8 changes: 3 additions & 5 deletions vendor/knative.dev/serving/pkg/testing/v1/revision.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func WithRevName(name string) RevisionOption {
// WithServiceName propagates the given service name to the revision status.
func WithServiceName(sn string) RevisionOption {
return func(rev *v1.Revision) {
rev.Status.ServiceName = sn
rev.Status.DeprecatedServiceName = sn
}
}

Expand Down Expand Up @@ -138,10 +138,8 @@ func MarkActive(r *v1.Revision) {
}

// WithK8sServiceName applies sn to the revision status field.
func WithK8sServiceName(sn string) RevisionOption {
return func(r *v1.Revision) {
r.Status.ServiceName = sn
}
func WithK8sServiceName(r *v1.Revision) {
r.Status.DeprecatedServiceName = r.Name
}

// MarkInactive calls .Status.MarkInactive on the Revision.
Expand Down
8 changes: 4 additions & 4 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ k8s.io/kube-openapi/pkg/util/sets
k8s.io/utils/buffer
k8s.io/utils/integer
k8s.io/utils/trace
# knative.dev/eventing v0.20.1-0.20210127134430-ea452b5b6655
# knative.dev/eventing v0.20.1-0.20210128132430-1725902f7e39
## explicit
knative.dev/eventing/pkg/apis/config
knative.dev/eventing/pkg/apis/configs
Expand Down Expand Up @@ -791,12 +791,12 @@ knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha2/fake
# knative.dev/hack v0.0.0-20210120165453-8d623a0af457
## explicit
knative.dev/hack
# knative.dev/networking v0.0.0-20210123150554-8b522a9049a1
# knative.dev/networking v0.0.0-20210125050654-94433ab7f620
## explicit
knative.dev/networking/pkg
knative.dev/networking/pkg/apis/networking
knative.dev/networking/pkg/apis/networking/v1alpha1
# knative.dev/pkg v0.0.0-20210125222030-6040b3af4803
# knative.dev/pkg v0.0.0-20210127163530-0d31134d5f4e
## explicit
knative.dev/pkg/apis
knative.dev/pkg/apis/duck
Expand Down Expand Up @@ -840,7 +840,7 @@ knative.dev/pkg/tracing/config
knative.dev/pkg/tracing/propagation
knative.dev/pkg/tracing/propagation/tracecontextb3
knative.dev/pkg/tracker
# knative.dev/serving v0.20.1-0.20210123202654-e61294b2ca32
# knative.dev/serving v0.20.1-0.20210128035538-fbbbb98dc9a6
## explicit
knative.dev/serving/pkg/apis/autoscaling
knative.dev/serving/pkg/apis/autoscaling/v1alpha1
Expand Down

0 comments on commit b98498b

Please sign in to comment.