-
Notifications
You must be signed in to change notification settings - Fork 45
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@trshafer: 0 warnings.
In response to this:
Addresses #335
Proposed Changes
- Change the reconciler to the generated reconciler
Release Note
NONE
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
if err != nil { | ||
r.Logger.Errorf("invalid resource key: %s", key) | ||
return nil | ||
} | ||
// Get the KnativeServing resource with this namespace/name. | ||
original, err := r.knativeServingLister.KnativeServings(namespace).Get(name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see build failures because of this line, are the tests stale?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pkg/reconciler/knativeserving/knativeserving_controller.go:256:21: r.knativeServingLister undefined (type *Reconciler has no field or method knativeServingLister) specifically, which maybe is somewhere else I'm missing in the file :)
a73a2cf
to
2dc4a44
Compare
limitations under the License. | ||
*/ | ||
|
||
// Code generated by injection-gen. DO NOT EDIT. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any particular reason this isn't in a zz_generated.go file? Is that not standard practice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure. It's the same for knative/serving. Maybe the comment is sufficient? I still find it confusing to understand what line of code actually produced this file. https://github.com/knative/serving/blob/fdfc49f209d6114295968d9d4c7ad8392542a9c0/pkg/client/injection/reconciler/serving/v1/service/reconciler.go.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of questions about places where I'm confused :)
The tests are passing though, so depending on what I learn this looks reasonable.
v1alpha1knativeserving "knative.dev/serving-operator/pkg/client/injection/reconciler/serving/v1alpha1/knativeserving" | ||
) | ||
|
||
// TODO: PLEASE COPY AND MODIFY THIS FILE AS A STARTING POINT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete
Also, is the code generated comment still relevant? If so, we might want to remove this from the generated code :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In serving, the content under stub is autogenerated and checked in: https://github.com/knative/serving/tree/fdfc49f209d6114295968d9d4c7ad8392542a9c0/pkg/client/injection/reconciler/serving/v1/service/stub
|
||
knativeservingInformer := knativeserving.Get(ctx) | ||
|
||
// TODO: setup additional informers here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need more informers on the underlying deployments, for instance?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if this line is generated, since this file is under pkg/client/injection?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The content under stub is generated: https://github.com/knative/serving/tree/fdfc49f209d6114295968d9d4c7ad8392542a9c0/pkg/client/injection/reconciler/serving/v1/service/stub
@trshafer @Cynocracy I have submitted this PR to move over all the serving-operator code: knative/operator#1 |
@houshengbo genreconciler should make it easier to transition from one operator to another as more of the boilerplate code is autogenerated. I think we should finish #335. Thoughts? |
My opinion is that we should land this and a similar change in eventing to minimize the boilerplate / wiring needed to combine the operators. We have this working for serving, maybe we could prepare a similar change for eventing before we merge this? |
@houshengbo thoughts on merging this change? The next change will be to remove rbase:
|
/close |
@houshengbo: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/retest |
/hold Will update with removing rbase. |
3a3f836
to
b8f656b
Compare
/cancel hold |
/hold cancel |
This pull request introduces 1 alert and fixes 1 when merging b8f656b into 940a4ca - view on LGTM.com new alerts:
fixed alerts:
|
Delete base reconciler.
The following is the coverage report on the affected files.
|
This pull request fixes 1 alert when merging 28b217e into 940a4ca - view on LGTM.com fixed alerts:
|
This PR is equivalent to the corresponding changes we had in knative-sandbox/operator, in terms of refactoring the reconciler. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: houshengbo, trshafer The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Fixes #335
Proposed Changes
Release Note