Skip to content

Subscription controller tweaks#459

Merged
knative-prow-robot merged 6 commits into
knative:masterfrom
grantr:subscription-controller-tweaks
Sep 25, 2018
Merged

Subscription controller tweaks#459
knative-prow-robot merged 6 commits into
knative:masterfrom
grantr:subscription-controller-tweaks

Conversation

@grantr
Copy link
Copy Markdown
Contributor

@grantr grantr commented Sep 24, 2018

Followup tweaks to #437 as suggested by @n3wscott:

  • Add IsReady and Mark* functions to manage conditions easily
  • Remove GetSpecJSON and use duck.Generation instead

These make the controller slightly easier to read.

Assuming that the Ready condition flip to true is intended to be
a FromReady flip.
Replaced with Generation duck type.
@grantr grantr requested review from n3wscott and vaikas September 24, 2018 21:42
@knative-prow-robot knative-prow-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 24, 2018
@knative-prow-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: grantr

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 24, 2018
Type: v1alpha1.SubscriptionConditionReferencesResolved,
Status: corev1.ConditionTrue,
})
subscription.Status.MarkReferencesResolved()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️ ❤️ ❤️

@n3wscott
Copy link
Copy Markdown
Contributor

/LGTM

this cleaned up a lot of busy work in the controller. Thanks!!

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 24, 2018
Time fields in conditions often need to be ignored because they rarely
compare as equal. Setting IgnoreTimes true in the test case will cause
diffs to ignore apis.VolatileTime values.
All conditions are now defaulted to Unknown on first reconcile.
@knative-prow-robot knative-prow-robot removed the lgtm Indicates that a PR is ready to be merged. label Sep 24, 2018
@knative-metrics-robot
Copy link
Copy Markdown

The following is the coverage report on pkg/.
Say /test pull-knative-eventing-go-coverage to run the coverage report again

File Old Coverage New Coverage Delta
pkg/controller/eventing/subscription/reconcile.go 72.2% 77.6% 5.4

@n3wscott
Copy link
Copy Markdown
Contributor

/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 25, 2018
@knative-prow-robot knative-prow-robot merged commit 1f9b933 into knative:master Sep 25, 2018
matzew added a commit to matzew/eventing that referenced this pull request Mar 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants