Skip to content

Conversation

@barkbay
Copy link
Contributor

@barkbay barkbay commented Aug 5, 2019

This PR fixes a missing check when the version is validated.

Without this PR the webhook does not prevent the user to create a 6.0.0 cluster.

}
}
return validation.OK
return validation.Result{Allowed: false, Reason: unsupportedVersion(&ctx.Proposed.Version)}
Copy link
Contributor

@sebgl sebgl Aug 5, 2019

Choose a reason for hiding this comment

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

Can you include a unit test in Test_supportedVersion() (validations_test.go) to cover what you changed? (which also makes sense outside the webhook world)

Copy link
Contributor

@thbkrkr thbkrkr left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@david-kow david-kow left a comment

Choose a reason for hiding this comment

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

LGTM

@barkbay barkbay merged commit b91eb7f into elastic:master Aug 6, 2019
@barkbay barkbay deleted the fix-webhook-validation-6.0.0 branch August 6, 2019 07:47
@pebrc pebrc added >bug Something isn't working v1.0.0-beta1 labels Aug 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>bug Something isn't working v1.0.0-beta1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants