operator-sdk icon indicating copy to clipboard operation
operator-sdk copied to clipboard

`operator-sdk bundle validate` doesn't check type correctness of all values

Open arewm opened this issue 3 years ago • 11 comments
trafficstars

Bug Report

Bundle validation passes when values within the CSV do not have appropriate types.

This has been encountered multiple times. We traced down the suspected offending lines to when the spec.version was a string as well as when metadata.annotations.* were not strings, for example,

metadata:
  annotations:
    certified: true

What did you do?

Ran opm render and opm bundle add resulting in an error message

Error: unrecognized type: string

When trying to track the source of the issue, we ran operator-sdk bundle validate, but no errors were raised.

What did you expect to see?

An error message indicating which values have the wrong type

What did you see instead? Under which circumstances?

Validation passed without errors

Environment

Operator type:

Kubernetes cluster type:

$ operator-sdk version

operator-sdk version: "v1.25.1", commit: "162690ff23f3542c0565e1420223e30dfae5dd49", kubernetes version: "1.25.0", go version: "go1.19.2", GOOS: "linux", GOARCH: "arm64"

$ go version (if language is Go)

$ kubectl version

Possible Solution

Additional context

These issues were encountered when trying to add bundles to an index image. We traced it down to improper types which bundle validation did not catch.

Related image in operator-registry: https://github.com/operator-framework/operator-registry/issues/1039

arewm avatar Nov 10 '22 20:11 arewm

@theishshah would you be working on this before the next release (1.28). If its difficult to get in, please feel free to move it to the next one.

varshaprasad96 avatar Feb 15 '23 19:02 varshaprasad96

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

openshift-bot avatar May 23 '23 01:05 openshift-bot

/remove-lifecycle stale

lslebodn avatar May 23 '23 09:05 lslebodn

@theishshah would it be possible to get this in before the next release due on July 24 (1.31). If not, please feel free to bump it to the next one.

varshaprasad96 avatar Jul 17 '23 18:07 varshaprasad96

@theishshah Is it fine if we unassign you from this issue, and add a help wanted label. It would helpful if you could mentor anyone working on this issue since you have knowledge on where the codebase lives.

varshaprasad96 avatar Aug 21 '23 18:08 varshaprasad96

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

openshift-bot avatar Nov 20 '23 01:11 openshift-bot

/remove-lifecycle stale

arewm avatar Nov 20 '23 14:11 arewm

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

openshift-bot avatar Feb 19 '24 01:02 openshift-bot

/remove-lifecycle stale

skitt avatar Feb 19 '24 09:02 skitt

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

openshift-bot avatar May 20 '24 01:05 openshift-bot

Stale issues rot after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle rotten /remove-lifecycle stale

openshift-bot avatar Jun 19 '24 08:06 openshift-bot

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen. Mark the issue as fresh by commenting /remove-lifecycle rotten. Exclude this issue from closing again by commenting /lifecycle frozen.

/close

openshift-bot avatar Jul 20 '24 00:07 openshift-bot

@openshift-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen. Mark the issue as fresh by commenting /remove-lifecycle rotten. Exclude this issue from closing again by commenting /lifecycle frozen.

/close

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-sigs/prow repository.

openshift-ci[bot] avatar Jul 20 '24 00:07 openshift-ci[bot]