Skip to content

Unable to render rich display when generated telemetry contains mermaid keywords #76

@chancez

Description

@chancez

In Cilium we're using this action and hitting an issue with the rendered mermaid charts: cilium/cilium#32241 (comment)

After some investigation, I think we are hitting this bug mermaid-js/mermaid#2495.

Basically, if the telemetry action generates a chart with words like "call" in the node text, it breaks rendering due to the mermaid bug mentioned above.

Here's a minimal example that fails

gantt
	title Some title
	dateFormat x
	axisFormat %H:%M:%S

	Call blah blah blah : 1721689506000, 1721689507000
Loading

And it works if you remove call:

gantt
	title Some title
	dateFormat x
	axisFormat %H:%M:%S

	blah blah blah : 1721689506000, 1721689507000
Loading

I've actually never used mermaid charts myself yet, so I'm not sure how easy it is to fix, but according to mermaid-js/mermaid#2495 (comment) you can wrap the nodes in quotes to fix the issue?

So eg:

gantt
	title Some title
	dateFormat x
	axisFormat %H:%M:%S

	"Call blah blah blah" : 1721689506000, 1721689507000
Loading

Seems to work 🤷 . Maybe the action can be updated to quote everything to fix the issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions