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

Check remote changes #1213

Merged
merged 5 commits into from
Sep 5, 2023
Merged

Check remote changes #1213

merged 5 commits into from
Sep 5, 2023

Conversation

pb82
Copy link
Collaborator

@pb82 pb82 commented Aug 26, 2023

Checks if the remote dashboard has changed, before submitting an update. This prevents the Operator from creating a new version every time a dashboard is reconciled.

@pb82 pb82 force-pushed the check-remote-changes branch 4 times, most recently from ff66a60 to 5753b09 Compare August 27, 2023 17:07
@HVBE
Copy link
Collaborator

HVBE commented Aug 28, 2023

LGTM! We just need go-lint to be happy again

@NissesSenap
Copy link
Collaborator

So I took the freedom to fix the linting.
I removed nolintlint since it doesn't seem to work. We have multiple locations in the code where we use the //nolint without any explanation and all of a sudden it complains....

@NissesSenap
Copy link
Collaborator

NissesSenap commented Aug 28, 2023

@olejeglejeg could you take a look at this PR. Jsonnet should generate standard grafana json I assume.
So changing the reconciliation shouldn't create any issues, with the jsonnet implementation, right?

Copy link
Collaborator

@NissesSenap NissesSenap left a comment

Choose a reason for hiding this comment

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

As discussed offline, it would be nice to do the same for datasources.
Also, it wouldn't hurt to add a small unit test for this.

@olejeglejeg
Copy link
Contributor

So changing the reconciliation shouldn't create any issues, with the jsonnet implementation, right?

Yes, it's true, since the json generation made above, it mustn't cause issues with this part.

But I have small opinion that want to clarify: I thought that behaviour of the operator does not permit any changes with dashboards except from the code and it was a requirement and target. Is it so?

This PR is changing it which can force clients to mark their dashboards as non-editable in dashboard json declaration.

@NissesSenap NissesSenap merged commit 9329197 into master Sep 5, 2023
9 checks passed
@NissesSenap NissesSenap deleted the check-remote-changes branch September 5, 2023 07:53
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.

None yet

4 participants