synthetic-monitoring-app icon indicating copy to clipboard operation
synthetic-monitoring-app copied to clipboard

Apostrophes or commas in job names result in broken dashboards

Open rdubrock opened this issue 1 year ago • 4 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

rdubrock avatar Sep 19 '23 17:09 rdubrock

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

peterschretlen avatar Apr 16 '24 18:04 peterschretlen

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: https://github.com/grafana/scenes/issues/683

rdubrock avatar May 02 '24 21:05 rdubrock

@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.

peterschretlen avatar May 21 '24 21:05 peterschretlen

@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.

PR with frontend validation on the job name: https://github.com/grafana/synthetic-monitoring-app/pull/902

VikaCep avatar Aug 14 '24 19:08 VikaCep