-
Notifications
You must be signed in to change notification settings - Fork 252
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
Sorting order of operator bundles not being honored in 1.12.x of opm #328
Comments
@shawn-hurley @ecordell This seems like what the |
@cdjohnson Trying to understand the context of this, are you expecting the bundles to be inserted in a specific order for some reason? The grpc API for the registry is the source of truth for this data, not the contents of the database itself. I would not expect that we would retain an ordering here, since that seems arbitrary. |
@kevinrizza Yes. The order DOES matter because the Default Channel is set by the last added bundle. Also when using So, we need the array order to be consistent as if you performed |
The insert was updated to use an update algorithm by determining the correct order to generate the graph. The order of that database table itself is orthogonal to "did the tip of the graph determine the package level metadata" -- that behavior should have been maintained. Additionally, the order of the elements in that table does not describe the graph's understanding of what replaces what -- that is currently described by the channel_entry table which has keys pointing to what bundles replace what other bundles in specific channels. The intention was just to allow arbitrary ordering to the -b flag so that users didn't need to specify the correct ordering (#285). If there has been some regression in behavior around how metadata is ingested then I would be very interested in any information you have there, but the database table being in a different order itself doesn't lead me to think that is the case. |
@kevinrizza If we run the same command multiple times, we get a different default channel each time. That's the problem. Before the update, the LAST element in the bundle array set the default channel and it was predictable. Right now we have NO WAY of setting the default channel predictably unless we call I have opened issue #330 to discuss that problem, but there doesn't appear to be a valid workaround yet other than using the old If we can get #330 resolved by introducing a way to set the default channel, the order of the bundle array won't matter. |
Okay, so that is definitely a bug. The "latest" package in a set should be the last one to define package level metadata. We'll definitely take a look at that. For the other issue you linked, I agree that it would be ideal if there were package level flags used as input to supersede this bundle level metadata/make it optional. Part of the reason those things don't exist yet is just because of backwards compatibility reasons. Definitely happy to address those in your other open issue |
@kevinrizza any idea if this is a major fix or just bring functionality that was in 1.11.1 back into 1.12.x? If this is days away I can wait but weeks we will have to move forward with 1.11.1. Ideally would like to get the benefits of the smaller image with 1.12.x. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Let's leave this open for now |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
1.15.3 includes fixes for ordering and default channel selection - see #503 for more details. |
I've been building an example catalog with opm 1.11.1 using five bundles and five different channels, with the following two step process:
When I check the registry from the API I see the following:
The operatorbundle table also seem to be in order:
However in my testing moving to opm 1.12.x I get random results on the default channel and the bundles are not kept in the order I provide them, see below.
I have also tried build without using the
--from-index
and using--mode semver
but neither keep the bundle version order, thus the default channel is randomly set. Please provide any guidance as to why this might be happening.Attached files in zip
opm-testing.zip
index-2020-05-14-145213.db is from opm 1.11.1 test
index-2020-05-14-150203.db is from opm 1.12.3 test
opm1.11.1-build.log
opm1.12.3-build.log
Using podman version 1.9.2
The text was updated successfully, but these errors were encountered: