Skip to content

Adding common sourceLabels func#720

Merged
knative-prow-robot merged 3 commits into
knative:masterfrom
matzew:source_labels
Oct 15, 2019
Merged

Adding common sourceLabels func#720
knative-prow-robot merged 3 commits into
knative:masterfrom
matzew:source_labels

Conversation

@matzew
Copy link
Copy Markdown
Member

@matzew matzew commented Sep 25, 2019

/assign @n3wscott

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Sep 25, 2019
@knative-prow-robot knative-prow-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 25, 2019
Comment thread source/source_labels.go Outdated
package source

const (
sourceLabelKey = "eventing.knative.dev/source"
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.

I would rather this be sources.knative.dev/controller

Comment thread source/source_labels.go Outdated

const (
sourceLabelKey = "eventing.knative.dev/source"
sourceNameLabelKey = "eventing.knative.dev/sourceName"
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.

I would rather this be sources.knative.dev/name

@matzew
Copy link
Copy Markdown
Member Author

matzew commented Sep 25, 2019 via email

@matzew
Copy link
Copy Markdown
Member Author

matzew commented Sep 25, 2019

@n3wscott thanks for the review - I've updated this

@n3wscott
Copy link
Copy Markdown
Contributor

/lgtm
/approve

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 25, 2019
@matzew
Copy link
Copy Markdown
Member Author

matzew commented Sep 26, 2019

@mattmoor mind taking a look ?

@mattmoor mattmoor self-assigned this Sep 30, 2019
Comment thread source/source_labels_test.go Outdated

eq := cmp.Equal(sourceLables, wantTags)
if !eq {
t.Fatalf("Not equal")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No format directive, print the diff or the objects?

Comment thread source/source_labels.go Outdated
sourceName = "sources.knative.dev/name"
)

func SourceLabels(name, controllerAgentName string) map[string]string {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The function name has what Go folks call "stutter" because of the package name: source.SourceLabels. I would just drop the Source: source.Labels.

This could also use a detailed doc string, since I assume it's being put here for Source authors?

Comment thread source/source_labels.go
@matzew
Copy link
Copy Markdown
Member Author

matzew commented Sep 30, 2019

@mattmoor thanks for the feedback! I've updated my PR 🤗

@knative-prow-robot knative-prow-robot removed the lgtm Indicates that a PR is ready to be merged. label Sep 30, 2019
Comment thread OWNERS_ALIASES
Copy link
Copy Markdown
Member

@mattmoor mattmoor 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
/hold

For the nit.

Comment thread source/source_labels_test.go Outdated

eq := cmp.Equal(sourceLables, wantTags)
if !eq {
t.Fatalf("%v is not equal to %v", sourceLables, wantTags)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: typo sourceLabeles

@knative-prow-robot knative-prow-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm Indicates that a PR is ready to be merged. labels Oct 1, 2019
@knative-prow-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mattmoor, matzew, n3wscott

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 Oct 1, 2019
@knative-prow-robot knative-prow-robot removed the lgtm Indicates that a PR is ready to be merged. label Oct 1, 2019
@knative-metrics-robot
Copy link
Copy Markdown

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

File Old Coverage New Coverage Delta
source/source_labels.go Do not exist 100.0%

@matzew
Copy link
Copy Markdown
Member Author

matzew commented Oct 1, 2019 via email

@knative-prow-robot knative-prow-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 1, 2019
@matzew
Copy link
Copy Markdown
Member Author

matzew commented Oct 15, 2019

@mattmoor mind doing another lgtm? I've fixed your nit etc a couple of days ago :-)

@vaikas
Copy link
Copy Markdown
Contributor

vaikas commented Oct 15, 2019

/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 15, 2019
@knative-prow-robot knative-prow-robot merged commit 2668bdb into knative:master Oct 15, 2019
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/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants