-
Notifications
You must be signed in to change notification settings - Fork 247
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(opm diff): handle cyclic dependency graph #937
fix(opm diff): handle cyclic dependency graph #937
Conversation
140eef0
to
6927af9
Compare
Codecov Report
@@ Coverage Diff @@
## master #937 +/- ##
==========================================
+ Coverage 52.21% 52.25% +0.04%
==========================================
Files 103 103
Lines 9117 9126 +9
==========================================
+ Hits 4760 4769 +9
Misses 3451 3451
Partials 906 906
Continue to review full report at Codecov.
|
6927af9
to
a7efb78
Compare
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.
I've reviewed the implementation and I'm not 100% sure I follow everything, but it seems intuitive that ensuring that the bundles in the dependency graph are unique should not impact the diff ultimately. Also the CI is green so more confidence there.
/lgtm
While generating a diff from a catalog that has operators that specify dependencies that are cyclic in nature, eg a->b, b->a, the `opm alpha diff` command hangs. This was happening because while generating the diff, the command does a breadth-first search of the dependency graph generated by the operator bundles, but did not keep a track of the already visited bundles. As a result, when there was a cycle in the dependency graph, the command was stuck in an infinite loop. This PR fixes the issue by keeping track of the already visited bundles during the search, and moving the search forward with only the bundles that haven't been visited before. Fixes operator-framework#936 Signed-off-by: Anik Bhattacharjee <anikbhattacharya93@gmail.com>
a7efb78
to
45f486d
Compare
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: anik120, joelanford The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
While generating a diff from a catalog that has operators that specify dependencies that are cyclic in nature, eg a->b, b->a, the `opm alpha diff` command hangs. This was happening because while generating the diff, the command does a breadth-first search of the dependency graph generated by the operator bundles, but did not keep a track of the already visited bundles. As a result, when there was a cycle in the dependency graph, the command was stuck in an infinite loop. This PR fixes the issue by keeping track of the already visited bundles during the search, and moving the search forward with only the bundles that haven't been visited before. Fixes #936 Signed-off-by: Anik Bhattacharjee <anikbhattacharya93@gmail.com> Signed-off-by: Jordan Keister <jordan@nimblewidget.com>
While generating a diff from a catalog that has operators that specify dependencies that are cyclic in nature, eg a->b, b->a, the `opm alpha diff` command hangs. This was happening because while generating the diff, the command does a breadth-first search of the dependency graph generated by the operator bundles, but did not keep a track of the already visited bundles. As a result, when there was a cycle in the dependency graph, the command was stuck in an infinite loop. This PR fixes the issue by keeping track of the already visited bundles during the search, and moving the search forward with only the bundles that haven't been visited before. Fixes #936 Signed-off-by: Anik Bhattacharjee <anikbhattacharya93@gmail.com> Signed-off-by: Jordan Keister <jordan@nimblewidget.com>
While generating a diff from a catalog that has operators that specify dependencies
that are cyclic in nature, eg a->b, b->a, the
opm alpha diff
command hangs. Thiswas happening because while generating the diff, the command does a breadth-first
search of the dependency graph generated by the operator bundles, but did not keep
a track of the already visited bundles. As a result, when there was a cycle in the
dependency graph, the command was stuck in an infinite loop.
This PR fixes the issue by keeping track of the already visited bundles during the
search, and moving the search forward with only the bundles that haven't been visited
before.
Fixes #936
Description of the change:
Motivation for the change:
Reviewer Checklist
/docs