Kafka Streams Dev UI: improves support of exotic characters in topic names #37124
+70
−60
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Describe the bug
Topology graph does not appears when topic name contains an unexpected character (ie: dot, comma, hyphen, ...), and Graphviz generated script is not usable.
Expected behavior
A valid Graphviz script and a displayed graph is expected even when topic(s) name(s) contains special characters.
How to Reproduce?
Create a topology sourced on a topic named "temperature.values": no graph displayed, generated Graphviz script not conform (ie: copy/pasted to https://dreampuf.github.io/GraphvizOnline/ returns invalid syntax)
Cause of error
Current Graphviz script generation use short form of ID (1), knowing that (see https://graphviz.org/doc/info/lang.html):
Proposed adjustment
Replaced the use of the abbreviated form of ID (1) with double-quoted IDs, cleaned up of the inner quotes, (3) during the Graphviz script generation phase.
See linked modifications of topology parser and unit test.
Improves #36706