-
Notifications
You must be signed in to change notification settings - Fork 712
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
Add filters for pseudo nodes. #1581
Conversation
Default: "show", | ||
Options: []APITopologyOption{ | ||
{"show", "Show pseudo nodes", nil, false}, | ||
{"hide", "Hide pseudo nodes", render.IsNotPseudo, true}, |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
I'm not fully convinced this is the best way to solve #1129 . Instead of adding another knob I think we should filter out pseudo-nodes not connected to the meaningful nodes of the view being displayed (e.g. container nodes). |
It certainly isn't, but the more interesting question is whether it is a net improvement... I imagine it will be quite common to have both proper and pseudo nodes connected to the internet, and only wanting to see the former nodes&connections but not the latter. Combined with the "extra knob that really shouldn't be needed", that swings the answer slightly in the 'non' direction for me. |
Feedback from actual user that inspired this PR contradicts your views:
|
Maybe this is a naming thing. "pseudo" is Scope jargon. What do those nodes have in common? Are they ancillary, supporting, external, bogus, extra, helper, secondary? |
It does not. Bear in mind that it was me who raised the issue and proposed this very solution as a quick fix. Three months ago. Since then the UI has moved on a lot. Yes, for the users that have no pseudo-nodes connected to their proper nodes the quick fix is an improvement. For them, not showing pseudo nodes at all would be even better. For everybody else it isn't an improvement and it burdens everyone with an additional knob. If it takes little effort to review this then I am willing to let it through under one condition: we raise a separate issue for the proper fix. |
It occurs to me that this could be addressed by not including the internet nodes in this filter. Which would then also address David's concern, since the filter could say 'Uncontained' or 'Unmanaged', which makes it very obvious what this is hiding since it corresponds to labels in the UI. Question: if we did exclude internet nodes from the filter, would the internet nodes be hidden if the filter is on and only unmanaged/uncontained nodes are connected to them? |
I think always showing the internet node (exclude from the filter) would be fine by me. Then it would be independent of the knob. |
My point was that ideally it wouldn't show the internet nodes if they don't have edges to any other shown nodes. So I was wondering whether perhaps that would be happening anyway in the current algorithm. |
Ah yes, that's what I meant too. I had that algo in mind (not showing internet nodes that dont have edges to them) |
This is a one line change. |
can't/won't comment on the code, but if it does what I suggested then that SGTM. |
if (f.filterPseudo || node.Topology != Pseudo) && f.FilterFunc(node) { | ||
output[id] = node | ||
inDegrees[id] = 0 | ||
} else if !f.filterPseudo && node.Topology == Pseudo { |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
@@ -73,25 +73,24 @@ func ComposeFilterFuncs(fs ...FilterFunc) FilterFunc { | |||
// Filter removes nodes from a view based on a predicate. | |||
type Filter struct { | |||
Renderer | |||
FilterFunc FilterFunc | |||
filterPseudo bool |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
d2ad965
to
575805c
Compare
- Don't filter the internet node as a pseudo node. - Rename pseudo filter to unmanaged/uncontained. - Review feedback - Move the FilterFoo funcs into the tests - Drop the 'nodes' from filter labels.
2c6df19
to
48936ef
Compare
Fixes #1129