Skip to content

Add helper methods from in-memory provisioner to utils#560

Merged
knative-prow-robot merged 11 commits into
knative:masterfrom
neosab:channel_utils
Nov 7, 2018
Merged

Add helper methods from in-memory provisioner to utils#560
knative-prow-robot merged 11 commits into
knative:masterfrom
neosab:channel_utils

Conversation

@neosab
Copy link
Copy Markdown
Contributor

@neosab neosab commented Oct 24, 2018

Moving some methods from in-memory provisioner to a new channel_util & provisioner_util. These methods will be useful for other channel provisioners like kafka that I am working on.

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Oct 24, 2018
@knative-prow-robot knative-prow-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 24, 2018
@neosab
Copy link
Copy Markdown
Contributor Author

neosab commented Oct 24, 2018

/cc @adamharwayne

Copy link
Copy Markdown
Contributor

@adamharwayne adamharwayne left a comment

Choose a reason for hiding this comment

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

Looks good, but now it needs unit tests. 😝

Comment thread pkg/provisioners/channel_util.go Outdated
Comment thread pkg/provisioners/channel_util.go Outdated
@neosab
Copy link
Copy Markdown
Contributor Author

neosab commented Oct 24, 2018

Looks good, but now it needs unit tests. 😝

Nothing comes for free 😞

@neosab neosab changed the title Add helper methods from in-memory provisioner to channel_util WIP: Add helper methods from in-memory provisioner to channel_util Oct 24, 2018
@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 24, 2018
@knative-prow-robot knative-prow-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 24, 2018
@neosab neosab changed the title WIP: Add helper methods from in-memory provisioner to channel_util WIP: Add helper methods from in-memory provisioner to utils Oct 24, 2018
@neosab neosab changed the title WIP: Add helper methods from in-memory provisioner to utils Add helper methods from in-memory provisioner to utils Oct 25, 2018
@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 Oct 25, 2018
@adamharwayne
Copy link
Copy Markdown
Contributor

Please merge and I'll take another look.

@neosab
Copy link
Copy Markdown
Contributor Author

neosab commented Oct 29, 2018

@adamharwayne on it :)

@neosab
Copy link
Copy Markdown
Contributor Author

neosab commented Oct 29, 2018

/assign grantr

Copy link
Copy Markdown
Contributor

@adamharwayne adamharwayne left a comment

Choose a reason for hiding this comment

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

/lgtm

eventingv1alpha1.AddToScheme(scheme.Scheme)
}

func TestCreateK8sService(t *testing.T) {
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 personal preference is table tests, but I'm not sure if that is something the repo has standardized on.

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.

+1 on table tests for this situation where it is the same test body, but I would accept a followup for that refactor.

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.

Sure, I will do. Opened up #572 to track it

Comment thread pkg/provisioners/channel_util_test.go Outdated
Spec: eventingv1alpha1.ChannelSpec{
Provisioner: &corev1.ObjectReference{
Name: clusterChannelProvisionerName,
Kind: "ClusterProvisioner",
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.

ClusterChannelProvisioner

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.

Thanks, I will address in the follow-up.

return clusterChannelProvisioner
}

func ClusterProvisonerType() metav1.TypeMeta {
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.

ClusterChannelProvisionerType()

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 30, 2018
@n3wscott
Copy link
Copy Markdown
Contributor

/lgtm

@knative-prow-robot knative-prow-robot removed the lgtm Indicates that a PR is ready to be merged. label Nov 7, 2018
@googlebot
Copy link
Copy Markdown

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of all the commit author(s), set the cla label to yes (if enabled on your project), and then merge this pull request when appropriate.

@googlebot googlebot added cla: no Indicates the PR's author has not signed the CLA. and removed cla: yes Indicates the PR's author has signed the CLA. labels Nov 7, 2018
@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/controller/eventing/inmemory/channel/reconcile.go 98.6% 97.9% -0.7
pkg/provisioners/channel_util.go Do not exist 85.1%
pkg/provisioners/provisioner_util.go Do not exist 77.3%

@matzew
Copy link
Copy Markdown
Member

matzew commented Nov 7, 2018

@evankanderson can you set the CLA bot here too ?

@matzew
Copy link
Copy Markdown
Member

matzew commented Nov 7, 2018

would be good to land this too, @evankanderson

@vaikas
Copy link
Copy Markdown
Contributor

vaikas commented Nov 7, 2018

/lgtm
/approve

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 7, 2018
@knative-prow-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: neosab, vaikas-google

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 Nov 7, 2018
@neosab
Copy link
Copy Markdown
Contributor Author

neosab commented Nov 7, 2018

I am 💯 happy to co-author this with @matzew

@matzew
Copy link
Copy Markdown
Member

matzew commented Nov 7, 2018

I am hppy w/ the changes too

/lgtm

@vaikas vaikas added cla: yes Indicates the PR's author has signed the CLA. and removed cla: no Indicates the PR's author has not signed the CLA. labels Nov 7, 2018
@googlebot
Copy link
Copy Markdown

A Googler has manually verified that the CLAs look good.

(Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.)

@knative-prow-robot knative-prow-robot merged commit 9617713 into knative:master Nov 7, 2018
creydr added a commit to creydr/knative-eventing that referenced this pull request Mar 18, 2024
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.

9 participants