Commit Graph

482 Commits

Author SHA1 Message Date
Andreas Christou f5457c7909
InfluxDB: Update feature toggle retrieval (#110941)
* Update how feature toggles are retrieved

* Update wire

* Update Influx registration

* Update test
2025-09-11 19:19:10 +01:00
Todd Treece 191ddb127a
Background Services: Lifecycle o11y (#110570) 2025-09-10 14:33:03 -04:00
Andreas Christou d3c0980c84
Graphite: Decouple from core Grafana (#110294)
* Add lint rules

* Backend decoupling

- Add standalone files
- Add graphite query type
- Add logger to Service
- Create logger in the ProvideService method
- Use a pointer for the HTTP client provider
- Update logger usage everywhere
- Update tracer type
- Replace simplejson with json
- Add dummy CallResource and CheckHealth methods
- Update tests

* Update ConfigEditor imports

* Update types imports

* Update datasource

- Switch to using semver package
- Update imports

* Update store imports

* Update helper imports and notification creation

* Update context import

* Update version numbers and logic

* Copy array_move from core

* Test updates

* Add required files and update plugin.json

* Update core references and packages

* Remove commented code

* Update wire

* Lint

* Fix import

* Copy null type

* More lint

* Update snapshot

* Add tests

* Review

* Fix packages
2025-09-10 18:48:29 +01: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
Todd Treece 7c242eeaef
Background Services: Add wrapper to support startup order (#110225) 2025-09-10 09:06:25 +01:00
Roberto Jiménez Sánchez 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
Andre Pereira d26c6c112a
Tempo: Migrates tags and tag values to datasource backend CallResource requests (#110511)
* Move tags and tag values request to datasource backend

* Remove outdated test

* Fix tests

* lint

* Refactor to use handlers for CallResource request

* lint

* Fix nit
2025-09-09 17:31:32 +01:00
Daniele Stefano Ferru 76976ef648
Provisioning: add webhook support in API Server and Operator (#110673)
* Provisioning: add webhook support in API Server

* updating Extra interface

* adding extra with workers interface

* reverting extraWithWorkers in RegisterAPIService

* adding extra job worker provider

* adding new extra job provider

* Wire things differently

* Remove unused GetJobs

* Pass url variable as string

* Support webhooks in controller

* Fix condition

* Change the naming

---------

Co-authored-by: Roberto Jimenez Sanchez <roberto.jimenez@grafana.com>
2025-09-08 19:39:05 +02:00
Ryan McKinley 7c95d3c8a9
Folders: Split legacy out of folder.Service (and remove folder.FolderStore) (#110734) 2025-09-08 18:27:49 +03:00
Andrew Hackmann 854a8f7e70
Prometheus data source: Remove migration background service (#110764)
Prometheus data source: remove mig bg service
:
2025-09-08 14:55:05 +00:00
Peter Štibraný 7fd9ab9481
Replace check for integration tests. (#110707)
* Replace check for integration tests.
* Revert changes in pkg/tsdb/mysql packages.
* Fix formatting of few tests.
2025-09-08 15:49:49 +02:00
Ryan McKinley 6f3d2106c0
Chore/Folders: Add authlib client to wire and cleanup (#110683) 2025-09-06 12:14:09 +03:00
Andrew Hackmann 9445328a59
Prometheus data source: Migration service (#107364)
* copying from secrets migration

* service runs and mig promds type

* creating data source check

* adding aws

* split into azure/aws service. feature flag. auto install

* add tests

* clean up

* lint

* add code owner

* imporvments from andres

* remove prom mig from http_server

* remove interface for testing

* add prom mig to provisining data sources so prov happens before mig

* fit into prov

* comment

* log debug instead of returning in update type

* Trigger Build

* feature flag being weird

* not public method

* copying from secrets migration

* service runs and mig promds type

* creating data source check

* adding aws

* add tests

* clean up

* imporvments from andres

* remove prom mig from http_server

* remove interface for testing

* add prom mig to provisining data sources so prov happens before mig

* fit into prov

* Trigger Build

* not public method

* remove logger import
2025-09-05 15:07:06 -05:00
Cory Forseth 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
Ryan McKinley 4723d2d8de
Stars: implement full CRUD operations via legacy service (#110489) 2025-09-04 14:49:49 -05:00
Igor Suleymanov a07a8d0ba2
Fix listing and getting dashboard versions across different API versions (#109860)
* Fix listing and getting dashboard versions across different API versions

What

This commit updates dashboard version service to use API version aware
API client. The service now also supports parsing different API version
representation of dashboards.

The API version aware client is also updated to support listing across
versions.

Why

Currently listing or getting specific versions is broken for all v2
versions of the dashboard API, especially if the dashboard being checked
is still saved using v1 APIs.

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

* Remove superfluous tracing spans

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

---------

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
2025-09-03 13:51:11 +03:00
Bruno f8cd7049e8
Secrets: garbage collection (#110247)
* clean up older secret versions

* start gargbage collection worker as background service

* make gen-go

* fix typo

* make update-workspace

* undo go mod changes

* undo go work sum changes

* Update pkg/registry/apis/secret/garbagecollectionworker/worker.go

Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>

* Update pkg/registry/apis/secret/garbagecollectionworker/worker.go

Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>

* default gc_worker_batch_size to 1 minute

* fix typo

* fix typo

* add test to ensure cleaning up secure values is idempotent

* make gen-go

* make update-workspace

* undo go.mod and .sum changes

* undo enterprise imports

---------

Co-authored-by: Matheus Macabu <macabu.matheus@gmail.com>
Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>
2025-09-02 11:11:01 -03:00
Matheus Macabu 1e926a29c0
Secrets: Extract external facing decrypt types to apps (#110432) 2025-09-02 10:30:29 +02:00
Roberto Jiménez Sánchez 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 9f19b30a2e.
2025-09-02 09:45:44 +02:00
Stephanie Hingtgen 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
Nathan Vērzemnieks 72eeefabd7
Revert: DataSource: Support config CRUD from apiservers (#106996) (#110342)
Revert "DataSource: Support config CRUD from apiservers (#106996)"

This reverts commit eda94a6434.
2025-08-29 14:49:57 +02:00
Ezequiel Victorero 4b43877324
ShortURL: Use the k8s API in the cleanup process (#109938) 2025-08-28 17:40:45 -03:00
Ryan McKinley eda94a6434
DataSource: Support config CRUD from apiservers (#106996) 2025-08-28 22:28:26 +03:00
Ryan McKinley 43648d20c3
Preferences: Add read-only APIServer for preferences and dashboard stars (#106109) 2025-08-28 19:51:32 +03:00
Roberto Jiménez Sánchez e196f13b2b
Provisioning: Introduce Repository Factory with extras (#110018) 2025-08-26 10:37:47 +02:00
Ryan McKinley ce65391067
Provisioning: Use inline secrets for gitsync (#109908)
Co-authored-by: Clarity-89 <homes89@ukr.net>
Co-authored-by: Roberto Jimenez Sanchez <roberto.jimenez@grafana.com>
2025-08-22 18:38:28 +02:00
Alexander Zobnin 2b254ed623
Zanzana: Add server side metrics (#109923)
* Zanzana: Add metrics to server side

* Zanzana: Collect check duration

* add metrics for other methods
2025-08-21 15:20:07 +02:00
Ryan McKinley fa81fae1e3
Provisioning: Add inline secure values to repository schema (#109594) 2025-08-20 09:05:41 +00:00
Gábor Farkas 2e5b55a855
datasources: querier: renamed the "mt" builder to "qs" builder (#109779) 2025-08-19 12:37:56 +02:00
Mariell Hoversholm 0fc29cbaae
Rendering: Remove SVG sanitization (#109797) 2025-08-19 11:34:12 +02:00
maicon 5270d8e53f
fix(unified-storage): remove permissions after executing on both stores (#109722)
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
Co-authored-by: Jean-Philippe Quéméner <jeanphilippe.quemener@grafana.com>
2025-08-15 15:57:42 +00:00
Sofia Papagiannaki 402572c580
Add ConfigProvider and modify quota.Service to use it (#109395)
* Add config provider and integrate with wire setup

* Refactor quota service to use config provider for configuration management

* Enhance OSSConfigProvider to include logging and update ProvideService to return an error. Refactor server initialization to handle potential errors from config provider. Remove unnecessary wire binding for OSSConfigProvider.

* Update CODEOWNERS to include the configprovider package under the grafana-backend-services-squad.

* Refactor quota service initialization to include context in multiple service providers. Update tests and service implementations to ensure proper context handling during service creation.
2025-08-12 09:42:10 +03:00
Ryan McKinley e0404f924c
K8s/SecureValues: Wire InlineSecureValueSupport to apistore (#109449)
* inline wire

* extra fields

* add variable

* wire
2025-08-11 15:22:56 +03:00
Matheus Macabu 01c1a6ce5b
SecureValues: Run mutate and validation hooks in service layer (#109379)
* SecureValues: Run mutate and validation hooks in service layer

* add some unit tests
2025-08-08 13:15:23 +02:00
Todd Treece ce2697bb07
Plugins: Add app (#108422) 2025-08-06 13:09:10 -04:00
Haris Rozajac 5ad751ea28
Dashboard Migrations: V28 singlestat panel and deprecated variable properties (#108416)
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
2025-08-06 17:51:55 +02:00
Stephanie Hingtgen 68059344f8
Unified storage: Remove unifiedStorageSearchPermissionFiltering feature flag (#109216)
* Unified storage: Remove unifiedStorageSearchPermissionFiltering ff

* unit test
2025-08-06 02:04:32 -06:00
Matheus Macabu fc117afebc
Secrets: Provide grpc and local inline secure value client (#109179)
* TestUtils: Add helper to create certs

* InlineSecureValue: Move to its own package rather than service

* Settings: Rename decrypt server configs to grpc prefixed as it is more generic

* InlineSecureValue: Add gRPC client

* InlineSecureValue: Add service provider grpc/local depending on setting.Cfg

* Wire: Add ProvideInlineSecureValueService to basic wireset

* InlineSecureValue: Re-export in root secret pkg and generate mocks for interface

* Settings: Unify decrypt+inline setting into generic grpc client
2025-08-06 09:04:55 +02:00
Ezequiel Victorero e88b54e9d3
ShortURL: Create k8s API (#108821) 2025-08-04 09:12:12 -03:00
Dana Axinte a3cdfce25a
SecretsManager: Consolidation service and ability to run via cli (#108774)
* list all encrypted values and count

* separate interfaces

* add time filter to global queries

* initial secrets consolidation

* Revert defaults

* More verbose description of the operation

* Add consolidation tests and tracing

* Fix lint

* Revert debug log
2025-07-31 14:45:59 +01:00
lean.dev 6bf542889a
SecretsManager: Refactor and clean metrics (#108908) 2025-07-30 20:00:30 +01:00
Mustafa Sencer Özcan 98e37f2ca9
fix: special handling of unmarshalling for invalid json dashboards (#108519)
* implement special dashboard fallback logic when dashboard data has invalid json behind feature flag

---------

Co-authored-by: Will Assis <william@williamassis.com>
2025-07-30 10:18:38 -04:00
Zoltán Bedi 3ff4c6a2d2
Postgres: Switch the datasource plugin from lib/pq to pgx (#108443)
* Postgres: Switch the datasource plugin from lib/pq to pgx

* Fix lint
2025-07-30 14:47:25 +02:00
Stephanie Hingtgen ef9f9c2d8e
Secrets service: Allow decrypt through gRPC connection (#108365) 2025-07-29 07:51:37 -05:00
Tania 27c395694d
OpenFeature: Initialize early (#108594)
* Move OpenFeatureInit

* Remove unused import

* Remove todo
2025-07-28 16:05:57 +02:00
Gabriel MABILLE 1a7a7f1d99
`grafana-iam`: Wire the roles api (#108577) 2025-07-28 13:36:27 +02:00
Gábor Farkas 8d48dbce66
datasources: querier: handle single-tenant instance config (#108469) 2025-07-28 11:40:26 +02:00
Matheus Macabu 0e7b041b27
Secrets: Move decrypt types to contracts and export public at root pkg (#108376)
* Secrets: Move decrypt types to contracts and export public at root pkg

* Provisioning: Replace decrypt pkg imports

* Merge wire changes
2025-07-23 12:14:28 +02:00
Josh Hunt 1bd9541507
FrontendService: Add tracing and logging middleware (#107956)
* FrontendService: Add tracing and logging middleware

* tests!

* middleware tests

* context middleware test

* revert http_server back to previous version

* fix lint

* fix test

* use http.NotFound instead of custom http handler

* use existing tracer for package

* use otel/trace.Tracer in request_tracing middleware

* tidy up tracing in contextMiddleware

* fix 404 test

* remove spans from contextMiddleware

* comment
2025-07-22 18:55:44 +01:00
Will Assis 34f1be796d
unified-storage: expose ring replication factor config (#106345)
* config ring replication factor

* change default

* rename

* fix test

* fix
2025-07-22 09:32:22 +02:00