-
Notifications
You must be signed in to change notification settings - Fork 10
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
fix: return the last verified version that fits the constraint #574
Conversation
Mend Scan Summary: ❌Repository: open-component-model/ocm-controller
|
bed93ef
to
39c3b7f
Compare
Mend Scan Summary: ❌Repository: open-component-model/ocm-controller
|
Mend Scan Summary: ❌Repository: open-component-model/ocm-controller
|
Signed-off-by: Gergely Brautigam <[email protected]>
e2649b6
to
b214c6b
Compare
Mend Scan Summary: ❌Repository: open-component-model/ocm-controller
|
Signed-off-by: Gergely Brautigam <[email protected]>
Mend Scan Summary: ❌Repository: open-component-model/ocm-controller
|
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.
lgtm
Co-authored-by: Frederic Wilhelm <[email protected]>
Mend Scan Summary: ❌Repository: open-component-model/ocm-controller
|
I'm waiting for Dan or the other person to test this PR. |
Hey @Skarlso Someone here was just testing this and noticed that the verify is repeatedly happening for all versions in the repo. Looking at your change I see this is because you put the verify in ListComponentVersions. Given the expense of Verify probably the check should be in GetLatestValidComponentVersion in this loop
This way the expensive verify check is happening as few times as possible. Oh, and another possible optimization.... In VerifyComponent I think there could be a big performance boost if there was first just a check to see if the ComponentDescriptor has all the signatures required by the ComponentVersion. From what I see in the code what I believe is happening is that we are going through and computing digests first. |
The whole thing could be rewritten but I just don't have the capacity for that right now. I'll make the adjustment though and put it into the semver constraint check. :) |
a65b7fe
…ponent-model/ocm-controller into fix-verified-version-deployment
a65b7fe
to
e654954
Compare
Mend Scan Summary: ❌Repository: open-component-model/ocm-controller
|
Sounds good @Skarlso For VerifyComponent, should I add an issue? Perhaps a feature enhancement? |
Yes sure. Also the whole thing is doing a lookup twice instead of just getting a version. |
Mend Scan Summary: ❌Repository: open-component-model/ocm-controller
|
Fixes open-component-model/ocm-project#336