Bug 2008027 - "opm validate" does not raise error message when channel head does not contain olm.bundle.object in properties
Summary: "opm validate" does not raise error message when channel head does not contai...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: OLM
Version: 4.9
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Kevin Rizza
QA Contact: xzha
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-09-27 02:55 UTC by xzha
Modified: 2022-04-08 12:42 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-04-08 12:42:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift operator-framework-olm pull 210 0 None closed Bug 2008027: validate olm.bundle.object properties on channel heads 2021-12-06 18:05:01 UTC

Description xzha 2021-09-27 02:55:13 UTC
Description of problem:

If olm.bundle.object of the channel head is not set, the operator neither be found with commands 'oc get packagemanifest' nor from the web console.
"opm validate" should raise an error message.

Version-Release number of selected component (if applicable):
zhaoxia@xzha-mac operator-1 % opm version
Version: version.Version{OpmVersion:"a768ef8e8", GitCommit:"a768ef8e86e00e25fa8612dbf9f6984721449255", BuildDate:"2021-09-23T08:24:58Z", GoOs:"darwin", GoArch:"amd64"}

How reproducible:
always

Steps to Reproduce:
1. create index.yaml
zhaoxia@xzha-mac operator-1 % cat index.yaml 
---
schema: olm.package
name: operator-1
defaultChannel: alpha
---
entries:
- name: operator-1.v0.1.0
- name: operator-1.v0.2.0
  replaces: operator-1.v0.1.0
name: alpha
package: operator-1
schema: olm.channel
---
image: quay.io/xzhao/operator-1-bundle:v0.1.0
name: operator-1.v0.1.0
package: operator-1
properties:
- type: olm.gvk
  value:
    group: example.my.domain
    kind: Operator
    version: v1alpha1
- type: olm.package
  value:
    packageName: operator-1
    version: 0.1.0
schema: olm.bundle
---
image: quay.io/xzhao/operator-1-bundle:v0.2.0
name: operator-1.v0.2.0
package: operator-1
properties:
- type: olm.gvk
  value:
    group: example.my.domain
    kind: Operator
    version: v1alpha1
- type: olm.package
  value:
    packageName: operator-1
    version: 0.2.0
schema: olm.bundle

2. run "opm valiate ."
zhaoxia@xzha-mac operator-1 % opm validate .
zhaoxia@xzha-mac operator-1 % 
3.

Actual results:
"opm validate" do not raise an error message.

Expected results:
"opm validate" raise an error message to warn the author "If olm.bundle.object of the channel head is not set, the operator neither be found with commands 'oc get packagemanifest' nor from the web console."

Additional info:

Comment 3 Ankita Thomas 2021-11-24 18:45:56 UTC
There is a PR to add a downstream validation step to check for bundle objects on channel heads, https://github.com/openshift/operator-framework-olm/pull/210. The effects of the bug should mostly go away with the changes to render adding bundle objects to rendered bundles by default.

Comment 4 tflannag 2021-12-02 17:34:52 UTC
I'm going to move this back to ASSIGNED back on Ankita's previous comment. It sounds like we may get this behavior for free when the new render logic (which should've landed downstream yesterday), so I'm going to mark this as reviewed-in-sprint as well. We may want to investigate whether this is a potential CLOSED/WONTFIX candidate and track opm validate encoding logic to determine whether a bundle has the sufficient metadata to be compliant with the packagemanifest API.


Note You need to log in before you can comment on or make changes to this bug.