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

Enable forced deletion of GrafanaFolder #1728

Merged
merged 4 commits into from
Oct 28, 2024

Conversation

Baarsgaard
Copy link
Contributor

@Baarsgaard Baarsgaard commented Oct 24, 2024

Usually the Grafana folder API will reject a DELETE if the folder contains alert rules, this can be overwritten with the forceDeleteRules=true query parameter.

Which luckily is included in the Generated Grafana openapi client

This PR enables the forced deletion of folders specifically when declared with a CR.
Folders created from the GrafanaDashboard#spec.folder field are currently not forced as there is no CR declaring them.
See: link

I spent 10 times as longer writing the tests for this new behaviour than the actual code.
Now there should be some a pretty extensive Chainsaw example snippets available for others in the future.
Additionally, I created an easy to use configuration for local testing in: ./tests/e2e/testdata-resources.yaml

@Baarsgaard
Copy link
Contributor Author

I cannot replicate the test failures locally, will have to investigate this over the coming days.

@Baarsgaard Baarsgaard force-pushed the force_delete_folders branch from 1dd662a to 0a09ccf Compare October 25, 2024 19:08
@Baarsgaard
Copy link
Contributor Author

I think that did it!

@Baarsgaard Baarsgaard force-pushed the force_delete_folders branch from 7e83618 to b41a4a3 Compare October 27, 2024 11:37
@theSuess theSuess enabled auto-merge October 28, 2024 08:51
@theSuess theSuess force-pushed the force_delete_folders branch from b41a4a3 to 7fa90c3 Compare October 28, 2024 08:51
@theSuess theSuess added this pull request to the merge queue Oct 28, 2024
Merged via the queue into grafana:master with commit 37ecd68 Oct 28, 2024
13 of 14 checks passed
@Baarsgaard Baarsgaard deleted the force_delete_folders branch October 28, 2024 11:39
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.

2 participants