Commit Graph

389 Commits

Author SHA1 Message Date
Alexander Akhmetov
89b988ca55 Alerting: Add Assistant enrichment type (#111592) 2025-09-25 14:16:31 +02:00
Charandas
64c700e563 Provisioning: kind name should be singular (#111570) 2025-09-24 15:25:41 -07:00
Costa Alexoglou
0c0554da5e fix: avoid child paths in repositories (#111573)
* fix: avoid child paths in repositories

* add another unit test; fix linter

* Update pkg/registry/apis/provisioning/register.go

* skip itself

* fix: failing tests

---------

Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
2025-09-24 21:35:06 +00:00
Ryan McKinley
a4dabc31ed Folders: let unified storage handle authorization (#110825) 2025-09-24 16:26:47 +03:00
Igor Suleymanov
7aed0da22c Add a CI step for checking app SDK codegen status (#111528)
* Add a CI step for checking app SDK codegen status

What

This commit adds a CI step for checking the status of code generated
with Grafana App SDK. The step fails if there is a git diff as a result
of the codegen step.

It also updates generated code to make sure we're starting from a
correct state.

Why

This ensures that when the schemas or the SDK version are updated, the
codegen mismatch is caught early at the PR stage.

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>

* Format generated code

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>

---------

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
2025-09-24 15:37:57 +03:00
Ivan Ortega Alba
a72e02f88a Fix dashboard migration discrepancies between backend and frontend implementations (use toEqual) (#110268)
**Highlights**

* **Single-version migrations**: add `targetVersion` to migrator & model, separate outputs, enforce exact version.
* **Datasource fixes**: include `apiVersion` in tests, empty-string → `{}`, preserve `{}` refs, drop unwanted defaults.
* **Panel defaults & nesting**: only top-level panels get defaults; preserve empty `transformations` context-aware; filter repeated panels.

* **Migration parity**

  * V16: collapsed rows, grid height parsing (`px`).
  * V17: omit `maxPerRow` when `minSpan=1`.
  * V19–V20: cleanup defaults (`targetBlank`, style).
  * V23–V24: template vars + table panel consistency.
  * V28: full singlestat/stat parity, mappings & color.
  * V30–V36: threshold logic, empty refs, nested targets.
* **Save-model cleanup**: replicate frontend defaults/filtering, drop null IDs, metadata, unused props.
* **Testing**: unified suites, dev dashboards (v42), full unit coverage for major migrations.

Co-authored-by: Ivan Ortega [ivanortegaalba@gmail.com](mailto:ivanortegaalba@gmail.com)
Co-authored-by: Dominik Prokop [dominik.prokop@grafana.com](mailto:dominik.prokop@grafana.com)
2025-09-24 12:20:25 +02:00
Yuri Tseretyan
896a56ada8 Migrate Alerting Notifications API to app installer (#109309)
* migrate to new manifest format
* rename app to alerting.notifications to not conflict with rules
* disable custom field selectors as they are not supported in appinstaller
2025-09-23 09:42:40 -04:00
Stephanie Hingtgen
8b1caccc72 Provisioning: Add metrics for repo controller (#111450) 2025-09-22 20:14:03 +00:00
Stephanie Hingtgen
bd550d2f06 Provisioning: Wire up prometheus (#111444) 2025-09-22 09:54:50 -05:00
dependabot[bot]
a8e900ed9b Bump github.com/google/wire from 0.6.0 to 0.7.0 (#111281)
* Bump github.com/google/wire from 0.6.0 to 0.7.0

Bumps [github.com/google/wire](https://github.com/google/wire) from 0.6.0 to 0.7.0.
- [Release notes](https://github.com/google/wire/releases)
- [Commits](https://github.com/google/wire/compare/v0.6.0...v0.7.0)

---
updated-dependencies:
- dependency-name: github.com/google/wire
  dependency-version: 0.7.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* update wire

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2025-09-21 15:36:24 +00:00
Stephanie Hingtgen
15ee224da5 Provisioning: Allow disabling of image rendering instance wide (#111359) 2025-09-19 12:40:14 +03:00
Misi
c012a95fa1 IAM: Add role to User (#111256)
* codegen fix

* Return user role from the legacy store

* Lint

* Add tests, gen openapi

* make generate

* revert go.mod, go.sum, go.work.sum changes

* Update go.mod and go.sum
2025-09-19 11:12:00 +02:00
Cory Forseth
b8f5effd85 Feat/add zanzana apiserver args (#111278)
* initialize permissionstore if ignoring legacy storage

* pass through feature toggles

* extract repeated logic to method

* remove extra TODOs

* workspace
2025-09-18 16:17:05 -05:00
Stephanie Hingtgen
cb11bc15fa Provisioning: Allow disabling of instance sync (#111270)
---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2025-09-18 10:40:02 -05:00
Mihai Turdean
aaa8094a53 Add more metrics to the IAM Folder Reconciler (#111275)
* Add more metrics to the operator

* Add namespace when logging metrics

* Skip flaky test
2025-09-18 09:03:32 -06:00
Alexander Zobnin
72d212c5f9 Authlib: Update authz client to use zookies (#111291)
* Authlib: Update authz client to use zookies

* fix zookie return

* fix linter
2025-09-18 16:24:22 +02:00
Haris Rozajac
0aa5dee86a Dashboard Migrations: Report metrics when migration fails (#111212)
* return migration error when running a conversionFunc

* fix tests
2025-09-18 08:11:15 -06:00
Levente Balogh
9d822646dd Dashboards: Remove the showInControlsMenu prop from the variable models (#111287)
* refactor: remove the `showInControlsMenu` prop from variable models

* fix: remove property from generated openapi
2025-09-18 13:16:30 +00:00
Mihai Doarna
9d9dca3208 IAM: Adds the team creation endpoint in app platform (#111003)
* implement team creation for legacy store

* add generated code

* add basic integration test

* add new fields to get and list teams

* fix sql tests for teams

* register dual writer for team resource

* add generated code

* add more sql tests for team creation

* address feedback

* add integration tests
2025-09-18 14:43:07 +03:00
Kristina
a6db37c2b7 Correlations: Create first version of correlations on app platform (#110843)
* WIP

* Generate API

* use different logging, change typing as recommended

* Add feature flag and only add to installer when enabled

* add codeowner

* Lint/fmt

* fix dockerfile

* move from UID to group/name reference

* add generated code

* change from enterprise build

* build workspace

* Remove deprecated field, build api, build for enterprise, build workspace

* Not sure what caused this..

* Rebuild?

* Fix this file

* update sdk

* update sdk

* fix workspace

* fix test build

* add to go.mod

---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2025-09-17 08:07:45 -05:00
Costa Alexoglou
0248a393d7 fix: dashboard upsert with empty ref (#111190)
* fix: dashboard upsert with empty ref

* chore: cleanup

* fix: branches in other git providers and linter
2025-09-17 11:49:15 +02:00
Stephanie Hingtgen
c85776614e App sdk: Update to v0.45.0 (#111222) 2025-09-17 09:03:30 +03:00
Alex Khomenko
571b3226ba Dashboard search: Return description in search results (#110857)
* DashList: Add description

* Support unified storage

* Support unified storage[2]

* Exclude description from field

* Cleanup

* add description

* Revert dashlist changes

* Update cue

* Fix test

---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2025-09-16 18:17:22 +03:00
Yuri Tseretyan
356521c9b9 Alerting: Annotation CanUse for receiver resource (#110839)
* add origin to receiver
* populate origin of the receiver
* set CanUse to false if origin is not Grafana
* set provenance if origin is imported
* set Grafana origin by default in conversion API
* set canUse annotation
* reject update\delete operations on resources with origin other than Grafana
* fail to create with wrong origin
2025-09-16 09:32:04 -04:00
Jo
321c3f8ec1 Authorization: update OpenFGA (#111094)
update openfga to v1.10
2025-09-16 13:23:46 +02:00
Ryan McKinley
0a79b3bdc5 Chore: Upgrade k8s.io/api v0.34.1 and grafana-app-sdk v0.43.1 (#111009) 2025-09-16 13:35:20 +03:00
Alexander Zobnin
38e5298807 Authz: Skip cache in List request if option provided (#110864)
* Authz: Skip cache in List request if option provided

* return timestamp with list response

* update authlib

* add skipCache option test

* refactor

* fix tests

* update workspaces

* Set zookies depending on cache hit

* update workspaces

* Fix nil pointer
2025-09-16 11:27:07 +02:00
Will Browne
b154763d04 Chore: Bump prometheus/client_golang to v1.23.2 (#111123)
bump prometheus/client_golang to v1.23.2
2025-09-16 09:26:50 +01:00
Bruno
c61624ad3c Query caching: add request deduplication middleware (#110892)
* secrets: update test to accept []byte(nil) and []byte{} (#110630)

Co-authored-by: Matheus Macabu <macabu.matheus@gmail.com>

* Query caching: add request deduplication middleware

* log error if unable to build cache key

* remove TODO

* always use req.PluginContext.DataSourceInstanceSettings.UID

* make update-workspace

---------

Co-authored-by: Matheus Macabu <macabu.matheus@gmail.com>
2025-09-15 12:07:47 -03:00
Ryan McKinley
a5bd313f5a ShortURL: Implement /goto with a sub-resource (#110972) 2025-09-15 16:56:20 +03:00
Will Browne
2df39fc71a Plugins: Add metrics for fs + cloud provisioning info (#111030)
* add new metrics for plugin fs + cloud provisioning

* fix test

* update label
2025-09-15 14:54:16 +01:00
Alexander Zobnin
294fd943c0 Chore: Update authlib (#110880)
* Chore: Update authlib

* exclude incompatible version of github.com/grafana/gomemcache

* Update go-jose to v4

* fix jose imports

* remove jose v3 from go.mod

* fix tests

* fix serialize

* fix failing live tests

* add v1 of ES256 testkeys. Port tests to use ES256 instead of HS256

* accept more signature algs for okta and azuread

* azure social graph token sig

* accept more signature algs for oauth refresh and jwt auth

* update workspace

* add a static signer for inproc

* rebase and fix ext_jwt

* fix jwt tests

* apply alex patch on gomemcache

* update linting

* fix ext_jwt panic

* update workspaces

---------

Co-authored-by: Jo Garnier <git@jguer.space>
2025-09-15 12:45:15 +02:00
Ryan McKinley
afc08dbbbc Chore: go.mod updates (#110957) 2025-09-15 09:01:45 +00:00
Moustafa Baiou
cb7abbaa0f Alerting: Rename expression elements of Rules APIs (#110914)
This renames `data` to `expressions` for clarity in the rules apis.

Also makes certain fields that are redundant optional in the case of pure expressions, so that users don't have to specify them when they are not needed (e.g. not datasource queries).
2025-09-12 22:15:55 +00:00
Haris Rozajac
de01b3e209 Dashboard Schema V2: Support panel actions (#110842)
* support panel actions

* refactor

* add test; move action transformer to utils

* refactor so v2 headers and queryParams are just a simple record

* update open api

* update actions to be same shape accross all dashboard schemas and add validation on the backend

* cleanup

* update snapshot

* add tests to validation
2025-09-12 11:31:05 -06:00
Daniele Stefano Ferru
1f7afc6b6a Provisioning: add unit and integration tests for finalizer validation (#111012)
* Add unit testS

* add integration tests
2025-09-12 13:57:31 +02:00
Ryan McKinley
842ae463b7 Chore: update otel v1.37.0 to v1.38.0 (#110985) 2025-09-12 10:11:56 +00:00
Daniele Stefano Ferru
6b2b949f8f Provisioning: check finalizers when validating Repository object (#110955) 2025-09-11 21:38:41 -05:00
Mihai Turdean
ac13da2d1d Use concurrent informer for iam-folder-reconciler (#110987) 2025-09-11 15:57:07 -05:00
Ryan McKinley
9a54243f09 Chore: update golang.org/x/exp (#110980) 2025-09-11 22:13:07 +03:00
Gabriel MABILLE
aecc2c9fe7 grafana-iam: init mt resourcepermission apis (#110821)
* Init mt resource permissions

* Few fixes for the mt service to work

* Refactor NewAPIService to take the provider and enabledapis
2025-09-11 17:46:29 +02:00
Mihai Turdean
03abe18bb2 Instrument IAM Folder Operator with Tracing (#110923) 2025-09-11 15:21:44 +00:00
Mustafa Sencer Özcan
941a75964f fix: auhtz grpc client no org id issue (#110952) 2025-09-11 14:02:56 +00:00
Levente Balogh
273731ed8e Dashboard Controls: Allow displaying dashboard links (#110666)
* feat: add `placement` to dashboard links (v1)

* feat: add `placement` property for dashboard links (v2)

* refactor: rename the `DropdownVariableControls` to `DashboardControlsMenu`

* feat: make it possible to render links under the dashboard controls dropdown

* fix: update the v2beta1 (and remove changes from v2alpha1)

* fix: linting errors

* chore: update codegen

* fix: frontend unit tests

* tests(DashboardLinkRenderer): add tests

* fix: hide divider if not necessary

* Update apps/dashboard/pkg/apis/dashboard/v1beta1/dashboard_kind.cue

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>

* Update packages/grafana-schema/src/raw/dashboard/x/dashboard_types.gen.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update kinds/dashboard/dashboard_kind.cue

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update pkg/kinds/dashboard/dashboard_spec_gen.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update apps/dashboard/pkg/apis/dashboard/v2beta1/zz_generated.openapi.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update apps/dashboard/pkg/apis/dashboard/v2beta1/dashboard_spec_gen.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update apps/dashboard/pkg/apis/dashboard/v2beta1/dashboard_spec.cue

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update packages/grafana-schema/src/schema/dashboard/v2beta1/types.spec.gen.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update apps/dashboard/kinds/v2beta1/dashboard_spec.cue

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* feat: remove "default" placement option for links (review note)

* feat: hide the <Stack> wrapper if there are no links or variables

---------

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-11 13:16:46 +02:00
Mustafa Sencer Özcan
b8b85fbf47 fix: add intrumentation for auth server grpc client (#110875) 2025-09-10 17:33:21 +02:00
Moustafa Baiou
ca8324e62a Alerting: Add support for alpha rules apis in legacy storage
Rules created in the new api makes the rule have no group in the database, but the rule is returned in the old group api with a sentinel group name formatted with the rule uid for compatiblity with the old api.
This makes the UI continue to work with the rules without a group, and the ruler will continue to work with the rules without a group.

Rules are not allowed to be created in the provisioning api with a NoGroup sentinel mask, but NoGroup rules can be manipulated through both the new and old apis.

Co-authored-by: William Wernert <william.wernert@grafana.com>
2025-09-10 09:30:56 -04:00
Moustafa Baiou
0a85a30642 Alerting: Define rules.alerting.grafana.app/v0alpha1 AlertRule and RecordingRule
The first version of the app platform apis for alerting rules, including AlertRule and RecordingRule definitions.

Co-authored-by: William Wernert <william.wernert@grafana.com>
2025-09-10 09:30:56 -04:00
Roberto Jiménez Sánchez
09ef9c8176 Provisioning: Remove again dependency cycle between provisioning app and grafana (#110863)
* Remove dependency cycle between provisioning app and grafana

* Format code

* Fix linting
2025-09-10 14:40:44 +02:00
Will Browne
0a7e0e5298 Plugins: Add ability to run backend plugins in containers (#110534)
* add client cfg for containers

* remove unused code

* add field for skip host env for proto client

* add docker to Swagger ignore

* add to enterprise swagger gen

* undo go.mod changes

* pass container image

* propagate container image field
2025-09-10 11:12:23 +01:00
Stephanie Hingtgen
323738d191 Provisioning: Fix check of who can update (#110835) 2025-09-10 09:04:10 +03:00