Skip to content

Bump grafana-sdk, update AddRow() signature and add new configs to panel options#1898

Merged
chudilka1 merged 1 commit intomainfrom
CRE-2315-grafana
Mar 16, 2026
Merged

Bump grafana-sdk, update AddRow() signature and add new configs to panel options#1898
chudilka1 merged 1 commit intomainfrom
CRE-2315-grafana

Conversation

@chudilka1
Copy link
Contributor

@chudilka1 chudilka1 commented Mar 16, 2026

  1. Bump SDK to get new options.
  2. Add a function to get a collapsed raw (section with panels), and move it to a separate function to keep compatibility for existing implementations.
  3. Add the config FieldMinMax (bool), which allows counting min and max in an automated manner and shows filled gauge lines, based on given metrics (otherwise the gauge, when the max is not defined, may be displayed as not filled with color).

@chudilka1 chudilka1 requested a review from a team as a code owner March 16, 2026 16:02
Copilot AI review requested due to automatic review settings March 16, 2026 16:02
@chudilka1 chudilka1 requested review from Atrax1 and removed request for justinkaseman March 16, 2026 16:03
@github-actions
Copy link

👋 chudilka1, 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!

@github-actions
Copy link

github-actions bot commented Mar 16, 2026

⚠️ API Diff Results - github.com/smartcontractkit/chainlink-common/observability-lib

⚠️ Breaking Changes (3)

grafana.(*Builder) (1)
  • AddRow — Type changed:
func(
  string, 
  + ...RowOptions
)
grafana/businessvariable.(*PanelBuilder) (1)
  • Datasource — Type changed:
func(
  github.com/grafana/grafana-foundation-sdk/go/dashboard.DataSourceRef
)
*PanelBuilder
grafana/polystat.(*PanelBuilder) (1)
  • Datasource — Type changed:
func(
  github.com/grafana/grafana-foundation-sdk/go/dashboard.DataSourceRef
)
*PanelBuilder

✅ Compatible Changes (13)

grafana (1)
  • RowOptions — ➕ Added
grafana.BarGaugePanelOptions (1)
  • FieldMinMax — ➕ Added
grafana.BusinessVariablePanelOptions (1)
  • FieldMinMax — ➕ Added
grafana.GaugePanelOptions (1)
  • FieldMinMax — ➕ Added
grafana.HeatmapPanelOptions (1)
  • FieldMinMax — ➕ Added
grafana.HistogramPanelOptions (1)
  • FieldMinMax — ➕ Added
grafana.LogPanelOptions (1)
  • FieldMinMax — ➕ Added
grafana.PanelOptions (1)
  • FieldMinMax — ➕ Added
grafana.PolystatPanelOptions (1)
  • FieldMinMax — ➕ Added
grafana.StatPanelOptions (1)
  • FieldMinMax — ➕ Added
grafana.TablePanelOptions (1)
  • FieldMinMax — ➕ Added
grafana.TextPanelOptions (1)
  • FieldMinMax — ➕ Added
grafana.TimeSeriesPanelOptions (1)
  • FieldMinMax — ➕ Added

📄 View full apidiff report

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 Grafana Foundation SDK dependency and extends the internal dashboard/panel builders to support newly available configuration options and row behaviors.

Changes:

  • Bump github.com/grafana/grafana-foundation-sdk/go to v0.0.12.
  • Add AddCollapsedRow() to allow creating collapsed dashboard rows.
  • Introduce FieldMinMax on PanelOptions and wire it into multiple panel builders.

Reviewed changes

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

File Description
observability-lib/grafana/panels.go Adds FieldMinMax to PanelOptions and propagates it into several panel builder constructors.
observability-lib/grafana/builder.go Adds AddCollapsedRow() that creates a row with Collapsed(true).
observability-lib/go.mod Updates Grafana Foundation SDK requirement to v0.0.12.
observability-lib/go.sum Updates checksums to match the new SDK version.

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

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +80 to +81
func (b *Builder) AddCollapsedRow(title string) {
b.dashboardBuilder.WithRow(dashboard.NewRowBuilder(title).Collapsed(true))
Copy link
Contributor

Choose a reason for hiding this comment

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

This accomplishes what we need, but if we can find an elegant way to expose the underlying row builder API more directly, then we won't have to mirror every single thing in this wrapper to expose them each.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

cc @Atrax1

jmank88
jmank88 previously approved these changes Mar 16, 2026
@chudilka1 chudilka1 requested review from Atrax1 and jmank88 March 16, 2026 16:51
@chudilka1 chudilka1 changed the title Bump grafana-sdk, inrtoduce AddCollapsedRow() and new configs to panel options Bump grafana-sdk, update AddRow() signature and add new configs to panel options Mar 16, 2026
@chudilka1 chudilka1 added this pull request to the merge queue Mar 16, 2026
Merged via the queue into main with commit 9c2ada8 Mar 16, 2026
32 checks passed
@chudilka1 chudilka1 deleted the CRE-2315-grafana branch March 16, 2026 20:07
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.

4 participants