tweag / skyscope

A tool for visualising and exploring Bazel Skyframe graphs.
MIT License
55 stars 7 forks source link

Failure to handle nodes with certain non-alphanumeric characters #113

Closed AlexTereshenkov closed 9 months ago

AlexTereshenkov commented 11 months ago

Describe the bug

Having this DOT file contents:

strict digraph  {
"a/foo"
"b/foo"
"a/foo" -> "b/foo";
}

skyscope fails to process the nodes

image

To Reproduce

skyscope import-graphviz < graph.dot

Expected behavior

In general purpose usage of the graph, it's likely for nodes to have characters such as / (e.g. file paths), so it may be important to have support for this character, and optionally a few other (e.g. : as it's often used in the build target address).

Environment

0.3.1

benradf commented 11 months ago

Thanks for reporting this issue @AlexTereshenkov.

The problem was not quoting the node names in the dynamically generated dot files. I've remedied this and created a new release with the fix. Let me know if you encounter further issues.

AlexTereshenkov commented 9 months ago

Thanks a lot @benradf! I am running 0.3.2 now.

It seems like the error persists now raising another error for the same input dot file:

       POST http://localhost:28581/a5b4dde8-b053-45c5-beb8-71ce50aaa4a8/render 500 (Internal Server Error)
(anonymous) @ a5b4dde8-b053-45c5-beb8-71ce50aaa4a8:563
__do4 @ a5b4dde8-b053-45c5-beb8-71ce50aaa4a8:5345
runAsync @ a5b4dde8-b053-45c5-beb8-71ce50aaa4a8:4234
run3 @ a5b4dde8-b053-45c5-beb8-71ce50aaa4a8:4424
(anonymous) @ a5b4dde8-b053-45c5-beb8-71ce50aaa4a8:4436
drain @ a5b4dde8-b053-45c5-beb8-71ce50aaa4a8:4254
enqueue @ a5b4dde8-b053-45c5-beb8-71ce50aaa4a8:4272
run @ a5b4dde8-b053-45c5-beb8-71ce50aaa4a8:4670
__do4 @ a5b4dde8-b053-45c5-beb8-71ce50aaa4a8:5261
(anonymous) @ a5b4dde8-b053-45c5-beb8-71ce50aaa4a8:1716
(anonymous) @ a5b4dde8-b053-45c5-beb8-71ce50aaa4a8:1716
(anonymous) @ a5b4dde8-b053-45c5-beb8-71ce50aaa4a8:1716
(anonymous) @ a5b4dde8-b053-45c5-beb8-71ce50aaa4a8:1716
(anonymous) @ a5b4dde8-b053-45c5-beb8-71ce50aaa4a8:1716
__do6 @ a5b4dde8-b053-45c5-beb8-71ce50aaa4a8:10290
(anonymous) @ a5b4dde8-b053-45c5-beb8-71ce50aaa4a8:9155

a5b4dde8-b053-45c5-beb8-71ce50aaa4a8:8777 Error: There was a problem with the response body: Type mismatch: expected Document, found Null
    at error (a5b4dde8-b053-45c5-beb8-71ce50aaa4a8:1857:12)
    at a5b4dde8-b053-45c5-beb8-71ce50aaa4a8:9677:19
    at a5b4dde8-b053-45c5-beb8-71ce50aaa4a8:9870:24
    at a5b4dde8-b053-45c5-beb8-71ce50aaa4a8:9887:14
    at run3 (a5b4dde8-b053-45c5-beb8-71ce50aaa4a8:4374:25)
    at a5b4dde8-b053-45c5-beb8-71ce50aaa4a8:4436:25
    at drain (a5b4dde8-b053-45c5-beb8-71ce50aaa4a8:4254:11)
    at Object.enqueue (a5b4dde8-b053-45c5-beb8-71ce50aaa4a8:4272:13)
    at a5b4dde8-b053-45c5-beb8-71ce50aaa4a8:4430:33
    at a5b4dde8-b053-45c5-beb8-71ce50aaa4a8:5348:38
benradf commented 9 months ago

Hmm, it works for me now with that dot file. Could you check ~/.skyscope/server.log and see what the most recent error is? Hopefully that'll explain why the server is returning 500 on the /render endpoint.

AlexTereshenkov commented 9 months ago

It all works great now. Purging everything skyscope related and starting fresh did help.