356 Commits

Author SHA1 Message Date
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
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
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
842ae463b7 Chore: update otel v1.37.0 to v1.38.0 (#110985) 2025-09-12 10:11:56 +00:00
6b2b949f8f Provisioning: check finalizers when validating Repository object (#110955) 2025-09-11 21:38:41 -05:00
ac13da2d1d Use concurrent informer for iam-folder-reconciler (#110987) 2025-09-11 15:57:07 -05:00
9a54243f09 Chore: update golang.org/x/exp (#110980) 2025-09-11 22:13:07 +03:00
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
03abe18bb2 Instrument IAM Folder Operator with Tracing (#110923) 2025-09-11 15:21:44 +00:00
941a75964f fix: auhtz grpc client no org id issue (#110952) 2025-09-11 14:02:56 +00:00
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
b8b85fbf47 fix: add intrumentation for auth server grpc client (#110875) 2025-09-10 17:33:21 +02:00
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
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
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
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
323738d191 Provisioning: Fix check of who can update (#110835) 2025-09-10 09:04:10 +03:00
8805e93b1d Provisioning: Add better nil check (#110847) 2025-09-09 18:23:11 -05:00
acbc2cf01a Provisioning: Configurable Repository Types in monolith and operators (#110822)
* Configurable repository types in monolith and operator

* Default to Github in operators

* Regenerate wire

* Fix and implement unit tests

* Same types for enterprise tests

* Remove unnecessary conversion

* Remove the issue with import cycles
2025-09-09 19:13:22 +02:00
badea8bc37 IAM: Create Service Account API and legacy store impl (#110411)
* wip

* IAM: Create Service Account

* Add dual writer

* Update openapi_test.go

* Add integration tests

* Add sql tests

* Add Role to SA spec, add validation, add DBTime, add tests

* Format, update test

* Fixes

* Add check for External

* Address feedback

* Update tests

* Address feedback

* make gen-go

* Simplify a bit

* Fixes

* make update-workspace

* Update pkg/registry/apis/iam/serviceaccount/store.go

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>

* Address feedback, add test for generateName

---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2025-09-08 14:31:32 +02:00
d09708fe55 Move SkipIntegrationTestInShortMode to testutil. (#110750)
* Move SkipIntegrationTestInShortMode to testutil.

* make update-workspace
2025-09-08 12:50:31 +02:00
2f558e8cb7 Grafana Schema: Extend the VariableHide enum (#110579)
* feat: extend the `VariableHide` enum with a new option

* feat: extend the `VariableHide` for v1
2025-09-08 09:08:09 +02:00
76f7836419 Provisioning: correctly use resource clients in controllers (#110737)
* Provisioning: correctly use resource clients in controllers

* better names on fields

* fix struct initialisation

* updating roundtripper tests
2025-09-06 18:13:39 -06:00
62cc0f9c0e Udate IAM Folder Reconciler Operator config (#110728) 2025-09-05 22:56:23 +00:00
02227855e8 Authz: propagate folder changes to Zanzana (#110599)
* wire sync hooks for folder create/update

* cleanup

* add hook tests

* fix nil context

* better context
2025-09-05 10:46:30 -05:00
b4e63c36c3 Migration v42: HideFrom tooltip consistency migration (#110517)
* Migration to be verified: v42 HideFrom tooltip migration

* snap update

* make gen cue

* Add comments of 42 being the final version
2025-09-05 15:07:30 +02:00
9ddc70423b Provisioning: Cleanup tester interface (#110640)
* Provisioning: Cleanup tester interface

* undo accidental change

* cleanup

* cleanup test
2025-09-05 07:47:27 +02:00
b567cde3d3 Provisioning: Reuse controller from registry (#110639) 2025-09-05 01:13:55 +00:00
f1dffca140 IAM Folder Reconciler: Make operator available as a target when running the grafana binary. (#110567) 2025-09-04 08:22:17 -06:00
000ada4cd1 Alerting: Fix alert enrichment API plural schema name (#110593) 2025-09-04 16:18:03 +02:00
8052ecb3ba Dashboards: Remove panel plugin provider from migrations (#110477) 2025-09-04 14:17:22 +03:00
3d009ff7ed Provisioning: Build and use repository factory in repository controller (#110585)
Build and use repository factory
2025-09-04 13:12:56 +02:00
7d630ec3b1 Provisioning: Refactor tweaks to support MT controllers (#110581)
* Refactor common code to support MT controllers

* Delete original status files
2025-09-04 10:06:50 +00:00
c9707a7463 Alerting: Bump alertenrichment API version to v1beta1 (#110466) 2025-09-04 09:32:29 +02:00
6c9faa7595 TableNG: Footer enhancements (#102948)
* Table: Footer support for multiple reducers

* fix migrator test output due to required default value

* fix go migration test

* more go test fixes

* fix go tests for footer

* Merge #110062

* update migration dashboard

* Small docs fixes

* Small docs fix

* remove migration method in Go, update js unit test

* add migration dashboard for footer and clean up some issues with countAll

* Footer should always use og rows for calcs

* update footer to be unaffected by filtering and sorting

* more e2es

* add more complex footer to kitchen sink, migrate panel all the way up

* update codeowners for e2e

* relocate footer migration panels and e2es to main 12.2 migration dashboard

* go further with the migration; kill unused fields, rename reducer to reducers

* get the go code up to date, move enablePagination to its own option as well

* add a unit to one of the numeric columns with a footer in kitchen sink

* fix reducers override in kitchen sink migration table

---------

Co-authored-by: Paul Marbach <paul.marbach@grafana.com>
Co-authored-by: Isabel Matwawana <isabel.matwawana@grafana.com>
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2025-09-03 18:03:33 -04:00
ae97eb860c Alerting: Update alerting module to 24567882c5d1ec33212a63405d4a383c1703e6f6 (#110562)
---------

Co-authored-by: yuri-tceretian <25988953+yuri-tceretian@users.noreply.github.com>
Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
2025-09-03 21:36:43 +00:00
3d2cef5f07 feat: provides MT Dashboard service (#110447) 2025-09-03 20:41:37 +00:00
84ae9ea71b Provisioning: Add scaffolding for repo controller (#110543) 2025-09-03 17:30:41 +00:00
f13c3b38ea Advisor: Avoid write if checktype exists (#110340) 2025-09-03 09:54:49 +02:00
fdac98cdda ShortURL: Avoid teris-io/shortid (#110456) 2025-09-02 17:01:20 +00:00
9d9f464679 Alerting: Add alertenrichment API types (#110396) 2025-09-02 13:33:54 +02:00
4045da21e0 Provisioning: Bump secret dependency version (#110440) 2025-09-02 10:09:14 +00:00
1e926a29c0 Secrets: Extract external facing decrypt types to apps (#110432) 2025-09-02 10:30:29 +02:00
4eadc823a9 Provisioning: Move repository package to provisioning app (#110228)
* Move repository package to apps

* Move operators to grafana/grafana

* Go mod tidy

* Own package by git sync team for now

* Merged

* Do not use settings in local extra

* Remove dependency on webhook extra

* Hack to work around issue with secure contracts

* Sync Go modules

* Revert "Move operators to grafana/grafana"

This reverts commit 9f19b30a2e244191a8bfb05e4f164be5e2c68668.
2025-09-02 09:45:44 +02:00
4de9ec7310 Provisioning: Fix import cycle between grafana and provisioning app (#110406)
* Move operators to grafana/grafana

* Go mod tidy
2025-09-01 13:29:34 +00:00
7324087273 Dashboard migration: v14 Broken dash repro (#110405)
* Broken dash repro

* Fix V16 migration to preserve panels when rows array is empty

- Fixed bug where panels were deleted when migrating dashboards with empty rows array
- Updated v16.go to match frontend implementation behavior
- Added test case for empty rows scenario in v16_test.go
- Renamed test files to v16.empty-rows-and-panels-array.json for clarity
- All migration tests passing (419 test cases)
2025-09-01 13:02:59 +00:00
232d68fb8c Controllers: Make available as a target (#110357)
* Controllers: Add to build process
* Allow setting through env variables
2025-08-30 12:27:50 +02:00
398ed84a60 Dashboard migration: Add missing metrics registration (#110178) 2025-08-29 18:37:39 -06:00
a746f6e121 Dashboards: Make it possible to render variables under a drop-down (#109225)
* feat: extend the variable models

* test(DropDownVariableControls): add tests

* refactor(VariableControls): filter in the render method
2025-08-29 12:56:26 +00:00
15fab1cb99 Alerting: Update integration schema to support versions (#109969)
* add VersionedNotifierPlugin and method that converts NotifierPlugin to it

* return new schema if query parameter version=2

* add version to k8s model of integration

* fix open api snapshot

* add version to IntegrationConfig

* use current version on conversion

* create versioned integrations for test
2025-08-28 14:46:30 -04:00