Skip to content

doc/proposals: proposal template and validator library proposal #2

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

Closed
wants to merge 1 commit into from

Conversation

estroz
Copy link
Member

@estroz estroz commented Sep 24, 2019

  • doc/proposals/TEMPLATE.md: proposal template, a slimmed down version of the OKD enhancement proposal template
  • doc/proposals/validation-library.md: discusses a possible implementation for an extentensible validation library.

Note: see the Observations and open questions section of validation-library.md for discussion points.

/cc @gallettilance @shawn-hurley @ecordell

@openshift-ci-robot openshift-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 24, 2019
@estroz estroz mentioned this pull request Sep 24, 2019
Copy link
Member

@shawn-hurley shawn-hurley left a comment

Choose a reason for hiding this comment

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

I think this is a good start, I am just wondering if we are making it a little too complex and can make it simpler?

type Validator interface {
// GetFuncs takes a list of arbitrary objects and returns a set of functions
// that each validate some object from the list.
GetFuncs(...interface{}) ValidatorFuncs
Copy link
Member

Choose a reason for hiding this comment

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

Would it be simpler to deal with one object at a time? (or async) such that for a given object we get the functions and run them, may make it easier if the validateCRD func conformed to the interface instead of wrapping everything in a closure?

Would this allow for a simpler validate function code?

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree. I've updated #3 to use @njhale's suggested simplified Validator interface. Once that has been agreed upon I'll update this proposal, or close this PR if we find it unnecessary.

@estroz estroz closed this Nov 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

3 participants