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

Merge for #181 #208

Open
wants to merge 29 commits into
base: main
Choose a base branch
from
Open

Merge for #181 #208

wants to merge 29 commits into from

Conversation

rgeyer
Copy link
Collaborator

@rgeyer rgeyer commented Nov 6, 2024

This is a superset of #181 which includes recent changes/updates to main.

It also updates the docs (as soon as I finish that, I realized it was needed while writing this PR).

alex5517 and others added 28 commits July 10, 2024 14:33
@rgeyer
Copy link
Collaborator Author

rgeyer commented Nov 7, 2024

@alex5517, if you have a second to look this over. I'll get it merged ASAP. :)

Copy link
Contributor

@v-zhuravlev v-zhuravlev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alex5517
Copy link

alex5517 commented Nov 8, 2024

I made some changes to the original PR #181 which might be good to have included here (Had not seen this PR).

It does look like an issue was introduced with PR: #205 I did not fully investigate the root cause of this issue... but the dashboard-linter is no longer able to parse some dashboards:

Error: failed to parse dashboard: json: cannot unmarshal number into Go struct field FieldConfig.rows.panels.fieldConfig.defaults.noValue of type string
failed to parse dashboard: json: cannot unmarshal number into Go struct field FieldConfig.rows.panels.fieldConfig.defaults.noValue of type string
exit status 1

I noticed this new error when linting one of the dashboards provided by mimir-mixin https://github.com/grafana/mimir/blob/main/operations/mimir-mixin-compiled/dashboards/mimir-compactor.json

Also wanna mention that there is an issue present both in this and the other PR with autofix
https://github.com/grafana/dashboard-linter/blob/main/lint/rules.go#L158-L166
If dashboard still uses the deprecated rows instead of panels then when fixing target it takes target from rows and tries to apply to panel which results in panic...

panic: runtime error: index out of range [0] with length 0

I was planning to have a look at it, just haven't got around to it...

@v-zhuravlev
Copy link
Contributor

@alex5517 , I think using https://github.com/grafana/grafana-foundation-sdk/ in #205 caused some old Dashboards not to parse. Would try to address it.

@v-zhuravlev
Copy link
Contributor

#219

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

Successfully merging this pull request may close these issues.

3 participants