-
Notifications
You must be signed in to change notification settings - Fork 53
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
⚠️ Remove Deppy solver #758
Conversation
✅ Deploy Preview for olmv1 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Did you want to create a separate branch for this? e.g. |
No, just accidentally removed the remote branch and GH closed the PR. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #758 +/- ##
==========================================
- Coverage 67.21% 64.15% -3.06%
==========================================
Files 23 16 -7
Lines 1467 1303 -164
==========================================
- Hits 986 836 -150
+ Misses 415 404 -11
+ Partials 66 63 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
But, if this is a PoC, you don't want it merged...? |
For now I'll keep in the draft. Eventually we can either split it into smaller PRs (if it is in a good enough state) or close it and use as a reference for proper removal. |
4f85d7a
to
95d809a
Compare
Looks reasonable at first pass. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@m1kola The changes look good, just one nit.
Thanks for cleaning up the solver code and fixing cluster extension to work without it!
if err != nil { | ||
return nil, err | ||
} | ||
upgradeErrorPrefix = fmt.Sprintf("error upgrading from currently installed version %q: ", installedBundleVersion.String()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: upgradeErrorPrefix
can be defined as a separate error type globally, and can then be wrapped/formatted to include the bundle version, along with other respective error info like version range, or channel name in the condition. This way it's easier to check for this error with errors.Is
for the client.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrapping errors makes them part of the API and I believe we currently do not have a use case for type checking. I suggest to leave errors opaque and add types, if/when we need them.
@@ -1,7 +1,8 @@ | |||
package variablesources_test | |||
package controllers_test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be easier to review this file with "hide whitespace" option (-w
in git diff
).
Converted back to draft while we are looking into solving package uniqueness for I had a chat with @joelanford about package uniqueness and we decided that it is best to not allow We will look into whether we can achieve that with The plan is:
|
28733c2
to
d7d0522
Compare
Signed-off-by: Mikalai Radchuk <mradchuk@redhat.com>
Signed-off-by: Mikalai Radchuk <mradchuk@redhat.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The resolver removals and version filter additions look good to me!
/lgtm
clusterExtensionList := ocv1alpha1.ClusterExtensionList{} | ||
if err := r.Client.List(ctx, &clusterExtensionList); err != nil { | ||
|
||
installedBundle, err := r.installedBundle(ctx, allBundles, ext) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At some point, I know we talked about adding some labels or annotations to the BD for the installed package name and version and using that in order to derive successors.
Looking on the removed code in the installed_package variable source, I see that we never made that change. So I think it's fine to stick with that same logic like we are in this PR. But I also think we should capture a follow-up issue (if we don't already have one), to implement the installed bundle detection that way.
Somewhat related: I don't think we should have to find the existing installed bundle in the catalog in order to be able to upgrade from it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At some point, I know we talked about adding some labels or annotations to the BD for the installed package name and version and using that in order to derive successors.
Looking on the removed code in the installed_package variable source, I see that we never made that change. So I think it's fine to stick with that same logic like we are in this PR. But I also think we should capture a follow-up issue (if we don't already have one), to implement the installed bundle detection that way.
@joelanford I can't find the thread in upstream slack, but I think we ended up deciding against using labels and in favour of digests which were supposed to support non-image sources. We have this issue for non-image bundle types support and the idea with digests captured here.
Somewhat related: I don't think we should have to find the existing installed bundle in the catalog in order to be able to upgrade from it.
I might be missing something, but in order to support both server and legacy semantics we seem to need the following data:
- Package name (for both server and legacy)
- Current version (for both server and legacy)
- Bundle name (for legacy)
Now that we have #679 we might be able to get this info from ClusterExtensions
's status, but we probably don't want to to read from ClusterExtensions
's status while reconciling ClusterExtensions
.
Even if we store this data in labels and use on upgrades - it will be an equivalent of looking at ClusterExtensions
's status.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed we should not read from ClusterExtension
status. I think @varshaprasad96 is planning to include that information as labels on the Helm release secret. Prior to the helm integration landing, we could include that information as BD labels or annotations.
I could have sworn we added BD annotations for that info already, but maybe not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@joelanford I think you did it in your PoC a while ago and I had a draft PR which we then closed in favour of the digest idea, but we didn't get to implement the the digest idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left one comment about capturing a follow-up. Otherwise LGTM to merge this as is.
I'd merge this, but I'd like to make sure that a follow-up need is captured somewhere first. @m1kola is there an issue/pr for this yet? Could you create one (if not already existing) and mention it here? |
@grokspawn we already have something that captures this. See #758 (comment) for more details. |
e37a2e6
Description
An attempt to remove Deppy and replace it with a simple catalog filtering. This also removes resolution CLI.
With this change we:
Reviewer Checklist