Skip to content

[WIP] RFC: applying controller sdk to reconciler for Subscriptions.#525

Closed
n3wscott wants to merge 13 commits into
knative:masterfrom
n3wscott:controller_sdk
Closed

[WIP] RFC: applying controller sdk to reconciler for Subscriptions.#525
n3wscott wants to merge 13 commits into
knative:masterfrom
n3wscott:controller_sdk

Conversation

@n3wscott
Copy link
Copy Markdown
Contributor

Note that this has #513 in the PR so it is a bit noisy. But take a look at what applying the start of the reconciler sdk did to the Subscription Controller.

Proposed Changes

  • apply sdk for reconcilers to Subscription.

Release Note

NONE

@knative-prow-robot knative-prow-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 16, 2018
@knative-prow-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: n3wscott
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: inlined

If they are not already assigned, you can assign the PR to them by writing /assign @inlined in a comment when ready.

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 size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Oct 16, 2018
@n3wscott
Copy link
Copy Markdown
Contributor Author

@knative-metrics-robot
Copy link
Copy Markdown

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

File Old Coverage New Coverage Delta
pkg/apis/eventing/v1alpha1/source_types.go 100.0% 38.5% -61.5
pkg/controller/eventing/subscription/reconcile.go 77.5% 73.8% -3.6
pkg/controller/sdk/provider.go Do not exist 0.0%
pkg/controller/sdk/reconciler.go Do not exist 0.0%
pkg/controller/sdk/status_accessor.go Do not exist 0.0%
pkg/provisioners/container/controller/provider.go Do not exist 0.0%
pkg/provisioners/container/controller/reconcile.go Do not exist 0.0%
pkg/provisioners/container/controller/resources/channel.go Do not exist 0.0%
pkg/provisioners/container/controller/resources/deployment.go Do not exist 0.0%
pkg/sources/heartbeats/cmd/main.go Do not exist 13.6%

Copy link
Copy Markdown
Contributor

@neosab neosab left a comment

Choose a reason for hiding this comment

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

This is great. But if we could extend KnativeReconciler and add SDK reconcilers for Source and Channel it would go further in reducing the boilerplate. Not sure if this was indeed the intention.

logger.Warnf("Failed to reconcile %s: %v", r.provider.Parent.GetObjectKind(), err)
}

if chg, err := r.statusHasChanged(ctx, original, obj); err != nil || !chg {
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.

My understanding is that this would eventually check if the finalizer has been updated as well.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yeah there are some parts missing... like finalizers

@grantr
Copy link
Copy Markdown
Contributor

grantr commented Oct 22, 2018

@n3wscott do we still want this in this repo or can it be moved to eventing-sources?

@grantr
Copy link
Copy Markdown
Contributor

grantr commented Oct 22, 2018

Closing this one since it contains a bunch of Source stuff. @n3wscott you can create a new PR with just the Subscription controller changes if you want.

@grantr grantr closed this Oct 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants