Skip to content

Commit

Permalink
Merge pull request #129 from K-Phoen/dash-deletion-404
Browse files Browse the repository at this point in the history
Do not fail dashboard deletions if the dashboard is not found
  • Loading branch information
K-Phoen authored Feb 16, 2022
2 parents 35984de + 64c870f commit 0c69219
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion internal/pkg/grafana/dashboards.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ func (creator *Creator) FromRawSpec(ctx context.Context, folderName string, uid
}

func (creator *Creator) Delete(ctx context.Context, uid string) error {
return creator.grabanaClient.DeleteDashboard(ctx, uid)
err := creator.grabanaClient.DeleteDashboard(ctx, uid)
if err != nil && err != grabana.ErrDashboardNotFound {
return err
}

return nil
}

func (creator *Creator) upsertDashboard(ctx context.Context, folderName string, dashboardBuilder dashboard.Builder) error {
Expand Down

0 comments on commit 0c69219

Please sign in to comment.