Skip to content

Conversation

@Atrax1
Copy link
Contributor

@Atrax1 Atrax1 commented Jan 21, 2026

Compatibility with Grafana v11.6 and v12.1+

Added a call if existing dashboard name is present to allow for update instead of re-create. This behaviour changed since new version of grafana. This call wasnt necesary before.

Alert builder now requires at build time the rule group so we added a new option on DeployToGrafana Option to allow keeping same behaviour as we had by enabling RuleGroupFromDashboard as the new default is the panel name

Requires

Supports

@Atrax1 Atrax1 self-assigned this Jan 21, 2026
@Atrax1 Atrax1 requested a review from a team as a code owner January 21, 2026 11:15
Copilot AI review requested due to automatic review settings January 21, 2026 11:15
@github-actions
Copy link

👋 Atrax1, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the observability library to maintain compatibility with Grafana versions 11.6 and 12+. The changes primarily involve updating dependencies to newer versions of the Grafana Foundation SDK and adapting the code to use updated type names and constants from the new SDK version.

Changes:

  • Added logic to fetch and preserve existing dashboard UIDs when deploying to Grafana
  • Updated type references to match the Grafana Foundation SDK's new naming conventions
  • Upgraded dependencies including the Grafana Foundation SDK, resty, cobra, and testify libraries

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

File Description
observability-lib/grafana/dashboard.go Adds dashboard UID lookup logic to preserve existing dashboard identifiers during deployment
observability-lib/grafana/alerts.go Updates type references to match new SDK naming conventions (removes custom type aliases in favor of SDK types)
observability-lib/go.mod Updates dependency versions for Grafana SDK and other libraries to support Grafana 11.6+
Comments suppressed due to low confidence (1)

observability-lib/go.mod:3

  • The Go version 1.24.5 specified is from the future. As of January 2025, Go 1.24 has not been released. Please verify and use a valid, released Go version (e.g., 1.23.x or earlier).
go 1.24.5

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


dashboardFound, _, err := grafanaClient.GetDashboardByName(*o.Dashboard.Title)
if err != nil {
return err
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

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

The error from GetDashboardByName is returned directly without context. Consider wrapping the error with additional information about what operation failed, such as 'failed to fetch existing dashboard by name: %w'.

Suggested change
return err
return fmt.Errorf("failed to fetch existing dashboard by name %q: %w", *o.Dashboard.Title, err)

Copilot uses AI. Check for mistakes.
@github-actions
Copy link

github-actions bot commented Jan 21, 2026

✅ API Diff Results - No breaking changes


📄 View full apidiff report

@Atrax1 Atrax1 force-pushed the PRODCRE-1736-compatibility-with-grafana-v-11-6-9-and-then-12 branch from 2c670e6 to cc23f1a Compare January 21, 2026 11:16
@Atrax1 Atrax1 force-pushed the PRODCRE-1736-compatibility-with-grafana-v-11-6-9-and-then-12 branch from 41094fd to 9e91e53 Compare January 21, 2026 12:32
@Atrax1 Atrax1 added this pull request to the merge queue Jan 21, 2026
Merged via the queue into main with commit 5014d5e Jan 21, 2026
36 of 37 checks passed
@Atrax1 Atrax1 deleted the PRODCRE-1736-compatibility-with-grafana-v-11-6-9-and-then-12 branch January 21, 2026 15:13
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