Commit Graph

12845 Commits

Author SHA1 Message Date
Gabriel MABILLE
5e48804364
RBAC: Fix slow user permission search query on MySQL (#85058)
* Bench testing search user perm

* Add BenchmarkSearchUsersPermissions_1K_1K

* Clarify benchmark searches by action prefix

* Make MySQL more efficient

* Move all filter options

* Expand after assignments union

* update comments
2024-03-25 19:11:17 +01:00
Ieva
df40e13333
Public dashboards: fix public dashboard permissions so that annotations are displayed (#85091)
* fix public dashboard anonymous user permissions so they include the new annotation permissions

* test fix
2024-03-25 17:42:40 +00:00
Charandas
dd7d4e2656
K8s: replace a noop certKey content func with actual if available (#84524) 2024-03-25 10:12:55 -07:00
Mihai Doarna
fad6dc4db1
SSO: fix reloading settings when a provider contains empty settings (#85102)
* fix reloading settings when a provider contains empty settings

* do not increment reloadFailures if settings are empty
2024-03-25 19:12:19 +02:00
ismail simsek
92f5a0305c
Chore: Define promlib depguard rules (#85082)
* define promlib depguard rules

* add comment

* test: break linting on purpose

* fix linting

* simple change to trigger backend linting/build in CI pipeline
2024-03-25 17:32:56 +01:00
Bruno
a2e21eac8c
Cloud migrations: create endpoint to create an access token (#84690)
* fix merge conflicts

* make token expiration configurable
2024-03-25 12:43:28 -03:00
Charandas
e237b89fe7
K8s: skip invalid items in GetList when not invoked as part of SendInitialEvents (#85050) 2024-03-25 07:50:14 -07:00
Marcus Efraimsson
8f12fb94f9
Plugins: Factory for instantiating core plugin (#85047) 2024-03-25 15:41:26 +01:00
ismail simsek
6137c4e0a6
Chore: Bump golangci-lint v1.57.1 (#84998)
* bump golangci-lint v1.57.1

* update setting

* remove goconst

* fix linting issues

* prettier

* fix G601

* go mod tidy
go work sync
2024-03-25 15:28:24 +01:00
Ryan McKinley
e6fa367d02
k8s/query+ds: catch query errors, fix datasourceProvider and expose prometheus (#85071) 2024-03-25 17:22:34 +03:00
Karl Persson
2f3a01f79f
OAuth: Make sub claim required for generic oauth behind feature toggle (#85065)
* Add feature toggle for sub claims requirement

* OAuth: require valid auth id

* Fix feature toggle description
2024-03-25 14:22:24 +01:00
idafurjes
e2f155f9f7
Grafana: define the api for the grafana cloudmigration api (not the csm api) (#84430)
* Add cloud migration endpoints

* Built auth into creating a migration.

* Added more detail to the migration result model

* goimports

* Update pkg/services/cloudmigration/api/api.go

Co-authored-by: lean.dev <34773040+leandro-deveikis@users.noreply.github.com>

* Update pkg/services/cloudmigration/api/api.go

Co-authored-by: lean.dev <34773040+leandro-deveikis@users.noreply.github.com>

---------

Co-authored-by: Leonard Gram <leo@xlson.com>
Co-authored-by: lean.dev <34773040+leandro-deveikis@users.noreply.github.com>
2024-03-25 13:30:47 +01:00
Serge Zaitsev
4d4c06b480
Chore: Vendor wire into pkg/build (#84637)
* vendor latest wire into pkg/build

* use vendored wire in builds

* fix wire import path

* remove wire from bingo

* also support google/wire import

* make prettier happy

* change package in tess

* add debug walk for drone

* add wire_gen in tests

* remove debug walk

* restore imports
2024-03-25 11:23:27 +01:00
linoman
fc205db466
samlsettings: api integration (#84300)
* add strategy and tests

* use settings provider service and remove multiple providers strategy

* Move SAML strategy to ssosettings service

* Update codeowners file

* reload from settings provider

* add saml as configurable provider

* Add new SAML strategy

* rename old saml settings interface

* update saml string references

* use OSS license

* validate saml provider depends on license for List

* add tests for list rendering including saml

* change the licensing validation to service init

* replace service struct for provider
2024-03-25 10:54:45 +01:00
Karl Persson
c33bc819bc
SigningKeys: Add added_at when creating new signing key (#85060) 2024-03-25 09:58:40 +01:00
Ryan McKinley
713970d00a
SQLStore: Cleanup migrationLocking (#85054) 2024-03-25 10:09:15 +03:00
Charandas
3c42a2efd2
K8s: file storage - add sync around resource version (RV) management (#84694) 2024-03-23 23:58:48 -07:00
Brendan O'Handley
d084595211
Prometheus: Use frontend package in Prometheus DS with a feature toggle (#84397)
* add feature toggle usePrometheusFrontendPackage

* add feature toggle logic to Prometheus module

* use config editor with package and remove configOverhaul feature toggle

* update betterer because we will be removing other files as we replace with files from @grafana/prometheus

* fix exemplar ds picker selector

* add more description to ts-ignore

* remove go.work.sum change

* copy go.work.sum from main

* update go.work.sum after talking with ismail

* put back the promlib entry

---------

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
2024-03-22 19:47:53 -05:00
Matthew Jacobson
0c3c5c5607
Alerting: Stop persisting silences and nflog to disk (#84706)
With this change, we no longer need to persist silence/nflog states to disk in addition to the kvstore
2024-03-23 00:37:33 +02:00
Yuri Tseretyan
48de8657c9
Alerting: Editor role can access all provisioning API (#85022) 2024-03-23 00:14:15 +02:00
Yuri Tseretyan
b9abb8cabb
Alerting: Update provisioning API to support regular permissions (#77007)
* allow users with regular actions access provisioning API paths
* update methods that read rules
skip new authorization logic if user CanReadAllRules to avoid performance impact on file-provisioning
update all methods to accept identity.Requester that contains all permissions and is required by access control.

* create deltas for single rul e 

* update modify methods
skip new authorization logic if user CanWriteAllRules to avoid performance impact on file-provisioning
update all methods to accept identity.Requester that contains all permissions and is required by access control.

* implement RuleAccessControlService in provisioning

* update file provisioning user to have all permissions to bypass authz

* update provisioning API to return errutil errors correctly

---------

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
2024-03-22 15:37:10 -04:00
Sofia Papagiannaki
33b653534e
SQLStore: Enable migration locking by default (#84983)
* Introduce new configuration for migration locking

* Remove feature toggle

* Fix test and turn it into an integration

* Fix docs
2024-03-22 21:22:29 +02:00
Matthew Jacobson
980b9a62c6
Alerting: Enable simplified routing FF by default (#84856) 2024-03-22 13:45:20 -04:00
Ezequiel Victorero
c57c033522
Snapshots: Viewers can not create a Snapshot (#84952) 2024-03-22 14:31:01 -03:00
ismail simsek
629a8808e0
Chore: Bump promlib v0.0.4 (#84882)
* Update the readme

* bump promlib v0.0.3

* update

* update

* use promlib v0.0.4
2024-03-22 18:28:22 +01:00
Tristan
78c6c7fef4
CloudWatch: Add additional AWS/SageMaker metrics (#85009)
add additional AWS/SageMaker metrics for customer
2024-03-22 10:14:21 -07:00
Yuri Tseretyan
e138ae3eb9
Alerting: Improve openAPI specification and docs for export endpoints (#85008) 2024-03-22 18:25:27 +02:00
Timur Olzhabayev
e9db9106c1
Chore: Disable angular support by default (#84738)
* Flipping angular support to disabled by default
2024-03-22 17:09:53 +01:00
Kyle Brandt
86a2a1a19b
Prometheus: remove scope dependency (#84991)
* Prometheus: remove scope dependency
temp workaround

* depguard

* comment

* remove rules since they need a newer version of golangci-lint

---------

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
2024-03-22 16:52:42 +01:00
Eric Leijonmarck
2f7fd729ef
Auth: Enable case insensitive logins/emails by default (#84840)
* wip

* wip

* wip

* wip postgres tests
2024-03-22 16:45:18 +01:00
Leon Sorokin
d7fa99e2df
XYChart: Refactor to new model (behind feature toggle) (#82499)
Co-authored-by: drew08t <drew08@gmail.com>
Co-authored-by: Ihor Yeromin <yeryomin.igor@gmail.com>
2024-03-22 10:44:37 -05:00
chalapat
65c0669f01
Server: Reload TLS certs without a server restart (#83589)
* server: reload of grafana server certs when renewed without restart.

Signed-off-by: Rao, B V Chalapathi <b_v_chalapathi.rao@nokia.com>

* server: reload of grafana server certs when renewed without restart.

Signed-off-by: Rao, B V Chalapathi <b_v_chalapathi.rao@nokia.com>

* Update http_server.go

* Update docs/sources/setup-grafana/configure-grafana/_index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update http_server.go

Address the comments

* Update docs/sources/setup-grafana/configure-grafana/_index.md

Co-authored-by: Dan Cech <dan@aussiedan.com>

* Update http_server.go

Align the spaces

* Update http_server.go

* Update http_server.go

* Update pkg/api/http_server.go

Co-authored-by: Dan Cech <dan@aussiedan.com>

---------

Signed-off-by: Rao, B V Chalapathi <b_v_chalapathi.rao@nokia.com>
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Dan Cech <dan@aussiedan.com>
2024-03-22 17:13:22 +02:00
Juan Cabanas
8d4ca72f2a
PublicDashboards: Scene migration (#84409) 2024-03-22 11:48:21 -03:00
Eric Leijonmarck
bb792ff540
Auth: Remove oauth skip org role sync (#84972)
* remove oauth wide skip org role sync

* we are warning from config

* set it to false

* removed from config ini files and updated docs
2024-03-22 15:34:05 +01:00
Jean-Philippe Quéméner
f2c7023fe6
fix(alerting): use uid and not rand() in tests for title (#85001) 2024-03-22 16:26:09 +02:00
Santiago
a2facbecd4
Alerting: Implement ApplyConfig for remote primary mode (forked AM) (#84811)
* Alerting: Implement ApplyConfig for remote primary mode (forked AM)

* add TODO for saving the config hash in other config-related methods

* fix bad method receiver name (m -> am)

* tests

* add mutex

* remove sync loop
2024-03-22 15:17:41 +01:00
Sofia Papagiannaki
369cb5b6eb
Usage stats: Fix concurrency issue (#84993)
* Usage stats: Fix concurrency issue
2024-03-22 15:52:59 +02:00
Karl Persson
f5692f06a5
FeatureToggles: Remove unused feature flag (#84988)
Remove unused flag
2024-03-22 14:30:58 +01:00
Serge Zaitsev
df2d0574c1
Chore: Enable nestedFolders by default (#84631)
* Enable nestedFolders by default

* Make nestedFolders GA

Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>

* regenerate files

* also update docs

* skip failing test

---------

Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>
2024-03-22 14:13:43 +01:00
Will Browne
b765c21d4c
Plugins: Pass PDC file contents in requests (#84783)
* Plugins: Pass PDC file contents in requests

* go mod tidy

* undo go.mod changes

* fix linter

* fix tests

* undo unnecessary changes

* update dep

* join with comma

* update naming

* bump SDK
2024-03-22 13:52:24 +01:00
Marcus Efraimsson
488bbaacab
Chore: Remove unused dependenices in plugin client middlewares (#84624)
* Chore: Remove unused dependenices in plugin client middlewares

* refactor logger middleware to remove cfg dependency

* hack to make tracing work in api group builders
2024-03-22 12:54:35 +01:00
ismail simsek
016d6f2f6d
InfluxDB: Fix alias interpolation when it has $__interval or multiple tags (#84940)
fix $__interval interpolating in alias
2024-03-22 11:27:04 +01:00
Giuseppe Guerra
ef5d71711a
Plugins: Enable feature toggle enablePluginsTracingByDefault by default (#84645)
* Enable feature flag enablePluginsTracingByDefault by default

* re-generate feature toggles
2024-03-22 11:22:36 +02:00
Agnès Toulet
4f8b14ebf4
FeatureToggle: Update newPDFRendering to public preview (#84883)
FeatureToggle: update newPDFRendering to public preview
2024-03-22 09:50:53 +01:00
Ieva
9772ed6526
RBAC: Enable annotation permission update by default (#84787)
* display teams to team reader if they also have the access to list team permissions

* fix a typo in the docs

* enable annotationPermissionUpdate by default

* update wording
2024-03-22 00:45:23 +02:00
Pepe Cano
2d6586952d
Alerting: Add placeholder to the Email Contact Point Message (#84064) 2024-03-21 13:03:12 -04:00
Ivan Ortega Alba
33f9e8554d
GenAI: Autogenerate title and description for panels and dashboards (#84933) 2024-03-21 17:58:27 +01:00
Todd Treece
cdb2e7dd3e
Chore: Sync go workspace (#84932) 2024-03-21 18:34:40 +02:00
Giuseppe Guerra
eb31f71f60
Plugins: Enable feature toggle pluginsDynamicAngularDetectionPatterns by default (#84723)
* Enable feature toggle pluginsDynamicAngularDetectionPatterns by default

* Change backgroundJobInterval to 24h

* re-generate feature toggles

* Use different intervals for cloud vs on-prem

* temporarily switch interval log to info level

* debug level again

* Simplify provideDynamic for tests

* re-generated feature toggles files

* PR review feedback

* PR review feedback: removed dependency from plugin management config
2024-03-21 18:22:06 +02:00
Marcus Efraimsson
6c1de260a2
API Server: Standalone observability (#84789)
Adds support for logs (specify level), metrics (enable metrics and Prometheus /metrics endpoint 
and traces (jaeger or otlp) for standalone API server. This will allow any grafana core service 
part of standalone apiserver to use logging, metrics and traces as normal.
2024-03-21 17:06:32 +01:00