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

Migrate Reports to OpenAPI #1228

Merged
merged 2 commits into from
Dec 15, 2023
Merged

Migrate Reports to OpenAPI #1228

merged 2 commits into from
Dec 15, 2023

Conversation

spinillos
Copy link
Member

It migrates Reports to OpenAPI.

Depends of: grafana/grafana-openapi-client-go#49

@spinillos spinillos requested a review from a team as a code owner December 13, 2023 10:47
@spinillos spinillos marked this pull request as draft December 13, 2023 10:47
Copy link

In order to lower resource usage and have a faster runtime, PRs will not run Cloud tests automatically.
To do so, a Grafana Labs employee must trigger the cloud acceptance tests workflow manually.

uid := d.Get("dashboard_uid").(string)
if uid == "" {
// It triggers the old way to generate reports
report.DashboardID = id
Copy link
Member Author

Choose a reason for hiding this comment

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

We aren't able to retrieve dashboards by id anymore.

We need to set it in the deprecated dashboard_id to make it works.

@spinillos spinillos marked this pull request as ready for review December 14, 2023 16:12
@@ -235,7 +235,8 @@ func deleteAlertRuleGroup(ctx context.Context, data *schema.ResourceData, meta i
group := resp.Payload

for _, r := range group.Rules {
_, err := client.Provisioning.DeleteAlertRule(r.UID)
params := provisioning.DeleteAlertRuleParams{UID: r.UID}
Copy link
Member

Choose a reason for hiding this comment

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

If you rebase, you can get rid of this change and the go mod update!

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah! I saw that in your PR 😂

Copy link
Member

@julienduchesne julienduchesne left a comment

Choose a reason for hiding this comment

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

Nice! :shipit:

@spinillos spinillos merged commit f2a3013 into master Dec 15, 2023
24 checks passed
@spinillos spinillos deleted the migrate-reports-oapi branch December 15, 2023 16:03
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