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

bundle validate: include both warnings and errors #3083

Conversation

estroz
Copy link
Member

@estroz estroz commented May 21, 2020

Description of the change:

  • cmd/operator-sdk/bundle: validate will print errors and warnings from validation.
  • internal/registry: ValidateBundleContent validates a bundle with a given mediaType, returning the results of validation to be analysed/printed.

Motivation for the change: operator-sdk users should be aware of both required and optional aspects of a bundle when running bundle validate.

/kind feature

Depends on #3081

@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 21, 2020
@estroz estroz force-pushed the refactor/validate-bundle-with-warnings branch 7 times, most recently from dd448c1 to 0b4b9be Compare May 22, 2020 23:56
@estroz estroz marked this pull request as ready for review May 23, 2020 00:00
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 23, 2020
@estroz estroz force-pushed the refactor/validate-bundle-with-warnings branch from 0b4b9be to 4377bb2 Compare May 23, 2020 00:01
Copy link
Contributor

@hasbro17 hasbro17 left a comment

Choose a reason for hiding this comment

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

LGTM

@estroz estroz force-pushed the refactor/validate-bundle-with-warnings branch from 4377bb2 to e80b2ec Compare May 23, 2020 00:59
@estroz estroz merged commit b602297 into operator-framework:master May 23, 2020
@estroz estroz deleted the refactor/validate-bundle-with-warnings branch May 23, 2020 01:53
// also validated to confirm if they are "kubectl-able" to a cluster meaning
// if they can be applied to a cluster using `kubectl` provided users have all
// necessary permissions and configurations.
func ValidateBundleContent(logger *log.Entry, bundle *apimanifests.Bundle,
Copy link
Contributor

Choose a reason for hiding this comment

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

Would not make more sense we centralize all bundle validations in the Operator Registry? Also, should responsibility of the lib return WARNs, ERROR's and INFO's instead we do it here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants