Skip to content
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

Kafka Streams Dev UI: improves support of exotic characters in topic names #37124

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dcotfr
Copy link
Contributor

@dcotfr dcotfr commented Nov 15, 2023

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):

An ID is one of the following:

1. Any string of alphabetic ([a-zA-Z\200-\377]) characters, underscores ('_') or digits([0-9]), not beginning with a digit;
2. a numeral [-]?(.[0-9]⁺ | [0-9]⁺(.[0-9]*)? );
3. any double-quoted string ("...") possibly containing escaped quotes (\")¹;
4. an HTML string (<...>).

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

@dcotfr dcotfr marked this pull request as ready for review November 15, 2023 22:46
@dcotfr dcotfr force-pushed the SupportAllCharactersInTopicNames branch 3 times, most recently from f680c2d to fb7eb16 Compare November 20, 2023 12:10
@dcotfr dcotfr force-pushed the SupportAllCharactersInTopicNames branch 2 times, most recently from aaa6295 to 2e58100 Compare November 28, 2023 18:47
@dcotfr dcotfr force-pushed the SupportAllCharactersInTopicNames branch 2 times, most recently from 7f0c04f to 678508b Compare December 9, 2023 19:46
@dcotfr dcotfr force-pushed the SupportAllCharactersInTopicNames branch from 678508b to a8b4193 Compare January 1, 2024 19:50
@dcotfr dcotfr force-pushed the SupportAllCharactersInTopicNames branch from a8b4193 to 39a961e Compare January 28, 2024 17:31
@dcotfr dcotfr force-pushed the SupportAllCharactersInTopicNames branch from 39a961e to d54ca30 Compare May 6, 2024 18:34
@dcotfr dcotfr force-pushed the SupportAllCharactersInTopicNames branch from ee195ee to 0aa2f60 Compare September 23, 2024 21:52
@dcotfr dcotfr force-pushed the SupportAllCharactersInTopicNames branch from 0aa2f60 to de4136c Compare September 24, 2024 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant