Bug 1952101 - Can't re-build index if any bundles have been truncated
Summary: Can't re-build index if any bundles have been truncated
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: OLM
Version: 4.8
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.9.0
Assignee: Nick Hale
QA Contact: xzha
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-21 14:00 UTC by lgallett
Modified: 2021-10-18 17:30 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: `opm index|registry add` attempted to verify the existence of operator bundles in an index that are replaced, regardless of whether they were already truncated from the index. Consequence: `opm index|registry add` would consistently fail after a bundle was deprecated for a given package. Fix: opm was made aware of this edge case, and no longer verifies existence of truncated bundles. Result: `opm index|registry add` no longer fails after a bundle is deprecated for a given package.
Clone Of:
Environment:
Last Closed: 2021-10-18 17:30:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2021:3759 0 None None None 2021-10-18 17:30:35 UTC

Description lgallett 2021-04-21 14:00:58 UTC
Description of problem:

rebuilding an index is not possible if bundles have been truncated from the graph as these cause a "replacement not found" error.

This means pipelines cannot:
1. bootstrap new indexes if any bundles have been truncated
2. re-build graphs for packages
3. overwrite-latest


Version-Release number of selected component (if applicable):


How reproducible:

always

Steps to Reproduce:
1. create an index
2. deprecatetruncate a bundle from the index that is not the tail of a channel
3. ListBundles
4. try to batch add the bundles from 3 into a new index

Actual results:

error "replacement not found"

Expected results:

there is a process to ignore these errors if these bundles have been deprecated

Additional info:

Comment 9 xzha 2021-07-20 09:18:22 UTC
verify:
zhaoxia@xzha-mac bug-1952101 % opm version
Version: version.Version{OpmVersion:"1dc76f08e", GitCommit:"1dc76f08ed05a635458420ffa979aebbe59a3890", BuildDate:"2021-07-20T03:47:08Z", GoOs:"darwin", GoArch:"amd64"}

1, create index
zhaoxia@xzha-mac bug-1952101 % opm index add -b quay.io/olmqe/ditto-operator:0.1.0,quay.io/olmqe/ditto-operator:0.1.1,quay.io/olmqe/ditto-operator:0.2.0 -t quay.io/olmqe/ditto-index:test-1952101 -c docker

INFO[0000] building the index                            bundles="[quay.io/olmqe/ditto-operator:0.1.0 quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0000] running /usr/local/bin/docker pull quay.io/olmqe/ditto-operator:0.1.0  bundles="[quay.io/olmqe/ditto-operator:0.1.0 quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0007] running docker create                         bundles="[quay.io/olmqe/ditto-operator:0.1.0 quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0007] running docker cp                             bundles="[quay.io/olmqe/ditto-operator:0.1.0 quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0007] running docker rm                             bundles="[quay.io/olmqe/ditto-operator:0.1.0 quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0007] running /usr/local/bin/docker pull quay.io/olmqe/ditto-operator:0.1.1  bundles="[quay.io/olmqe/ditto-operator:0.1.0 quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0014] running docker create                         bundles="[quay.io/olmqe/ditto-operator:0.1.0 quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0014] running docker cp                             bundles="[quay.io/olmqe/ditto-operator:0.1.0 quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0014] running docker rm                             bundles="[quay.io/olmqe/ditto-operator:0.1.0 quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0014] running /usr/local/bin/docker pull quay.io/olmqe/ditto-operator:0.2.0  bundles="[quay.io/olmqe/ditto-operator:0.1.0 quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0021] running docker create                         bundles="[quay.io/olmqe/ditto-operator:0.1.0 quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0021] running docker cp                             bundles="[quay.io/olmqe/ditto-operator:0.1.0 quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0021] running docker rm                             bundles="[quay.io/olmqe/ditto-operator:0.1.0 quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0021] Could not find optional dependencies file     file=bundle_tmp223328560/metadata load=annotations with=bundle_tmp223328560
INFO[0021] Could not find optional properties file       file=bundle_tmp223328560/metadata load=annotations with=bundle_tmp223328560
INFO[0021] Could not find optional dependencies file     file=bundle_tmp018869967/metadata load=annotations with=bundle_tmp018869967
INFO[0021] Could not find optional properties file       file=bundle_tmp018869967/metadata load=annotations with=bundle_tmp018869967
INFO[0021] Could not find optional dependencies file     file=bundle_tmp289242069/metadata load=annotations with=bundle_tmp289242069
INFO[0021] Could not find optional properties file       file=bundle_tmp289242069/metadata load=annotations with=bundle_tmp289242069
INFO[0021] Generating dockerfile                         bundles="[quay.io/olmqe/ditto-operator:0.1.0 quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0021] writing dockerfile: index.Dockerfile630551147  bundles="[quay.io/olmqe/ditto-operator:0.1.0 quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0021] running docker build                          bundles="[quay.io/olmqe/ditto-operator:0.1.0 quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0021] [docker build -f index.Dockerfile630551147 -t quay.io/olmqe/ditto-index:test-1952101 .]  bundles="[quay.io/olmqe/ditto-operator:0.1.0 quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"

zhaoxia@xzha-mac bug-1952101 % docker push quay.io/olmqe/ditto-index:test-1952101

zhaoxia@xzha-mac bug-1952101 % oc image extract quay.io/olmqe/ditto-index:test-1952101 --file=/database/index.db
zhaoxia@xzha-mac bug-1952101 % sqlite3 index.db 
SQLite version 3.32.3 2020-06-18 14:16:19
Enter ".help" for usage hints.
sqlite> SELECT name,bundlepath,version FROM operatorbundle;
ditto-operator.v0.1.0|quay.io/olmqe/ditto-operator:0.1.0|0.1.0
ditto-operator.v0.1.1|quay.io/olmqe/ditto-operator:0.1.1|0.1.1
ditto-operator.v0.2.0|quay.io/olmqe/ditto-operator:0.2.0|0.2.0
sqlite> SELECT * from channel_entry;
1|alpha|ditto-operator|ditto-operator.v0.2.0|2|0
2|alpha|ditto-operator|ditto-operator.v0.1.1|3|1
3|alpha|ditto-operator|ditto-operator.v0.1.0||2
sqlite> select * from deprecated;
sqlite> .quit

2. deprecatetruncate a bundle from the index that is not the tail of a channel

zhaoxia@xzha-mac bug-1952101 % opm index deprecatetruncate -b quay.io/olmqe/ditto-operator:0.1.1 -f quay.io/olmqe/ditto-index:test-1952101 -t quay.io/olmqe/ditto-index:test-1952101-dep -c docker
INFO[0000] deprecating bundles from the index            bundles="[quay.io/olmqe/ditto-operator:0.1.1]"
INFO[0000] Pulling previous image quay.io/olmqe/ditto-index:test-1952101 to get metadata  bundles="[quay.io/olmqe/ditto-operator:0.1.1]"
INFO[0000] running /usr/local/bin/docker pull quay.io/olmqe/ditto-index:test-1952101  bundles="[quay.io/olmqe/ditto-operator:0.1.1]"
INFO[0005] running /usr/local/bin/docker pull quay.io/olmqe/ditto-index:test-1952101  bundles="[quay.io/olmqe/ditto-operator:0.1.1]"
INFO[0009] Getting label data from previous image        bundles="[quay.io/olmqe/ditto-operator:0.1.1]"
INFO[0009] running docker inspect                        bundles="[quay.io/olmqe/ditto-operator:0.1.1]"
INFO[0009] running docker create                         bundles="[quay.io/olmqe/ditto-operator:0.1.1]"
INFO[0009] running docker cp                             bundles="[quay.io/olmqe/ditto-operator:0.1.1]"
INFO[0011] running docker rm                             bundles="[quay.io/olmqe/ditto-operator:0.1.1]"
INFO[0011] deprecating bundles                           bundles="[quay.io/olmqe/ditto-operator:0.1.1]"
INFO[0011] Generating dockerfile                         bundles="[quay.io/olmqe/ditto-operator:0.1.1]"
INFO[0011] writing dockerfile: index.Dockerfile219835812  bundles="[quay.io/olmqe/ditto-operator:0.1.1]"
INFO[0011] running docker build                          bundles="[quay.io/olmqe/ditto-operator:0.1.1]"
INFO[0011] [docker build -f index.Dockerfile219835812 -t quay.io/olmqe/ditto-index:test-1952101-dep .]  bundles="[quay.io/olmqe/ditto-operator:0.1.1]"

zhaoxia@xzha-mac bug-1952101 % docker push quay.io/olmqe/ditto-index:test-1952101-dep

zhaoxia@xzha-mac bug-1952101 % oc image extract quay.io/olmqe/ditto-index:test-1952101-dep --file=/database/index.db                                                                                    
zhaoxia@xzha-mac bug-1952101 % sqlite3 index.db 
SQLite version 3.32.3 2020-06-18 14:16:19
Enter ".help" for usage hints.
sqlite> SELECT name,bundlepath,version FROM operatorbundle;
ditto-operator.v0.1.1|quay.io/olmqe/ditto-operator:0.1.1|0.1.1
ditto-operator.v0.2.0|quay.io/olmqe/ditto-operator:0.2.0|0.2.0
sqlite> SELECT * from channel_entry;
1|alpha|ditto-operator|ditto-operator.v0.2.0|2|0
2|alpha|ditto-operator|ditto-operator.v0.1.1||1
sqlite> select * from deprecated;
ditto-operator.v0.1.1
sqlite> .quit

3. rm operator ditto
zhaoxia@xzha-mac bug-1952101 % opm index rm -o ditto-operator -f quay.io/olmqe/ditto-index:test-1952101-dep -t quay.io/olmqe/ditto-index:test-1952101-rm -c docker
INFO[0000] building the index                            operators="[ditto-operator]"
INFO[0000] Pulling previous image quay.io/olmqe/ditto-index:test-1952101-dep to get metadata  operators="[ditto-operator]"
INFO[0000] running /usr/local/bin/docker pull quay.io/olmqe/ditto-index:test-1952101-dep  operators="[ditto-operator]"
INFO[0005] running /usr/local/bin/docker pull quay.io/olmqe/ditto-index:test-1952101-dep  operators="[ditto-operator]"
INFO[0008] Getting label data from previous image        operators="[ditto-operator]"
INFO[0008] running docker inspect                        operators="[ditto-operator]"
INFO[0009] running docker create                         operators="[ditto-operator]"
INFO[0009] running docker cp                             operators="[ditto-operator]"
INFO[0010] running docker rm                             operators="[ditto-operator]"
INFO[0011] deleting packages                             pkg=ditto-operator
INFO[0011] packages: [ditto-operator]                    pkg=ditto-operator
INFO[0011] removing stranded bundles                    
INFO[0011] Generating dockerfile                         operators="[ditto-operator]"
INFO[0011] writing dockerfile: index.Dockerfile109765171  operators="[ditto-operator]"
INFO[0011] running docker build                          operators="[ditto-operator]"
INFO[0011] [docker build -f index.Dockerfile109765171 -t quay.io/olmqe/ditto-index:test-1952101-rm .]  operators="[ditto-operator]"

zhaoxia@xzha-mac bug-1952101 % docker push quay.io/olmqe/ditto-index:test-1952101-rm

zhaoxia@xzha-mac bug-1952101 % oc image extract quay.io/olmqe/ditto-index:test-1952101-rm --file=/database/index.db                                            
zhaoxia@xzha-mac bug-1952101 % sqlite3 index.db 
SQLite version 3.32.3 2020-06-18 14:16:19
Enter ".help" for usage hints.
sqlite> SELECT name,bundlepath,version FROM operatorbundle;
sqlite> SELECT * from channel_entry;
sqlite> select * from deprecated;
ditto-operator.v0.1.1
sqlite> .quit

4, add quay.io/olmqe/ditto-operator:0.1.1,quay.io/olmqe/ditto-operator:0.2.0 bundles.
zhaoxia@xzha-mac bug-1952101 % opm index add -b quay.io/olmqe/ditto-operator:0.1.1,quay.io/olmqe/ditto-operator:0.2.0 -t quay.io/olmqe/ditto-index:test-1952101-new -f quay.io/olmqe/ditto-index:test-1952101-rm -c docker

INFO[0000] building the index                            bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0000] Pulling previous image quay.io/olmqe/ditto-index:test-1952101-rm to get metadata  bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0000] running /usr/local/bin/docker pull quay.io/olmqe/ditto-index:test-1952101-rm  bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0005] running /usr/local/bin/docker pull quay.io/olmqe/ditto-index:test-1952101-rm  bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0009] Getting label data from previous image        bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0009] running docker inspect                        bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0010] running docker create                         bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0010] running docker cp                             bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0011] running docker rm                             bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0012] running /usr/local/bin/docker pull quay.io/olmqe/ditto-operator:0.1.1  bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0015] running docker create                         bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0016] running docker cp                             bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0016] running docker rm                             bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0016] running /usr/local/bin/docker pull quay.io/olmqe/ditto-operator:0.2.0  bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0020] running docker create                         bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0020] running docker cp                             bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0021] running docker rm                             bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0021] Could not find optional dependencies file     file=bundle_tmp113126179/metadata load=annotations with=bundle_tmp113126179
INFO[0021] Could not find optional properties file       file=bundle_tmp113126179/metadata load=annotations with=bundle_tmp113126179
INFO[0021] Could not find optional dependencies file     file=bundle_tmp410812966/metadata load=annotations with=bundle_tmp410812966
INFO[0021] Could not find optional properties file       file=bundle_tmp410812966/metadata load=annotations with=bundle_tmp410812966
INFO[0021] Generating dockerfile                         bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0021] writing dockerfile: index.Dockerfile782183433  bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0021] running docker build                          bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0021] [docker build -f index.Dockerfile782183433 -t quay.io/olmqe/ditto-index:test-1952101-new .]  bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
zhaoxia@xzha-mac bug-1952101 % oc image extract quay.io/olmqe/ditto-index:test-1952101-rm --file=/database/index.db

zhaoxia@xzha-mac bug-1952101 % docker push quay.io/olmqe/ditto-index:test-1952101-new

zhaoxia@xzha-mac bug-1952101 % oc image extract quay.io/olmqe/ditto-index:test-1952101-new --file=/database/index.db
zhaoxia@xzha-mac bug-1952101 % sqlite3 index.db 
SQLite version 3.32.3 2020-06-18 14:16:19
Enter ".help" for usage hints.
sqlite> SELECT name,bundlepath,version FROM operatorbundle;
ditto-operator.v0.1.1|quay.io/olmqe/ditto-operator:0.1.1|0.1.1
ditto-operator.v0.2.0|quay.io/olmqe/ditto-operator:0.2.0|0.2.0
sqlite> select * from deprecated;
ditto-operator.v0.1.1
sqlite> SELECT * from channel_entry;
entry_id|channel_name|package_name|operatorbundle_name|replaces|depth
1|alpha|ditto-operator|ditto-operator.v0.2.0|2|0
2|alpha|ditto-operator|ditto-operator.v0.1.1|3|1
3|alpha|ditto-operator|ditto-operator.v0.1.0||2
sqlite> .quit


In index.db, should not have the record "3|alpha|ditto-operator|ditto-operator.v0.1.0||2" in channel_entry.

failed.

Comment 10 xzha 2021-07-20 09:38:14 UTC
 using --overwrite-latest also have such issue.

1, check index quay.io/olmqe/ditto-index:test-1952101-dep
zhaoxia@xzha-mac bug-1952101 % oc image extract quay.io/olmqe/ditto-index:test-1952101-dep --file=/database/index.db
zhaoxia@xzha-mac bug-1952101 % sqlite3 index.db                                                                           
SQLite version 3.32.3 2020-06-18 14:16:19
Enter ".help" for usage hints.
sqlite> select * from channel_entry;
1|alpha|ditto-operator|ditto-operator.v0.2.0|2|0
2|alpha|ditto-operator|ditto-operator.v0.1.1||1
sqlite> select * from deprecated;
ditto-operator.v0.1.1
sqlite> SELECT name,bundlepath,version FROM operatorbundle;
ditto-operator.v0.1.1|quay.io/olmqe/ditto-operator:0.1.1|0.1.1
ditto-operator.v0.2.0|quay.io/olmqe/ditto-operator:0.2.0|0.2.0
sqlite> 

2, overwrite bundles.
zhaoxia@xzha-mac bug-1952101 % opm index add -b quay.io/olmqe/ditto-operator:0.1.1,quay.io/olmqe/ditto-operator:0.2.0 -t quay.io/olmqe/ditto-index:test-1952101-overwrite -f quay.io/olmqe/ditto-index:test-1952101-dep -c docker --overwrite-latest
INFO[0000] building the index                            bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0000] Pulling previous image quay.io/olmqe/ditto-index:test-1952101-dep to get metadata  bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0000] running /usr/local/bin/docker pull quay.io/olmqe/ditto-index:test-1952101-dep  bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0007] running /usr/local/bin/docker pull quay.io/olmqe/ditto-index:test-1952101-dep  bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0011] Getting label data from previous image        bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0011] running docker inspect                        bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0011] running docker create                         bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0011] running docker cp                             bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0012] running docker rm                             bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0013] running /usr/local/bin/docker pull quay.io/olmqe/ditto-operator:0.1.1  bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0016] running docker create                         bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0017] running docker cp                             bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0017] running docker rm                             bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0017] running /usr/local/bin/docker pull quay.io/olmqe/ditto-operator:0.2.0  bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0021] running docker create                         bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0021] running docker cp                             bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0021] running docker rm                             bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0021] Could not find optional dependencies file     file=bundle_tmp121516679/metadata load=annotations with=bundle_tmp121516679
INFO[0021] Could not find optional properties file       file=bundle_tmp121516679/metadata load=annotations with=bundle_tmp121516679
INFO[0021] running /usr/local/bin/docker pull quay.io/olmqe/ditto-operator:0.2.0  bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0025] running docker create                         bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0025] running docker cp                             bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0025] running docker rm                             bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0025] Could not find optional dependencies file     file=bundle_tmp121516679/metadata load=annotations with=bundle_tmp121516679
INFO[0025] Could not find optional properties file       file=bundle_tmp121516679/metadata load=annotations with=bundle_tmp121516679
INFO[0025] Could not find optional dependencies file     file=bundle_tmp551187537/metadata load=annotations with=bundle_tmp551187537
INFO[0025] Could not find optional properties file       file=bundle_tmp551187537/metadata load=annotations with=bundle_tmp551187537
INFO[0025] Generating dockerfile                         bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0025] writing dockerfile: index.Dockerfile195880653  bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0025] running docker build                          bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0025] [docker build -f index.Dockerfile195880653 -t quay.io/olmqe/ditto-index:test-1952101-overwrite .]  bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"

zhaoxia@xzha-mac bug-1952101 % docker push quay.io/olmqe/ditto-index:test-1952101-overwrite

zhaoxia@xzha-mac bug-1952101 % oc image extract quay.io/olmqe/ditto-index:test-1952101-overwrite --file=/database/index.db
zhaoxia@xzha-mac bug-1952101 % sqlite3 index.db 
SQLite version 3.32.3 2020-06-18 14:16:19
Enter ".help" for usage hints.
sqlite> select * from channel_entry;
1|alpha|ditto-operator|ditto-operator.v0.2.0|2|0
2|alpha|ditto-operator|ditto-operator.v0.1.1|3|1
3|alpha|ditto-operator|ditto-operator.v0.1.0||2
sqlite> select * from deprecated;
ditto-operator.v0.1.1
sqlite> SELECT name,bundlepath,version FROM operatorbundle;
ditto-operator.v0.1.1|quay.io/olmqe/ditto-operator:0.1.1|0.1.1
ditto-operator.v0.2.0|quay.io/olmqe/ditto-operator:0.2.0|0.2.0
sqlite> .quit

In index.db, should not have the record "3|alpha|ditto-operator|ditto-operator.v0.1.0||2" in channel_entry.

Comment 11 Nick Hale 2021-07-23 20:07:11 UTC
It looks like the repro steps are incorrect. To verify that "there is a process to ignore these errors if these bundles have been deprecated" you could:

1. call deprecatetruncate against a tail bundle
2. add a new head to the channel of the deprecated bundle ensuring no errors are returned
3. run the updated index
4. ensure the result of a ListBundles gRPC call contains the new head bundle
5. ensure the result of a ListBundles gRPC call does not contain the deprecated bundle 

Additionally, checking the index database directly is useful for debugging, but since it's not the client-facing API, test cases shouldn't rely on them. IIRC, in this case the ListBundles API actually filters out deprecated bundles when called.

Please retest.

Comment 13 xzha 2021-07-26 12:45:44 UTC
verify:

zhaoxia@xzha-mac bug-1952101 % opm version
Version: version.Version{OpmVersion:"4a5ad031b", GitCommit:"4a5ad031bf1e4888b01792f70a8c1a159719626b", BuildDate:"2021-07-26T12:16:37Z", GoOs:"darwin", GoArch:"amd64"}

1, create index
zhaoxia@xzha-mac bug-1952101 % opm index add -b quay.io/olmqe/ditto-operator:0.1.0,quay.io/olmqe/ditto-operator:0.1.1,quay.io/olmqe/ditto-operator:0.2.0 -t quay.io/olmqe/ditto-index:test-1952101 -c docker
INFO[0000] building the index                            bundles="[quay.io/olmqe/ditto-operator:0.1.0 quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0000] running /usr/local/bin/docker pull quay.io/olmqe/ditto-operator:0.1.0  bundles="[quay.io/olmqe/ditto-operator:0.1.0 quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0003] running docker create                         bundles="[quay.io/olmqe/ditto-operator:0.1.0 quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0003] running docker cp                             bundles="[quay.io/olmqe/ditto-operator:0.1.0 quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0004] running docker rm                             bundles="[quay.io/olmqe/ditto-operator:0.1.0 quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0004] running /usr/local/bin/docker pull quay.io/olmqe/ditto-operator:0.1.1  bundles="[quay.io/olmqe/ditto-operator:0.1.0 quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0008] running docker create                         bundles="[quay.io/olmqe/ditto-operator:0.1.0 quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0008] running docker cp                             bundles="[quay.io/olmqe/ditto-operator:0.1.0 quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0009] running docker rm                             bundles="[quay.io/olmqe/ditto-operator:0.1.0 quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0009] running /usr/local/bin/docker pull quay.io/olmqe/ditto-operator:0.2.0  bundles="[quay.io/olmqe/ditto-operator:0.1.0 quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0013] running docker create                         bundles="[quay.io/olmqe/ditto-operator:0.1.0 quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0013] running docker cp                             bundles="[quay.io/olmqe/ditto-operator:0.1.0 quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0013] running docker rm                             bundles="[quay.io/olmqe/ditto-operator:0.1.0 quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0013] Could not find optional dependencies file     file=bundle_tmp386368375/metadata load=annotations with=bundle_tmp386368375
INFO[0013] Could not find optional properties file       file=bundle_tmp386368375/metadata load=annotations with=bundle_tmp386368375
INFO[0013] Could not find optional dependencies file     file=bundle_tmp020332650/metadata load=annotations with=bundle_tmp020332650
INFO[0013] Could not find optional properties file       file=bundle_tmp020332650/metadata load=annotations with=bundle_tmp020332650
INFO[0013] Could not find optional dependencies file     file=bundle_tmp710353601/metadata load=annotations with=bundle_tmp710353601
INFO[0013] Could not find optional properties file       file=bundle_tmp710353601/metadata load=annotations with=bundle_tmp710353601
INFO[0013] Generating dockerfile                         bundles="[quay.io/olmqe/ditto-operator:0.1.0 quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0013] writing dockerfile: index.Dockerfile417626173  bundles="[quay.io/olmqe/ditto-operator:0.1.0 quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0013] running docker build                          bundles="[quay.io/olmqe/ditto-operator:0.1.0 quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0013] [docker build -f index.Dockerfile417626173 -t quay.io/olmqe/ditto-index:test-1952101 .]  bundles="[quay.io/olmqe/ditto-operator:0.1.0 quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
zhaoxia@xzha-mac bug-1952101 % docker push quay.io/olmqe/ditto-index:test-1952101
zhaoxia@xzha-mac bug-1952101 % oc image extract quay.io/olmqe/ditto-index:test-1952101 --file=/database/index.db 
zhaoxia@xzha-mac bug-1952101 % opm registry serve -p 50051 -d index.db -t /dev/null                             
time="2021-07-26T20:40:01+08:00" level=info msg="Keeping server open for infinite seconds" database=index.db port=50051
time="2021-07-26T20:40:01+08:00" level=info msg="serving registry" database=index.db port=50051

zhaoxia@xzha-mac bug-1952101 %  grpcurl --plaintext localhost:50051 api.Registry/ListBundles | jq '{bundlePath, channelName, csvName}'

{
  "bundlePath": "quay.io/olmqe/ditto-operator:0.1.0",
  "channelName": "alpha",
  "csvName": "ditto-operator.v0.1.0"
}
{
  "bundlePath": "quay.io/olmqe/ditto-operator:0.1.1",
  "channelName": "alpha",
  "csvName": "ditto-operator.v0.1.1"
}
{
  "bundlePath": "quay.io/olmqe/ditto-operator:0.2.0",
  "channelName": "alpha",
  "csvName": "ditto-operator.v0.2.0"
}

2. deprecatetruncate a bundle from the index that is not the tail of a channel
zhaoxia@xzha-mac bug-1952101 % opm index deprecatetruncate -b quay.io/olmqe/ditto-operator:0.1.1 -f quay.io/olmqe/ditto-index:test-1952101 -t quay.io/olmqe/ditto-index:test-1952101-dep -c docker
INFO[0000] deprecating bundles from the index            bundles="[quay.io/olmqe/ditto-operator:0.1.1]"
INFO[0000] Pulling previous image quay.io/olmqe/ditto-index:test-1952101 to get metadata  bundles="[quay.io/olmqe/ditto-operator:0.1.1]"
INFO[0000] running /usr/local/bin/docker pull quay.io/olmqe/ditto-index:test-1952101  bundles="[quay.io/olmqe/ditto-operator:0.1.1]"
INFO[0005] running /usr/local/bin/docker pull quay.io/olmqe/ditto-index:test-1952101  bundles="[quay.io/olmqe/ditto-operator:0.1.1]"
INFO[0009] Getting label data from previous image        bundles="[quay.io/olmqe/ditto-operator:0.1.1]"
INFO[0009] running docker inspect                        bundles="[quay.io/olmqe/ditto-operator:0.1.1]"
INFO[0009] running docker create                         bundles="[quay.io/olmqe/ditto-operator:0.1.1]"
INFO[0009] running docker cp                             bundles="[quay.io/olmqe/ditto-operator:0.1.1]"
INFO[0010] running docker rm                             bundles="[quay.io/olmqe/ditto-operator:0.1.1]"
INFO[0011] deprecating bundles                           bundles="[quay.io/olmqe/ditto-operator:0.1.1]"
INFO[0011] Generating dockerfile                         bundles="[quay.io/olmqe/ditto-operator:0.1.1]"
INFO[0011] writing dockerfile: index.Dockerfile136346986  bundles="[quay.io/olmqe/ditto-operator:0.1.1]"
INFO[0011] running docker build                          bundles="[quay.io/olmqe/ditto-operator:0.1.1]"
INFO[0011] [docker build -f index.Dockerfile136346986 -t quay.io/olmqe/ditto-index:test-1952101-dep .]  bundles="[quay.io/olmqe/ditto-operator:0.1.1]"
zhaoxia@xzha-mac bug-1952101 % docker push quay.io/olmqe/ditto-index:test-1952101-dep
The push refers to repository [quay.io/olmqe/ditto-index]
d784d2035397: Pushed 
42fe7d7c9b1f: Layer already exists 
2b6e9ebccfa7: Layer already exists 
88d2b1b8a4ca: Layer already exists 
06888ef1f8b7: Layer already exists 
72e830a4dff5: Layer already exists 
test-1952101-dep: digest: sha256:0181f999ad27ae8ada11e4e9cc29fd4ad3bcc70b19468f313a56a7d48e532f5a size: 1578

zhaoxia@xzha-mac bug-1952101 % oc image extract quay.io/olmqe/ditto-index:test-1952101-dep --file=/database/index.db
zhaoxia@xzha-mac bug-1952101 % opm registry serve -p 50051 -d index.db -t /dev/null 
time="2021-07-26T19:50:39+08:00" level=info msg="Keeping server open for infinite seconds" database=index.db port=50051
time="2021-07-26T19:50:39+08:00" level=info msg="serving registry" database=index.db port=50051
^Ctime="2021-07-26T19:50:53+08:00" level=info msg="shutting down..." database=index.db port=50051
zhaoxia@xzha-mac bug-1952101 %  grpcurl --plaintext localhost:50051 api.Registry/ListBundles | jq '{bundlePath, channelName, csvName}'

{
  "bundlePath": "quay.io/olmqe/ditto-operator:0.1.1-beta",
  "channelName": "alpha",
  "csvName": "ditto-operator.v0.1.1"
}
{
  "bundlePath": "quay.io/olmqe/ditto-operator:0.2.0",
  "channelName": "alpha",
  "csvName": "ditto-operator.v0.2.0"
}

3, re-adding the bundle
zhaoxia@xzha-mac bug-1952101 % opm index add -b quay.io/olmqe/ditto-operator:0.1.1,quay.io/olmqe/ditto-operator:0.2.0 -f quay.io/olmqe/ditto-index:test-1952101-dep -c docker --overwrite-latest 
 
INFO[0000] building the index                            bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0000] Pulling previous image quay.io/olmqe/ditto-index:test-1952101-dep to get metadata  bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0000] running /usr/local/bin/docker pull quay.io/olmqe/ditto-index:test-1952101-dep  bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0004] running /usr/local/bin/docker pull quay.io/olmqe/ditto-index:test-1952101-dep  bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0008] Getting label data from previous image        bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0008] running docker inspect                        bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0008] running docker create                         bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0009] running docker cp                             bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0010] running docker rm                             bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0011] running /usr/local/bin/docker pull quay.io/olmqe/ditto-operator:0.1.1  bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0015] running docker create                         bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0015] running docker cp                             bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0016] running docker rm                             bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0016] running /usr/local/bin/docker pull quay.io/olmqe/ditto-operator:0.2.0  bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0020] running docker create                         bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0020] running docker cp                             bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0020] running docker rm                             bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0020] Could not find optional dependencies file     file=bundle_tmp170252702/metadata load=annotations with=bundle_tmp170252702
INFO[0020] Could not find optional properties file       file=bundle_tmp170252702/metadata load=annotations with=bundle_tmp170252702
INFO[0020] running /usr/local/bin/docker pull quay.io/olmqe/ditto-operator:0.2.0  bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0024] running docker create                         bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0024] running docker cp                             bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0025] running docker rm                             bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0025] Could not find optional dependencies file     file=bundle_tmp170252702/metadata load=annotations with=bundle_tmp170252702
INFO[0025] Could not find optional properties file       file=bundle_tmp170252702/metadata load=annotations with=bundle_tmp170252702
INFO[0025] Could not find optional dependencies file     file=bundle_tmp731335296/metadata load=annotations with=bundle_tmp731335296
INFO[0025] Could not find optional properties file       file=bundle_tmp731335296/metadata load=annotations with=bundle_tmp731335296
INFO[0025] Generating dockerfile                         bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0025] writing dockerfile: index.Dockerfile208193676  bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0025] running docker build                          bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
INFO[0025] [docker build -f index.Dockerfile208193676 -t operator-registry-index:latest .]  bundles="[quay.io/olmqe/ditto-operator:0.1.1 quay.io/olmqe/ditto-operator:0.2.0]"
zhaoxia@xzha-mac bug-1952101 % oc image extract quay.io/olmqe/ditto-index:test-1952101-overwrite --file=/database/index.db
zhaoxia@xzha-mac bug-1952101 % oc image extract quay.io/olmqe/ditto-index:test-1952101-overwrite --file=/database/index.db
zhaoxia@xzha-mac bug-1952101 % opm registry serve -p 50051 -d index.db -t /dev/null                                 
time="2021-07-26T20:38:33+08:00" level=info msg="Keeping server open for infinite seconds" database=index.db port=50051
time="2021-07-26T20:38:33+08:00" level=info msg="serving registry" database=index.db port=50051
^Ctime="2021-07-26T20:38:53+08:00" level=info msg="shutting down..." database=index.db port=50051

zhaoxia@xzha-mac bug-1952101 %  grpcurl --plaintext localhost:50051 api.Registry/ListBundles | jq '{bundlePath, channelName, csvName}'

{
  "bundlePath": "quay.io/olmqe/ditto-operator:0.1.1-beta",
  "channelName": "alpha",
  "csvName": "ditto-operator.v0.1.1"
}
{
  "bundlePath": "quay.io/olmqe/ditto-operator:0.2.0",
  "channelName": "alpha",
  "csvName": "ditto-operator.v0.2.0"
}


4, add a new bundle
zhaoxia@xzha-mac bug-1952101 % opm index add -b quay.io/olmqe/ditto-operator:0.2.1 -t quay.io/olmqe/ditto-index:test-1952101-add -f quay.io/olmqe/ditto-index:test-1952101-dep -c docker --overwrite-latest
INFO[0000] building the index                            bundles="[quay.io/olmqe/ditto-operator:0.2.1]"
INFO[0000] Pulling previous image quay.io/olmqe/ditto-index:test-1952101-dep to get metadata  bundles="[quay.io/olmqe/ditto-operator:0.2.1]"
INFO[0000] running /usr/local/bin/docker pull quay.io/olmqe/ditto-index:test-1952101-dep  bundles="[quay.io/olmqe/ditto-operator:0.2.1]"
INFO[0004] running /usr/local/bin/docker pull quay.io/olmqe/ditto-index:test-1952101-dep  bundles="[quay.io/olmqe/ditto-operator:0.2.1]"
INFO[0008] Getting label data from previous image        bundles="[quay.io/olmqe/ditto-operator:0.2.1]"
INFO[0008] running docker inspect                        bundles="[quay.io/olmqe/ditto-operator:0.2.1]"
INFO[0008] running docker create                         bundles="[quay.io/olmqe/ditto-operator:0.2.1]"
INFO[0008] running docker cp                             bundles="[quay.io/olmqe/ditto-operator:0.2.1]"
INFO[0010] running docker rm                             bundles="[quay.io/olmqe/ditto-operator:0.2.1]"
INFO[0011] running /usr/local/bin/docker pull quay.io/olmqe/ditto-operator:0.2.1  bundles="[quay.io/olmqe/ditto-operator:0.2.1]"
INFO[0016] running docker create                         bundles="[quay.io/olmqe/ditto-operator:0.2.1]"
INFO[0016] running docker cp                             bundles="[quay.io/olmqe/ditto-operator:0.2.1]"
INFO[0016] running docker rm                             bundles="[quay.io/olmqe/ditto-operator:0.2.1]"
INFO[0016] Could not find optional dependencies file     file=bundle_tmp894468087/metadata load=annotations with=bundle_tmp894468087
INFO[0016] Could not find optional properties file       file=bundle_tmp894468087/metadata load=annotations with=bundle_tmp894468087
INFO[0016] Could not find optional dependencies file     file=bundle_tmp894468087/metadata load=annotations with=bundle_tmp894468087
INFO[0016] Could not find optional properties file       file=bundle_tmp894468087/metadata load=annotations with=bundle_tmp894468087
INFO[0016] Generating dockerfile                         bundles="[quay.io/olmqe/ditto-operator:0.2.1]"
INFO[0016] writing dockerfile: index.Dockerfile007576253  bundles="[quay.io/olmqe/ditto-operator:0.2.1]"
INFO[0016] running docker build                          bundles="[quay.io/olmqe/ditto-operator:0.2.1]"
INFO[0016] [docker build -f index.Dockerfile007576253 -t quay.io/olmqe/ditto-index:test-1952101-add .]  bundles="[quay.io/olmqe/ditto-operator:0.2.1]"
zhaoxia@xzha-mac bug-1952101 % docker push quay.io/olmqe/ditto-index:test-1952101-add
The push refers to repository [quay.io/olmqe/ditto-index]
1b5fdd4d2df4: Pushed 
42fe7d7c9b1f: Layer already exists 
2b6e9ebccfa7: Layer already exists 
88d2b1b8a4ca: Layer already exists 
06888ef1f8b7: Layer already exists 
72e830a4dff5: Layer already exists 
test-1952101-add: digest: sha256:245a784686e65fcfe9b65ed3c58c2151e9dcb4f59a2681b4ecf6f7c8868a1131 size: 1578
zhaoxia@xzha-mac bug-1952101 % oc image extract quay.io/olmqe/ditto-index:test-1952101-add --file=/database/index.db
zhaoxia@xzha-mac bug-1952101 % opm registry serve -p 50051 -d index.db -t /dev/null
time="2021-07-26T20:33:33+08:00" level=info msg="Keeping server open for infinite seconds" database=index.db port=50051
time="2021-07-26T20:33:33+08:00" level=info msg="serving registry" database=index.db port=50051
^Ctime="2021-07-26T20:33:46+08:00" level=info msg="shutting down..." database=index.db port=50051
zhaoxia@xzha-mac bug-1952101 %  grpcurl --plaintext localhost:50051 api.Registry/ListBundles | jq '{bundlePath, channelName, csvName}'

{
  "bundlePath": "quay.io/olmqe/ditto-operator:0.1.1",
  "channelName": "alpha",
  "csvName": "ditto-operator.v0.1.1"
}
{
  "bundlePath": "quay.io/olmqe/ditto-operator:0.2.0",
  "channelName": "alpha",
  "csvName": "ditto-operator.v0.2.0"
}
{
  "bundlePath": "quay.io/olmqe/ditto-operator:0.2.1",
  "channelName": "alpha",
  "csvName": "ditto-operator.v0.2.1"
}


LGTM, verified.

Comment 16 errata-xmlrpc 2021-10-18 17:30:04 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.9.0 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:3759


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