Commit Graph

418 Commits

Author SHA1 Message Date
Stephanie Hingtgen
047c51be01 Provisioning: Do full sync on resync period when needed (#112144) 2025-10-08 05:25:57 -06:00
Matheus Macabu
69184b5027 Go: Update to 1.25.2 + golangci-lint v2.5.0 + golang.org/x/net v0.45.0 (#112149)
* Go: Update to 1.25.2

* golangci-lint: Update to 2.5.0

* Dependencies: Bump golang.org/x/net to v0.45.0
2025-10-08 12:35:28 +02:00
alerting-team[bot]
7fbd5441bf Alerting: Update alerting module to e642236ea9eb9ba49137c476b404666c98a15f67 (#112122)
[create-pull-request] automated change

Co-authored-by: yuri-tceretian <25988953+yuri-tceretian@users.noreply.github.com>
2025-10-07 16:40:47 +00:00
Yuri Tseretyan
7d1c6b6bd2 Alerting: Replace IntegrationConfig with IntegrationSchemaVersion (#112010)
* remove unused compat functions

* update to alerting module from pr

* replace IntegrationConfig with IntegrationSchemaVersion

* safely resolve a string into integration type

* change usages of integration config
2025-10-07 11:08:16 -04:00
Matheus Macabu
792853df91 Scopes: Move types to its own module (#111556) 2025-10-07 11:31:03 +02:00
Ryan McKinley
22b88988a4 Stars: include query history (#111979) 2025-10-06 21:08:10 +03:00
Dominik Prokop
825f8fc7ff Dashboard migrations: Fix span: 0 bug and panel ordering in v16 dashboard migration (#112051)
Fix span: 0 bug and panel ordering in v16 dashboard migration

Fix span: 0 handling to match frontend behavior by defaulting to DEFAULT_PANEL_SPAN.
Fix panel ordering issue by using stable sort instead of unstable sort.
Fix collapsed property handling to only set when input row has collapse property.
Add comprehensive test cases for span: 0 bug and collapsed property behavior.
Add sanitized test input file for span: 0 demo dashboard with generic values instead of internal Grafana infrastructure references.

All backend migration tests and frontend comparison tests pass.
2025-10-06 13:29:33 +02:00
Stephanie Hingtgen
d5d1851bc1 Provisioning: Cleanup folders properly with webhooks (#112031) 2025-10-04 21:17:42 +00:00
Ryan McKinley
2486dba881 Provisioning: use kind consistently for provisioning stats (#111977) 2025-10-04 09:02:02 -05:00
Austin Pond
99312a7582 Apps: Update grafana-app-sdk to v0.46.0 (#112021)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2025-10-04 09:33:10 +00:00
Costa Alexoglou
45fe8c6612 fix: version migration (#112022)
* fix: version migration

* fix: cyclomatic
2025-10-03 23:18:04 +02:00
Yuri Tseretyan
d0f79ee60d Alerting: Update alerting module + refactor (#111761)
* update alerting module
* replace compat with ones from alerting
* update type references Receiver and Integration to *Status
* update route in provisioning test that is invalid after recent change
* use right type for LINE ingtegration
2025-10-03 10:37:49 -04:00
Mihai Doarna
6d7c50f18d IAM: Refactor team bindings to store one pair of team and member (#111871)
* store one pair of team member in team bindings object

* generate queries for sql unit tests

* remove TeamBinding struct
2025-10-03 16:48:51 +03:00
Stephanie Hingtgen
3ce9137c19 Provisioning: Refactor to combine validation and test endpoint logic (#111965)
Provisioning: Refactor test endpoint
2025-10-03 01:16:37 -06:00
Ryan McKinley
13d9829836 Chore: Remove unused status element (#111963) 2025-10-02 20:15:39 +00:00
Stephanie Hingtgen
044407d9dc Provisioning: Allow configurable min interval (#111920) 2025-10-02 09:05:09 +03:00
Stephanie Hingtgen
6f0a8a344a Provisioning: Fix repos stuck in deletion (#111918) 2025-10-02 09:04:55 +03:00
Ryan McKinley
2f2289f226 Chore: Update authlib (foder as top level argument) (#111800) 2025-10-01 14:40:28 +00:00
Mihai Turdean
7be0c100b6 IAM Folder Reconciler - revert fetching latest folder info from the folder to improve perf (#111779) 2025-09-30 16:59:06 +00:00
Costa Alexoglou
1b766b9c9f Provisioning finalisers fix 2 (#111679)
* adding some logs to better understand what might be happening

* only focus this PR on improve logging in finalizer handling

* debug log before calling finalizers

* working on finalizers

* removing last todos, adding unit tests

* better use SupportedFinalizers name

* addressing comments

* wip: fix tests and add delete error in status

* chore: codegen

* chore: codegen openapi

* Merge remote-tracking branch 'origin/main' into provisioning-finalisers-fix-2

* update frontend client

* fix: errors in testing

* fix: breaking test

---------

Co-authored-by: Daniele Ferru <daniele.ferru@grafana.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2025-09-29 15:21:12 +02:00
Alexander Zobnin
893523dd7c grafana-iam: Wire RoleBindings APIs to OSS (#111728)
* Update role binding specs

* Wire role bindings APIs in OSS

* gofmt

* revert modules updates

* update specs

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>

* update registration

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>

* fix reader

* fix format

* add role bindings mapper

* remove namespace from subject spec

* fix formatting

* update api specs

* Fix role binding registration

* remove mapper

---------

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2025-09-29 14:28:12 +02:00
Ryan McKinley
c4a2bb5540 Search: Include managedBy in DashboardHit result (#111600) 2025-09-29 14:28:26 +03:00
Ivan Ortega Alba
6d2fa6c583 Dashboard: Backend always set metricEditorMode: 0 regardless metricQueryType and expression (#111613)
- Fix metricEditorMode logic to match frontend hasOwnProperty behavior
- Fix metricQueryType to only set when property doesn't exist
- Fix statistics processing to handle all types like frontend does
- Fix null statistic handling to match frontend behavior
- Fix object string representation to match JavaScript behavior
- Add comprehensive test coverage for all CloudWatch migration scenarios
- Achieve 100% backend-frontend consistency for v34 migration

* Fix v34 CloudWatch migration backend-frontend inconsistencies

- Fix metricEditorMode logic to match frontend hasOwnProperty behavior
- Fix metricQueryType to only set when property doesn't exist
- Fix statistics processing to handle all types like frontend does
- Fix null statistic handling to match frontend behavior
- Fix object string representation to match JavaScript behavior
- Add comprehensive test coverage for all CloudWatch migration scenarios
- Achieve 100% backend-frontend consistency for v34 migration

* Improve v34 CloudWatch migration test coverage

- Add targeted tests for hasOwnProperty logic coverage
- Add comprehensive getSuffixForStat coverage (all data types)
- Add generateNextRefId double letter generation tests
- Simplify test cases while maintaining full coverage
- Achieve 93%+ coverage on all critical v34 functions
- Remove redundant test cases for better maintainability

* Clean up v34 CloudWatch migration code

- Remove unnecessary comments and documentation
- Simplify function signatures and logic
- Maintain functionality while improving readability
- Keep essential logic intact with cleaner code

* Only remove unnecessary comments
2025-09-29 11:35:58 +02:00
Ryan McKinley
82bcfba64b Preferences: refactor experimental apiserver and improve tests (#111596) 2025-09-26 19:44:02 +00:00
Andres Martinez Gotor
c61a8a16fd Advisor: Retry before patching objects (#111665) 2025-09-26 15:47:30 +02:00
Yuri Tseretyan
b8f23eacd4 Alerting: Migrate to integration schema (#111643)
* update tests to assert against snapshot
* remove channel_config package replaced by schemas from alerting module
* update  references to use new schema
2025-09-26 09:31:50 -04:00
Mihai Turdean
2f5aacdb5d Update IAM Folder Reconciler local dev environment to include tools for profiling the operator. (#111641)
Update local dev setup to allow for profiling of the operator
2025-09-25 14:34:49 -06:00
Yuri Tseretyan
24c10b4fb9 Alerting: Remove usages of ReceiverType (#111508)
* remove usages of ReceiverType
2025-09-25 16:09:54 -04:00
Costa Alexoglou
31ae013e8d chore: add validations to test endpoint (#111622)
* chore: add validations to test endpoint

* Validate path

---------

Co-authored-by: Clarity-89 <homes89@ukr.net>
2025-09-25 15:10:13 +00:00
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