Kristina Demeshchik
533ee1f078
Dashboard : Allow applying variable regex to display text ( #114426 )
...
* Ability to apply regex to display text
* Frontend tests
* scenes-react version
* lock file
* adjust tests input
* adjust inputs
* unused variable
* change data type
* unit tests
* bump scenes
* bump scenes
* Update docs
* V2->V1 conversion
* re-generate files
* update openai snapshots
2025-12-09 10:55:51 -05:00
Rafael Bortolon Paulovic
45e679eeba
fix: use dsIndexProvider cache on schema migrations ( #115018 )
...
* fix: use dsIndexProvider cache on migrations
* chore: use same comment as before
2025-12-09 16:54:54 +01:00
Rafael Bortolon Paulovic
297e886e1b
fix: remove dsIndexProvider from Convert_V2alpha1_to_V0 ( #115017 )
2025-12-09 16:33:43 +01:00
Oscar Kilhed
dab64addf8
SchemaV2: Always set ad hoc filters to empty array when converting to v2 ( #114914 )
...
* Always set ad hoc filters to empty array when converting to v2
* Update test files
2025-12-08 11:27:55 +01:00
Austin Pond
8e11851bb0
Dashboards: Use the OpenAPI generated by app-sdk in the manifest to … ( #114858 )
2025-12-06 08:01:28 +00:00
e9ba45ca4f
Update grafana-app-sdk to v0.48.5 ( #114810 )
...
Co-authored-by: Owen Smallwood <owen.smallwood@grafana.com >
Co-authored-by: Ryan McKinley <ryantxu@gmail.com >
2025-12-06 07:34:18 +00:00
Ryan McKinley
5ac702a4c1
Dashboards: update manifest to avoid useoldmanifestkinds ( #114910 )
2025-12-05 16:21:30 +02:00
Ryan McKinley
75eb820c73
Folders: update manifest (avoid useoldmanifestkinds) ( #114827 )
2025-12-05 15:01:11 +03:00
Roberto Jiménez Sánchez
e5259c2ad4
Dashboards: Prevent memory leak in CUE validation by reusing context only for 100 validations ( #114818 )
...
* fix(dashboard): prevent memory leak in CUE validation by using fresh contexts
Fixes #114344
The CUE validation was reusing a single cue.Context across all
validations, which caused unbounded memory growth due to CUE's internal
caching of intermediate computation results (disjunctions, unifications,
etc.).
Root Cause:
- A single cue.Context was created and reused via getValidator()
- Each validation added entries to the context's internal caches
- These caches grew unboundedly over time
- Memory could not be garbage collected because the context held references
Solution:
- Store the schema source string instead of a compiled cue.Value
- Create a fresh cuecontext.New() for each validation
- This allows the context and its caches to be garbage collected after
each validation completes
Performance Impact:
- ~2x slower due to schema recompilation per validation
- Acceptable trade-off to prevent memory leaks
- Memory usage stays bounded instead of growing unboundedly
* fix(dashboard): use periodic context recreation to prevent CUE memory leaks
Replace fresh context creation with periodic context recreation approach.
The context is reused for up to 100 validations, then recreated to allow
garbage collection of cached values while maintaining good performance.
This balances performance (only 19% slower than leaky approach) with memory
safety (stable at ~5 MB vs ~2 GB leak).
See https://github.com/grafana/grafana/issues/114344#issuecomment-3605562491
* refactor(cuevalidator): simplify to use mutex instead of atomic counter
Since CUE is not thread-safe, we need the mutex for the entire validation
operation anyway. Using a regular int counter protected by the mutex is
simpler and cleaner than using atomic operations.
2025-12-04 16:05:15 +01:00
Dominik Prokop
1ba57a505a
v1 to v2 conversion: Fix issue when Grafana datasource wouldn't be resolved correctly ( #114779 )
...
* Reapply "v1 to v2 conversion: Fix issue when Grafana datasource wouldn't be resolved correctly (#114555 )"
This reverts commit db9cff8e2d .
* Update input and fix the failing test
2025-12-04 09:23:45 +01:00
Ivan Ortega Alba and Stephanie Hingtgen
c8853f50cf
Dashboard migration: Implement v2 to v0 conversions ( #114812 )
...
* Update docs
* Remove 406 response since now it is converted
* fix linter
---------
Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com >
2025-12-04 05:08:03 +00:00
Dominik Prokop and Haris Rozajac
bb787a2637
Schema v2: Move annotation mappings out of legacyOptions ( #114721 )
...
* Add mappings property to v2(alpha/beta)1
* Mappings convetions
* OpenAPI spec
* fe annotaations mapping
* Update snapshots
* v2->v1 conversion
* fix tests
---------
Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com >
2025-12-03 10:19:21 +01:00
Matheus Macabu
3e50bfced8
Dependencies: Bump Go to v1.25.5 ( #114749 )
2025-12-03 10:18:31 +01:00
Steve Simpson
2673da03d9
Alerting: Update grafana/alerting ( #114733 )
2025-12-03 00:18:51 +01:00
Ezequiel Victorero
227b596a46
Snapshots: Migrate API as dashboards k8s subresource ( #113552 )
2025-12-02 16:26:45 -03:00
Dominik Prokop
2ef211fe96
Revert "v1 to v2 conversion: Fix issue when Grafana datasource wouldn't be resolved correctly ( #114555 ) ( #114725 )
...
Revert "v1 to v2 conversion: Fix issue when Grafana datasource wouldn't be resolved correctly (#114555 )"
This reverts commit ac62070ac7 .
2025-12-02 19:07:11 +00:00
Dominik Prokop
ac62070ac7
v1 to v2 conversion: Fix issue when Grafana datasource wouldn't be resolved correctly ( #114555 )
2025-12-02 17:34:45 +00:00
Ivan Ortega Alba and Haris Rozajac
39d0dbeddc
Dashboard: Transform v2alpha1 to v1beta1 ( #114024 )
...
Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com >
2025-12-02 09:27:26 -07:00
Levente Balogh
0e6166a753
Dashboard Controls: Fix schema transformation for link placement ( #114630 )
...
* fix: add missing transformation for scenes -> save model v2
* fix: link placement transformation on the backend between schemas
* fix: update the openapi spec in the tests
* tes: add tests for `transformSceneToSaveModelSchemaV2`
* tests: extend conversion_test.go to cover link placements
2025-12-02 13:12:01 +00:00
Alexander Zobnin
ca9b24d435
Chore: Update OpenFGA to 1.11.1 ( #114685 )
...
* Chore: Update OpenFGA to 1.11.1
* fix testcontainers-go dependency error
* update workspaces
2025-12-02 12:46:17 +01:00
Ashley Harrison
2da171595a
FieldColor: Add accessible color palettes ( #114424 )
...
* add viridis and others, allow passing interpolator directly to FieldColorSchemeMode
* fix bug
* be more defensive when getting the fieldcolor
* backend changes
* add d3-scale-chromatic to list of esModules
2025-12-01 09:51:11 +00:00
Alexander Akhmetov
32c1ad1b53
chore: update grafana-app-sdk to v0.48.4 ( #114563 )
...
(chore): update grafana-app-sdk to v0.48.4
2025-11-28 18:20:57 +01:00
Levente Balogh and Ivan Ortega
930f7ce489
Dashboards: Cover the Switch variable in schema transformations - part 2. ( #114549 )
...
* feat: add v2alpha_1 conversion for the switch variable
* chore: gofmt fixes
* chore: update comments in tests
* chore: fix gofmt
* Update specs
* tests: update the v2alpha1 openapi snapshot
---------
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com >
2025-11-28 14:21:33 +01:00
Stephanie Hingtgen
235ebbf5c5
Dashboards: Prevent panic in validation ( #114436 )
2025-11-25 20:27:38 +00:00
Will Browne
5694d6371e
Plugins: Upgrade github.com/grafana/grafana-plugin-sdk-go v0.283.0 => v0.284.0 ( #114400 )
...
* upgraded github.com/grafana/grafana-plugin-sdk-go v0.283.0 => v0.284.0
* make update-workspace
* apply fixes
* nolint for FieldTypeNullableJSON instead
* fmt
* fix lint issues
2025-11-25 15:46:07 +00:00
Matheus Macabu
a2f14d7306
Dependencies: Bump golang.org/x/crypto to v0.45.0 ( #114384 )
2025-11-25 10:43:20 +01:00
Oscar Kilhed
e09905df35
SchemaV2: Add library panel repeat options to v2 schema during conversion ( #114109 )
...
* Add library panel repeat options to v2 schema during conversion
* use any instead of interface{}
* change to common.Unstructured instead of byte[] for model field
* Fix the tests and let the library panel behavior fetch repeat options in public and scripted dashboards
* fix library panel differences between backend and frontend conversion
2025-11-21 11:41:03 +01:00
dependabot[bot] and Zoltán Bedi
e6a4e6fa4e
deps(go): bump github.com/prometheus/common from 0.67.1 to 0.67.2 in /pkg/promlib ( #113145 )
...
* deps(go): bump github.com/prometheus/common in /pkg/promlib
Bumps [github.com/prometheus/common](https://github.com/prometheus/common ) from 0.67.1 to 0.67.2.
- [Release notes](https://github.com/prometheus/common/releases )
- [Changelog](https://github.com/prometheus/common/blob/main/CHANGELOG.md )
- [Commits](https://github.com/prometheus/common/compare/v0.67.1...v0.67.2 )
---
updated-dependencies:
- dependency-name: github.com/prometheus/common
dependency-version: 0.67.2
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
* deps(go): update github.com/prometheus/common to v0.67.3
---------
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com >
2025-11-20 12:50:38 +00:00
maicon
5754d7fbad
chore: bump authlib/types to v0.0.0-20251119142549-be091cf2f4d4 ( #114177 )
...
* chore: bump authlib/types to v0.0.0-20251119142549-be091cf2f4d4
Signed-off-by: Maicon Costa <maiconscosta@gmail.com >
* Update Go Workspace
Signed-off-by: Maicon Costa <maiconscosta@gmail.com >
* Stop supporting deprecated namespace format in TestExtendedJWT_Authenticate
Signed-off-by: Maicon Costa <maiconscosta@gmail.com >
* Update go mod
Signed-off-by: Maicon Costa <maiconscosta@gmail.com >
---------
Signed-off-by: Maicon Costa <maiconscosta@gmail.com >
2025-11-19 16:05:20 -08:00
Ivan Ortega Alba
40fb421556
Schema: Implement v2beta1 → v2alpha1 conversion ( #113876 )
2025-11-19 15:56:33 +01:00
Gábor Farkas
fc18c9315e
update grafana/gafana-plugin-sdk-go dependency, and adjusted code accordingly ( #113922 )
...
* update dependencies
* query: stop handling _timeRange
* fixed unit test
2025-11-19 12:44:13 +01:00
Will Browne
374cb1b163
Plugins: Bump plugin SDK version to v0.282.0 ( #114079 )
...
bump plugin SDK version to v0.282.0
2025-11-18 10:42:58 +00:00
Costa Alexoglou
faabe2e46d
feat: add library elements to dash service ( #114016 )
2025-11-18 09:21:05 +01:00
Ryan McKinley
d0fe342cfe
Chore: Update app-sdk and k8s.io ( #113998 )
2025-11-17 13:34:15 +03:00
Ryan McKinley
1ef7c68f53
Chore: use context rather than golang.org/x/net/context ( #114000 )
2025-11-17 12:53:44 +03:00
Jean-Philippe Quéméner
9dd8c85448
feat(dashboards): add ttl based caching for datasources ( #113999 )
2025-11-17 09:48:17 +01:00
Jean-Philippe Quéméner
64c61c6916
fix(dashboards): use index for schema migration datasource lookups ( #113911 )
2025-11-17 08:56:54 +01:00
Jean-Philippe Quéméner
a8dda428ce
fix(dashboard): proper check int size ( #113766 )
2025-11-12 15:35:38 +00:00
Jean-Philippe Quéméner
16ddd536ab
fix(dashboard): proper check uint32 size ( #113760 )
2025-11-12 14:55:59 +00:00
e463781077
Schema: convert dashboards from v1beta1 to v2beta1 ( #109037 )
...
- Implement full conversion pipeline from v1beta1 → v2beta1
- Ensure frontend–backend parity for all dashboard serialization paths
- Add automatic data loss detection for conversions (panels, queries, annotations, links, variables)
- Extract atomic conversion functions for v0 → v1beta1 → v2alpha1 → v2beta1
- Introduce conversion metrics and detailed logging for loss tracking
- Normalize datasource resolution, defaults, and annotation processing
- Improve panel layout serialization and y-coordinate normalization
- Fix inconsistencies in nested panels and collapsed row behavior
- Refine variable handling:
- Filter refId from variable query specs
- Default variable refresh to 'never' (matches frontend)
- Fix constant and interval variable handling for missing queries
- Unify schema defaults (enable, hide, iconColor, editable, liveNow)
- Fix pluginId usage (UID vs type) and datasource references
- Fix metrics.go bug swallowing errors (return nil → return err)
- Add tests for version-specific conversion error handling
- Add data loss detection tests using source/target version comparison
- Clean up lint issues, legacy code, and redundant files
- Update OpenAPI snapshots and migrated dashboards
- Improve backend migrator to reuse datasource provider and match frontend logic
Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com >
Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com >
Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com >
2025-11-12 11:43:46 +01:00
Galen Kistler and Leon Sorokin
8149f586b3
Annotations: Multi-lane annotations rendering (lane per frame) ( #111559 )
...
* feat: support multi-lane annotations panel option
---------
Co-authored-by: Leon Sorokin <leeoniya@gmail.com >
2025-11-05 09:00:28 -06:00
Stephanie Hingtgen and Matheus Macabu
4cecab3185
Dashboards: add isPublic to dto and remove public endpoint call ( #113334 )
...
---------
Co-authored-by: Matheus Macabu <macabu.matheus@gmail.com >
2025-11-04 16:57:05 -06:00
Paul Marbach
867e8bb98f
StatusHistory: Add e2e suite to confirm standard cases ( #113358 )
...
* StatusHistory: Add e2e suite to confirm standard cases
* update dev dashbord tests
* update CODEOWNERS
2025-11-04 16:21:30 -04:00
Levente Balogh
3c0409fe05
Dashboard Controls: Add annotations to the dashboard controls menu ( #112816 )
...
* feat: add a placement property to annotations model v2
* chore: update scenes to `v6.42.1`
* chore: run `make gen-apps`
* fix: cater for cases when there is no data layer
* chore: swagger clean
* chore: update api clients
* fix: correct type guard
* fix: display control labels in the default renderer as well for DashboardDataLayerSet
2025-11-03 11:33:44 +01:00
Paul Marbach
64da716a2e
Heatmap: Fix runtime error when no data is present, add e2e test ( #113242 )
...
* Heatmap: Fix runtime error when no xAxis is present, add e2e test
* update migration test fixture
* updates from review
2025-10-31 18:17:30 +00:00
Ryan McKinley
53aed34652
LibraryPanels: Support CRUD via apiserver ( #113035 )
2025-10-31 08:14:38 +03:00
Paul Marbach
c487952279
Table: Support DataLinks and Actions in SparklineCell ( #112244 )
...
* Table: Support DataLinks in SparklineCell
* add data links to sparkline gdev
* fix migrator test
* Clean up single action use case
2025-10-30 10:04:08 -04:00
Costa Alexoglou
bbfb8268d1
Provisioning: concurrent deletes in finalizers and 404 handling ( #113155 )
...
* fix: concurrent deletes in finalizers and 404 handling
* chore: feedback review
* fix: broken tests
2025-10-30 11:55:36 +01:00
Torkel Ödegaard and oscarkilhed
344fc5606f
PanelTimeCompare: Support saving time compare window ( #113150 )
...
* PanelTimeCompare: Support saving time compare window
* fix indentation
* Fix merge issue
* Update
* Update
* make gen-cue
---------
Co-authored-by: oscarkilhed <oscar.kilhed@grafana.com >
2025-10-30 10:50:05 +01:00
Paul Marbach
2a5ce2f031
Gauge: Fix migration version targeting and gdev dashboard ( #112974 )
2025-10-28 09:31:20 -04:00