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

When using grr.dashboard.new, "name" clobbers dashboard uid #206

Closed
sfc-gh-shettich opened this issue Mar 10, 2022 · 4 comments
Closed

When using grr.dashboard.new, "name" clobbers dashboard uid #206

sfc-gh-shettich opened this issue Mar 10, 2022 · 4 comments

Comments

@sfc-gh-shettich
Copy link

Could you leave the dashboard UID set?

to work around the 40 char uid limit I want to use:

std.substr(std.md5(user_chosen_name), 0, 40)

but still have the user chosen name show up in "grr list" so people can use "grr preview"

@malcolmholmes
Copy link
Collaborator

Name and UID should be the same. The right thing for Grizzly (but not yet implemented) would be either to use the name as UID (if no UID provided) or, if both name and UID provided, complain if they aren't the same.

The name is the way that we identify a resource within Grafana. But Grafana uses UIDs for lookups. Thus, they must be the same.

@sfc-gh-shettich
Copy link
Author

Ah, I see what you mean. Any advice for how to work with list/preview when using auto-generated UIDs?

Or, alternatively, I could pipe "show" to yq and pick out the uid and title, but the output does not follow the standard of a YAML multi-document stream (it's lacking the seperators)

@malcolmholmes
Copy link
Collaborator

My advice is "don't use autogenerated UIDs". I recognise that that isn't particularly helpful advice though.

Grizzly shouldn't allow dashboards without UIDs/names. If the dashboard exists already, the only (rather horrible) option is to download the dashboard, delete it, and upload it with a new UID. This is because of the fact that the "slug" must be unique as well as the UID and the slug is derived from the title. I haven't checked whether this has been fixed at all. If it has, then perhaps we can download/rename/upload/delete which is slightly less scary. I did think of implementing a "rename" feature in Grizzy to do this but got stuck on the slug issue.

@malcolmholmes
Copy link
Collaborator

Closing as old, please reopen if still an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants