Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate Subscription reconciler to use messaging.* v1 resources #3930

Merged
merged 3 commits into from
Aug 27, 2020

Conversation

nlopezgi
Copy link
Contributor

@nlopezgi nlopezgi commented Aug 25, 2020

Part of #3584

Proposed Changes

  • Migrate Subscription reconciler to use messaging.* v1 resources

Removing tests that deal with v1alpha1 subscription (according to #3789 (comment) - see also #3871)

@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 Aug 25, 2020
@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Aug 25, 2020
@knative-prow-robot knative-prow-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Aug 25, 2020
@nlopezgi nlopezgi changed the title [WIP] - Migrate Subscription reconciler to use messaging.* v1 resources Migrate Subscription reconciler to use messaging.* v1 resources Aug 25, 2020
@knative-prow-robot knative-prow-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 25, 2020
@nlopezgi
Copy link
Contributor Author

fyi this is ready for review @aliok

@aliok
Copy link
Member

aliok commented Aug 26, 2020

/assign

@@ -58,8 +58,8 @@ const (
)

var (
v1beta1ChannelGVK = v1beta1.SchemeGroupVersion.WithKind("Channel")
v1ChannelGVK = v1.SchemeGroupVersion.WithKind("Channel")
//v1ChannelGVK = v1.SchemeGroupVersion.WithKind("Channel")
Copy link
Member

Choose a reason for hiding this comment

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

oops :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks for catching, I had it staged but forgot to push that change cleaning up

}

func (r *Reconciler) getSubStatusV1Beta1(subscription *v1beta1.Subscription, channel *eventingduckv1alpha1.ChannelableCombined) (eventingduckv1beta1.SubscriberStatus, error) {
func (r *Reconciler) getSubStatusV1Beta1(subscription *v1.Subscription, channel *eventingduckv1alpha1.ChannelableCombined) (eventingduckv1.SubscriberStatus, error) {
Copy link
Member

Choose a reason for hiding this comment

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

Could you rename this function to ...V1?

Copy link
Member

Choose a reason for hiding this comment

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

+1

Copy link
Contributor Author

Choose a reason for hiding this comment

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

renamed

@aliok
Copy link
Member

aliok commented Aug 26, 2020

/approve

Some nits.
Other than those all good.

}

func (r *Reconciler) getSubStatusV1Alpha1(subscription *v1beta1.Subscription, channel *eventingduckv1alpha1.ChannelableCombined) (eventingduckv1beta1.SubscriberStatus, error) {
func (r *Reconciler) getSubStatusV1Alpha1(ctx context.Context, subscription *v1.Subscription, channel *eventingduckv1alpha1.ChannelableCombined) (eventingduckv1.SubscriberStatus, error) {
Copy link
Member

@matzew matzew Aug 26, 2020

Choose a reason for hiding this comment

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

perhaps also a "bad" name here ...

..... (eventingduckv1.SubscriberStatus, error) 

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this actually is getting the status from the v1Alpha1 channel passed and returning a v1 status. I think the current name works here, but let me know if you have concrete suggestions. Thanks!

Copy link
Member

Choose a reason for hiding this comment

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

I think the name here is good :)

Copy link
Contributor Author

@nlopezgi nlopezgi left a comment

Choose a reason for hiding this comment

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

thanks for the review. fixed the nits.

}

func (r *Reconciler) getSubStatusV1Beta1(subscription *v1beta1.Subscription, channel *eventingduckv1alpha1.ChannelableCombined) (eventingduckv1beta1.SubscriberStatus, error) {
func (r *Reconciler) getSubStatusV1Beta1(subscription *v1.Subscription, channel *eventingduckv1alpha1.ChannelableCombined) (eventingduckv1.SubscriberStatus, error) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

renamed

@@ -58,8 +58,8 @@ const (
)

var (
v1beta1ChannelGVK = v1beta1.SchemeGroupVersion.WithKind("Channel")
v1ChannelGVK = v1.SchemeGroupVersion.WithKind("Channel")
//v1ChannelGVK = v1.SchemeGroupVersion.WithKind("Channel")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks for catching, I had it staged but forgot to push that change cleaning up

}

func (r *Reconciler) getSubStatusV1Alpha1(subscription *v1beta1.Subscription, channel *eventingduckv1alpha1.ChannelableCombined) (eventingduckv1beta1.SubscriberStatus, error) {
func (r *Reconciler) getSubStatusV1Alpha1(ctx context.Context, subscription *v1.Subscription, channel *eventingduckv1alpha1.ChannelableCombined) (eventingduckv1.SubscriberStatus, error) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this actually is getting the status from the v1Alpha1 channel passed and returning a v1 status. I think the current name works here, but let me know if you have concrete suggestions. Thanks!

@knative-metrics-robot
Copy link

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

File Old Coverage New Coverage Delta
pkg/reconciler/subscription/subscription.go 85.3% 76.3% -9.0

Copy link
Member

@aliok aliok left a comment

Choose a reason for hiding this comment

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

/approve
/lgtm

Thanks!

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 26, 2020
@nlopezgi
Copy link
Contributor Author

thanks @aliok !
fyi @matzew this needs a renewed approved label

Copy link
Member

@matzew matzew left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aliok, matzew, nlopezgi

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 /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 Aug 27, 2020
@knative-prow-robot knative-prow-robot merged commit 58c0cd7 into knative:master Aug 27, 2020
matzew pushed a commit to matzew/eventing that referenced this pull request Aug 27, 2020
…ive#3930)

* migrate subscription to v1 messaging

* stash changes

* review comments
@aliok aliok mentioned this pull request Sep 25, 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. cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants