-
Notifications
You must be signed in to change notification settings - Fork 261
(feature) add skipRange support to opm alpha render-graph and provide the capability to filter mermaid output to a single package name
#1023
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
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: grokspawn 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 |
Codecov Report
@@ Coverage Diff @@
## master #1023 +/- ##
==========================================
+ Coverage 51.68% 51.95% +0.27%
==========================================
Files 102 102
Lines 9164 9215 +51
==========================================
+ Hits 4736 4788 +52
+ Misses 3520 3514 -6
- Partials 908 913 +5
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
|
Holding in case another review is needed. /lgtm |
9edb796 to
2a3cd63
Compare
|
Blech. Multiple filters got too complex, so collapsed other PR into this one. |
|
@cdjohnson try this one out. There was a bug where we would drop some nodes that I fixed. It makes for a slightly longer graph-text, but doesn't really impact the graph-pic at all. |
opm alpha render-graph and provide the capability to filter mermaid output to a single package name
|
I don't think the -p option is working right. It's assembling graphs from all sorts of other packages. Hence it's far too big to feed to mermaid. To recreate: You'll see it's grabbing other packages: If I constrain it manually by pointing at an FBC directory (via |
|
@cdjohnson You know ... it helps if you're considering the correct pool from which to get skipRange destination endpoints from ... I was pulling from the list of all bundles in the catalog, instead of the list of all other entities in the channel. I'll check more later. |
|
Verified fixed! |
alpha/declcfg/write.go
Outdated
| return nil | ||
| } | ||
|
|
||
| // short-circuit where the minEdgeName is not in this channel |
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.
Not sure if this is really a "short" short-circuit. It's a lot of work for a check isn't it? We're looping on c.Entries right below as well, can't any checking for the MinEdgeName just be combined into that loop?
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 evaluates a single criterion across the range of entries in the channel in order to recognize a case where there is nothing pertinent in the channel (when the minimumEdge is specified).
I had attempted to include this in the logic of the larger loop, but it complicated the logic something fierce, as well as introducing inefficiencies like having to parse the skipRange twice for validation.
I'll take a look at it though to see if I can smooth it out. If you have any ideas, I'd love to hear them as well.
572c931 to
ab0ace3
Compare
handle invalid SkipRange with output to stderr and ignoring the instance instead of dying determine package of min filter to weed out mismatches Signed-off-by: Jordan Keister <jordan@nimblewidget.com>
ab0ace3 to
0e37934
Compare
|
/lgtm |
Signed-off-by: Jordan Keister jordan@nimblewidget.com
Description of the change:
add rendering of skipRange relationships to
opm alpha render-graphand support an additional filter to allow users to limit results to a specific package in the catalog.From usage:
Motivation for the change:
skipRange was supported in an earlier PR, but it started having complex interactions with this one, so I merged them here.
skipRange was a glaring inadequacy of the tool, and there have been multiple requestors for a package-filter option.
Reviewer Checklist
/docs