[csds-client] Opening broswer issue while using visualization feature
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- go, linux
- Domain
- cli, data-visualization
Research direction
Start by tracing the csds-client visualization flow to OpenBrowser(url string), then reproduce the xdg-open behavior described for Debian rodete and Debian 10. Check config_graph.dot and the visualization guidance in csds-client/README.md; done means the generated Graphviz URL preserves the required quotes and backslashes across the supported environments, or the limitation and fallback are clearly documented.
Written by the indexing model from the issue text.
Description
When we use visualization feature in the csds-client, the process is that the client parses the relationship between xDS and generates a graph based on the relationship in dot, then saves it in config_graph.dot. For example:
digraph G {
"LDS0\\listener";
"RDS0";
"LDS0\\listener"->"RDS0";
}
Then the client will call OpenBrowser(url string) to open Graphviz Online with the dot file in the browser to show the graph automatically. For the previous graph example, the link would be https://dreampuf.github.io/GraphvizOnline/#digraph%20G{"LDS0\\listener";"RDS0";"LDS0\\listener"->"RDS0"}.
The logic of OpenBrowser(url string) is that it will run different cmd based on different os. For linux, it runs
xdg-open 'https://dreampuf.github.io/GraphvizOnline/#digraph G{"LDS0\\listener";"RDS0";"LDS0\\listener"->"RDS0"}'
However, the problem is that it seems this command passes the double quotes differently based on different os version.
-
For Debian GNU/Linux rodete, which is the os of cloudtop of Google, when we run
xdg-open 'https://dreampuf.github.io/GraphvizOnline/#digraph G{"LDS0\\listener";"RDS0";"LDS0\\listener"->"RDS0"}'it opens the link https://dreampuf.github.io/GraphvizOnline/#digraph%20G{LDS0\\listener;RDS0;LDS0\\listener->RDS0} in
browser, where the double quotes are missing, therefore, the graph cannot be shown correctly due to syntax error.
If we want to keep the double quotes in the link, we need to runxdg-open 'https://dreampuf.github.io/GraphvizOnline/#digraph G{\"LDS0\\listener\";\"RDS0\";\"LDS0\\listener\"->\"RDS0\"}'and it opens the link https://dreampuf.github.io/GraphvizOnline/#digraph%20G{"LDS0\\listener";"RDS0";"LDS0\\listener"->"RDS0"}, which is correct.
-
For Debian GNU/Linux 10 (buster), when we run
xdg-open 'https://dreampuf.github.io/GraphvizOnline/#digraph G{"LDS0\\listener";"RDS0";"LDS0\\listener"->"RDS0"}'it opens the link https://dreampuf.github.io/GraphvizOnline/#digraph%20G{"LDS0\\listener";"RDS0";"LDS0\\listener"->"RDS0"} correcly.
But if we run the correct cmd in the previous case, it opens the link https://dreampuf.github.io/GraphvizOnline/#digraph%20G{\"LDS0\\listener\";\"RDS0\";\"LDS0\\listener\"->\"RDS0\"}, which is not correct.
The different behavior on different os version leads to the opening browser issue, and I cannot find a proper solution to it. Does anyone has suggestions?
The double quotes surrounding the node name cannot be discarded, because the real name of xDS always contains a backslash, only using double quotes can make the dot language recognize it as a whole name.
For now, the solution is, if opening browser fails, users can manually copy and paste the content in config_graph.dot into the input box of Graphviz Online to show the graph, which has been mentioned in README.
- Dominant language
- Go
- Stars
- 53
- Forks
- 22
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from envoyproxy/envoy-tools
-
Difficulty 4/5 3-5 days Newbie friendliness 20/100
envoyproxy/envoy-tools#52 · 1 comment ·
-
enhancement help wanted
Difficulty 5/5 Over a week Newbie friendliness 15/100
envoyproxy/envoy-tools#7 · 2 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
envoyproxy/envoy-tools#4 · 3 comments ·
All issues in envoyproxy/envoy-tools
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
FiloSottile/age#758 ·
-
nginx configOpen
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 2 days
-
fix: the buttons mock cannot take back the match point -- its undo looks only for the running matchOpenbug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
stuttgart-things/zaehlwerk#168 ·
Maintainers usually reply within 1 day