You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem: Two of our product teams inadvertently added a properties.yaml to their bundle that is malformed:
properties:
- type: olm.package
This results in all opm commands to fail to query the bundle, as it cannot successfully convert it to FBC: opm alpha list packages [icr.io/cpopen/ibm-operator-catalog:latest](http://icr.io/cpopen/ibm-operator-catalog@@sha256:17b9079371d52fcfdd5951e54b330e373a3bf791501eaa2ef339e9f573900482)
FATA[0022] render reference "icr.io/cpopen/ibm-operator-catalog:latest": invalid index:
├── invalid package "ibm-cpd-rstudio":
│ └── invalid channel "v1.0":
│ └── invalid bundle "ibm-cpd-rstudio.v1.0.9":
│ └── must be exactly one property with type "olm.package"
└── invalid package "ibm-cpd-ws-runtimes":
└── invalid channel "v1.0":
└── invalid bundle "ibm-cpd-ws-runtimes.v1.0.9":
└── must be exactly one property with type "olm.package"
When this bundle is added to the SQLITE catalog via opm registry add, it is blindly added to the catalog with an empty value:
sqlite3 index.db "SELECT type, value, operatorbundle_name, operatorbundle_version, operatorbundle_path FROM properties WHERE operatorbundle_name='ibm-cpd-rstudio.v1.0.9'"
olm.package|null|ibm-cpd-rstudio.v1.0.9|1.0.9|icr.io/cpopen/ibm-cpd-rstudio-operator-bundle@sha256:a3da5095fcd46b0b1e6f3f0af016da97b16215ed898a3059ff9047039626c13d
olm.package|{"packageName":"ibm-cpd-rstudio","version":"1.0.9"}|ibm-cpd-rstudio.v1.0.9|1.0.9|icr.io/cpopen/ibm-cpd-rstudio-operator-bundle@sha256:a3da5095fcd46b0b1e6f3f0af016da97b16215ed898a3059ff9047039626c13d
olm.gvk|{"group":"rstudio.cpd.ibm.com","kind":"RStudioAddon","version":"v1beta1"}|ibm-cpd-rstudio.v1.0.9|1.0.9|icr.io/cpopen/ibm-cpd-rstudio-operator-bundle@sha256:a3da5095fcd46b0b1e6f3f0af016da97b16215ed898a3059ff9047039626c13d
olm.package|{"packageName":"ibm-cpd-rstudio","version":"1.0.9"}|ibm-cpd-rstudio.v1.0.9|1.0.9|icr.io/cpopen/ibm-cpd-rstudio-operator-bundle@sha256:a3da5095fcd46b0b1e6f3f0af016da97b16215ed898a3059ff9047039626c13d
A failing bundle example is: icr.io/cpopen/ibm-cpd-rstudio-operator-bundle@sha256:a3da5095fcd46b0b1e6f3f0af016da97b16215ed898a3059ff9047039626c13d
Our public catalog instance with this invalid bundle: icr.io/cpopen/ibm-operator-catalog@sha256:17b9079371d52fcfdd5951e54b330e373a3bf791501eaa2ef339e9f573900482
I think two things should happen here:
opm registry|index add needs to do some validation on the properties object to make sure that the known properties are valid.
The FBC render code could (this is debatable) tolerate this invalid state much like the GRPC server does.
The effect of this problem is that the entire catalog becomes poisoned to all opm queries that rely on the FBC conversion (which is most)
The text was updated successfully, but these errors were encountered:
The FBC render code could (this is debatable) tolerate this invalid state much like the GRPC server does.
I think we'd at least want to keep opm validate failing in this case. It seems like the transition from sqlite to FBC is a good opportunity to fix some of the warts that exist in the sqlite implementation.
I could maybe see an argument for skipping validation during opm render|migrate when dealing with sqlite images/dbs, with the idea that you could successfully render something to FBC, validate it to see what's wrong and then apply manual fixes to get opm validate to pass.
I'm not sure I had jumped to making recommendations yet.
What happens on the OLM side when it receives a bundle like this from a ListBundles call that has a malformed olm.package property? Does OLM tolerate it as well? Is that bundle installable via OLM?
Problem: Two of our product teams inadvertently added a
properties.yaml
to their bundle that is malformed:This results in all opm commands to fail to query the bundle, as it cannot successfully convert it to FBC:
opm alpha list packages [icr.io/cpopen/ibm-operator-catalog:latest](http://icr.io/cpopen/ibm-operator-catalog@@sha256:17b9079371d52fcfdd5951e54b330e373a3bf791501eaa2ef339e9f573900482)
When this bundle is added to the SQLITE catalog via
opm registry add
, it is blindly added to the catalog with an empty value:The GRPC API tolerates this:
A failing bundle example is:
icr.io/cpopen/ibm-cpd-rstudio-operator-bundle@sha256:a3da5095fcd46b0b1e6f3f0af016da97b16215ed898a3059ff9047039626c13d
Our public catalog instance with this invalid bundle:
icr.io/cpopen/ibm-operator-catalog@sha256:17b9079371d52fcfdd5951e54b330e373a3bf791501eaa2ef339e9f573900482
I think two things should happen here:
opm registry|index add
needs to do some validation on theproperties
object to make sure that the known properties are valid.The effect of this problem is that the entire catalog becomes poisoned to all opm queries that rely on the FBC conversion (which is most)
The text was updated successfully, but these errors were encountered: