grafana/synthetic-monitoring-app

Apostrophes or commas in job names result in broken dashboards

rdubrock opened this issue · 3 comments

This is probably not a Synthetics bug, but rather because of the way Grafana is escaping characters in dashboard variables

A query with a value that has an apostrophe returns No data on a dashboard, but works just fine in Explore.

Example in Explore of the Uptime query:
Screenshot 2023-09-19 at 09 31 40

The same query using a variable in a dashboard:
Screenshot 2023-09-19 at 09 31 30

I have hit the same problem when I have a comma in the job name. Updating the title

I think commas specifically are a different issue. I think commas is a problem with how scenes/grafana is parsing values to put in the URL, whereas single quotes is a problem with how Mimir handles quote escaping when executing a query. Not 100% sure on that, but I think that's what's happening. Here's the issue in Scenes: grafana/scenes#683

@ckbedwell @VikaCep should we maybe add some validation to job names?
To work properly, it would probably need to be done at the API level too (so terraformed synthetics would also fail to be created), but for UX I think doing some fontend validation would probably help folks avoid this.