Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opm 1.8.0: Adding a new channel incorrectly deletes csv and bundle json from other channels #261

Closed
cdjohnson opened this issue Apr 8, 2020 · 1 comment · Fixed by #265

Comments

@cdjohnson
Copy link
Contributor

This is related to issue #258

When attempting to add additional channels, the CSV and Bundle JSON JSON data from the csv and bundle fields in the operatorbundle table are deleted for all records except of the head of the last entry in the graph. This information must be retained for the head of each channel.

The side effect of this is that the packagemanifest is missing all channels but the most recent that was modified.

I believe this is a regression introduced in PR #236 as a result of issue #205, and was partially fixed in issue #258

To recreate:

  1. Add a bundle to to the BETA channel:
operator-sdk bundle create quay.io/cdjohnson/brokenoperator:v1.0.0 --directory 1.0.0 --package test-operator --channels BETA --default-channel BETA
docker push quay.io/cdjohnson/brokenoperator:v1.0.0
opm registry add -b quay.io/cdjohnson/brokenoperator:v1.0.0 -c docker

sqlite3 bundles.db "select * from channel;"
BETA|test-operator|testoperator.v1.0.0

sqlite3 bundles.db "select * from channel_entry;"
1|BETA|test-operator|testoperator.v1.0.0||0

sqlite3 bundles.db "select name,length(csv),length(bundle) from operatorbundle;"
testoperator.v1.0.0|1895|1895
  1. Add a second bundle to the STABLE channel where olm.skipRange: <1.0.1
operator-sdk bundle create quay.io/cdjohnson/brokenoperator:v1.0.1 --directory 1.0.1 --package test-operator --channels STABLE --default-channel STABLE
docker push quay.io/cdjohnson/brokenoperator:v1.0.1
opm registry add -b quay.io/cdjohnson/brokenoperator:v1.0.1 -c docker


sqlite3 bundles.db "select * from channel;"
STABLE|test-operator|testoperator.v1.0.1

sqlite3 bundles.db "select * from channel_entry;"
1|STABLE|test-operator|testoperator.v1.0.1||0

sqlite3 bundles.db "select name,length(csv),length(bundle) from operatorbundle;"
testoperator.v1.0.0||
testoperator.v1.0.1|1925|1925

Result: The length of the csv and bundle fields for bundle testoperator.v1.0.0 is now zero.

The csv and bundle json should be retained.

bundles.zip

@cdjohnson
Copy link
Contributor Author

confirmed hat this is fixed in release 1.9.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant