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

🌱 Update the internal solver before exporting #164

Merged
merged 1 commit into from
Dec 4, 2023

Conversation

m1kola
Copy link
Member

@m1kola m1kola commented Dec 1, 2023

Related to #161

Preparing the internal solver to be exported and used without the DeppySolver wrapper.

Signed-off-by: Mikalai Radchuk <mradchuk@redhat.com>
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 1, 2023
Copy link

codecov bot commented Dec 1, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (e676cce) 63.90% compared to head (13066d1) 64.43%.

Files Patch % Lines
internal/solver/solve.go 93.33% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #164      +/-   ##
==========================================
+ Coverage   63.90%   64.43%   +0.53%     
==========================================
  Files          11       11              
  Lines         482      478       -4     
==========================================
  Hits          308      308              
+ Misses        155      152       -3     
+ Partials       19       18       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@m1kola m1kola marked this pull request as ready for review December 1, 2023 15:13
@m1kola m1kola requested a review from a team as a code owner December 1, 2023 15:13
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 1, 2023
Copy link

@everettraven everettraven left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes look good to me. That being said, I'm not well versed with the entire system and interactions in deppy so another approval is probably good to have prior to merging (I don't think my approval actually counts for merging in this repo anyways)

}

return nil, ErrIncomplete
return nil, errors.New("cancelled before a solution could be found")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to get here?

Copy link
Member Author

@m1kola m1kola Dec 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure. My guess is that Deppy used to accept context for some reason (maybe somehow related to entity sources). So this is probably a leftover from the times where some call coud be cancelled.

I did a bit of code archaeology with a goal to find out the origin of this on Friday, but without any results. I decided to leave this error for now, but removed exported ErrIncomplete. I think for the scope of this PR it is good enough. But I will dig deeper into this (will create an issue to track this). Edit: see #167

@ncdc
Copy link
Member

ncdc commented Dec 4, 2023

This PR is definitely a step in the right direction. We can resolve whether to use a context or not later.

@ncdc ncdc added this pull request to the merge queue Dec 4, 2023
Merged via the queue into operator-framework:main with commit 732b460 Dec 4, 2023
7 checks passed
@m1kola m1kola deleted the internal_solver_refactoring branch December 4, 2023 15:09
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 this pull request may close these issues.

None yet

3 participants