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

Fix validation issue of lastModifier for configuration and routes #6072

Merged
merged 2 commits into from
Nov 27, 2019

Conversation

savitaashture
Copy link
Contributor

Fixes #5964

Proposed Changes

  • add changes to configuration and routes to validate serving.knative.dev/creator and serving.knative.dev/lastModifier when ownerReference is nil

Release Note

None

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Nov 20, 2019
@knative-prow-robot knative-prow-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. area/API API objects and controllers labels Nov 20, 2019
Copy link
Contributor

@knative-prow-robot knative-prow-robot left a comment

Choose a reason for hiding this comment

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

@savitaashture: 0 warnings.

In response to this:

Fixes #5964

Proposed Changes

  • add changes to configuration and routes to validate serving.knative.dev/creator and serving.knative.dev/lastModifier when ownerReference is nil

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.

Copy link
Contributor

@vagababov vagababov left a comment

Choose a reason for hiding this comment

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

Please add unit tests.

@@ -43,8 +43,10 @@ func (c *Configuration) Validate(ctx context.Context) (errs *apis.FieldError) {

if apis.IsInUpdate(ctx) {
original := apis.GetBaseline(ctx).(*Configuration)
errs = errs.Also(apis.ValidateCreatorAndModifier(original.Spec, c.Spec, original.GetAnnotations(),
c.GetAnnotations(), serving.GroupName).ViaField("metadata.annotations"))
if c.OwnerReferences == nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think all those deserve a comment

@knative-prow-robot knative-prow-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 24, 2019
@savitaashture
Copy link
Contributor Author

@vagababov
Handled review comments would you mind to have a look again please

Copy link
Contributor

@vagababov vagababov 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 knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 25, 2019
@dgerd
Copy link

dgerd commented Nov 27, 2019

/approve

@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dgerd, savitaashture, vagababov

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 Nov 27, 2019
@knative-prow-robot knative-prow-robot merged commit 2c32e73 into knative:master Nov 27, 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. area/API API objects and controllers cla: yes Indicates the PR's author has signed the CLA. 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.

Configuration webhook invalid value 'lastModifier'
5 participants