Skip to content

operator-sdk bundle validate should have an option to turn warnings into errors  #5544

@wallrj

Description

@wallrj

Feature Request

operator-sdk bundle validate --permissive=false

The documentation advises bundle authors to check their bundle using operator-sdk bundle validate and that:

Any warnings here might turn into failing pipeline tests here. Please correct all issues displayed. A list of fields that are scanned can also be reviewed with this list.

-- https://github.com/operator-framework/community-operators/blob/1591b5e18d47129ed14e83ac2f9832d6cb41bb40/docs/testing-operators.md#L234-L250

So it would be nice if there was a way to run the tool in CI pipelines and have it fail if there are warnings,
so that the problems can be fixed proactively.

And indeed there is a comment in the code to this effect:

// TODO: add a "permissive" flag to toggle whether warnings also cause a non-zero
// exit code to be returned (true by default).

There is some discussion about this in Slack here: https://kubernetes.slack.com/archives/C017UU45SHL/p1644400918179439

/cc @estroz @camilamacedo86

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/featureCategorizes issue or PR as related to a new feature.lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.priority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to complete.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions