kestra-io / kestra

:zap: Workflow Automation Platform. Orchestrate & Schedule code in any language, run anywhere, 500+ plugins. Alternative to Zapier, Rundeck, Camunda, Airflow...
https://kestra.io
Apache License 2.0
12.59k stars 1.07k forks source link

Adjust our markdown logs rendering to avoid Python/YAML comments being rendered as markdown H1 (we can keep rendering only for links) #4834

Closed MilosPaunovic closed 1 month ago

MilosPaunovic commented 2 months ago

Issue description

Sometimes there are logs which look like this:

image

Probelm here is that we're rendering the log content as markdown, and in the example above the log message is message: "# Hello World! 🚀" which in markdown tranlsates to H1 heading (resulting in big text as we see in the attached image).

As Anna pointed out, it is usual in some programming languages that comments start with # character. The question now is for @Ben8t on how to we want to handle this one - if we want to support full markdown log messages, I don't think there is a proper way of determining what is a code comment and what is MD heading. Any ideas on this topic?

Relates to https://github.com/kestra-io/kestra/issues/4776.

Alsom related: https://github.com/kestra-io/kestra-ee/issues/1409

Ben8t commented 2 months ago

The only use case I can see for logs to be rendered is in case of linking to another app: I can imagine some users willing to render [link](https://google.com) as a proper link... But this is edgy, and usually people would render this kind of string in their notification system (slack, email, etc.) or otherwise keeping the link raw.

👉 So let's keep them raw by default for now (no markdown rendering). If we get reports asking for rendering in the future, one solution would be to add a flag renderMarkdown: true | false