Skip to content

Adding serving specific name validation to serving.#1854

Merged
knative-prow-robot merged 2 commits into
knative:masterfrom
n3wscott:name-validaiton
Aug 14, 2018
Merged

Adding serving specific name validation to serving.#1854
knative-prow-robot merged 2 commits into
knative:masterfrom
n3wscott:name-validaiton

Conversation

@n3wscott
Copy link
Copy Markdown
Contributor

Eventing wants to share the webhook code in pkg, but there was serving limitations on name that did not apply to eventing. Moved that limitation to serving.

relates to knative/pkg#44

@knative-prow-robot knative-prow-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 14, 2018
@n3wscott
Copy link
Copy Markdown
Contributor Author

/assign @mattmoor

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

hold in case you care to fix the nit.

"strings"
)

func validateMetadata(new webhook.GenericCRD) *apis.FieldError {
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.

This could just take ObjectMeta too

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.

Good point. Refactored.

@knative-prow-robot knative-prow-robot added lgtm Indicates that a PR is ready to be merged. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Aug 14, 2018
@knative-prow-robot knative-prow-robot removed the lgtm Indicates that a PR is ready to be merged. label Aug 14, 2018
@n3wscott
Copy link
Copy Markdown
Contributor Author

/unhold

PR is updated with the feedback applied and dep updated from pkg change.

@knative-metrics-robot
Copy link
Copy Markdown

The following is the coverage report on pkg/.
Say /test pull-knative-serving-go-coverage to run the coverage report again

File Old Coverage New Coverage Delta
pkg/apis/serving/v1alpha1/metadata_validation.go Do not exist 100.0%

@n3wscott
Copy link
Copy Markdown
Contributor Author

/hold cancel

@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 Aug 14, 2018
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

func validateObjectMetadata(meta metav1.Object) *apis.FieldError {
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.

@mattmoor
Copy link
Copy Markdown
Member

/lgtm
/approve

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mattmoor, 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

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. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants