Commit Graph

6025 Commits

Author SHA1 Message Date
Kyle Brandt
e4d1fdc3d0
Errors: Make errors the same in dev as prod (#77366)
When running in dev mode, error messages would contain an additional "error" property alongside "message". Since this causes confusion, that has been removed and now error messages are the same both modes (using "message").
2023-10-30 14:06:26 -04:00
Santiago
363830883c
Alerting: Add feature toggles for Alertmanager migration (#77372)
* Alerting: Add feature toggles for Alertmanager migration

* address code review comments
2023-10-30 17:27:08 +01:00
Ezequiel Victorero
16034ef062
PublicDashboards: Add swagger documentation (#75318) 2023-10-30 10:32:07 -03:00
Karl Persson
87eba34745
User: remove empty email / username check from update in service (#77347)
User: remove empty email / username check from update in service
2023-10-30 10:44:26 +01:00
Yuri Tseretyan
bc7357727c
Alerting: Enable feature flag alertingNoDataErrorExecution by default (#77242) 2023-10-27 17:17:34 -04:00
Todd Treece
798e224ce6
K8s: JSON file storage (#75759) 2023-10-27 16:39:27 -04:00
Yuri Tseretyan
48b55f39bf
Alerting: Add support for responders to Opsgenie integration (#77159)
* add support for responders in opsgenie UI config
* update export model

Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
2023-10-27 13:06:46 -04:00
Michael Mandrus
0231873d70
Feature Management: Link to grafana.com docs from feature toggle admin page (#77302)
* add link to gcom

* re-add subtitle on backend so it displays in the high level administration view
2023-10-27 19:16:43 +03:00
Gabriel MABILLE
83e9088314
AuthN: Set oauth client grant_types based on plugin state (#77248)
* Disable plugin service account

* Fix bug seen by linoman 💯

Co-authored-by: linoman <2051016+linoman@users.noreply.github.com>

* Account for PR feedback

Co-authored-by: linoman <2051016+linoman@users.noreply.github.com>

* Fix test data

* Enable datasource plugins by default

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>

* Update pkg/services/extsvcauth/oauthserver/oasimpl/service.go

* Handle error differently

* Fix service reg

---------

Co-authored-by: linoman <2051016+linoman@users.noreply.github.com>
Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2023-10-27 14:45:04 +02:00
Gabriel MABILLE
25b30aeb6d
Plugin: Enable service account based on plugin settings on init (#77193)
* Disable plugin service account

* Revert extsvc injection

* handle plugin state changes

* Use isProxyEnabled

* Remove plugininteg changes

* Change update function to also work for mysql 😩

* Plugin: enable service account based on plugin settings on
initialization

* Remove misleading comment

* Fix tests

* test message

* Clean up tests

* Simplify tests

* Re-order imports

* Remove unecessary comment

* Enable datasource plugins by default

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>

---------

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2023-10-27 14:27:06 +02:00
Gabriel MABILLE
2727f41474
AuthN: Change the external service account state on plugin state change (#77157)
* Disable plugin service account

* Revert extsvc injection

* handle plugin state changes

* Use isProxyEnabled

* Remove plugininteg changes

* Change update function to also work for mysql 😩

* Change test to also check no collateral update

* Update pkg/services/serviceaccounts/database/store_test.go

* Update pkg/services/serviceaccounts/database/store_test.go
2023-10-27 13:46:25 +02:00
Eric Leijonmarck
57335cb173
Team LBAC: Add validation/regex of teamheaders (#76905)
* add validation of team header values w. regex

* apply valid headers

* refactor testcases to account for badly formatted json

* refactoring to move validation code close to the validation itself

* removed tes

* Update pkg/api/datasources_test.go

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>

* Update pkg/api/datasources.go

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>

* review comments

* review during pairing

---------

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
2023-10-27 12:37:37 +01:00
Matias Chomicki
46f331e284
Logs: remove toggleLabelsInLogsUI (#77264)
* toggleLabelsInLogsUI: remove flag

* Remove unused imports

* isFilterLabelActive: refId is not optional

* Revert "isFilterLabelActive: refId is not optional"

This reverts commit 008931b7e9.

* Revert method signature change

* Update tests

* Update tests
2023-10-27 13:00:49 +02:00
Karl Persson
bc9fab6f30
IDForwarding: Update settings name (#77257)
Update settings name
2023-10-27 10:20:49 +02:00
Giuseppe Guerra
45bcbff115
Plugins: Fix plugin alias ID being used in PluginContext.ID (#77206)
* Fix PluginID being populated with alias in plugincontext Get and GetWithDataSource

* Add tests

* pr review suggestion

* pr review suggestion
2023-10-27 11:14:07 +03:00
Karl Persson
1b6d39f823
IDForwarding: Require that id forwarding is enabled for data source (#77131)
* Require that id forwarding is enabled for data source

* Address feedback
2023-10-27 08:30:33 +02:00
Ezequiel Victorero
b2ef9a81f2
PublicDashboards: Chore refactor api test (#77091) 2023-10-26 14:52:27 -03:00
Ryan McKinley
7d619199d0
K8s/Authorizer: Move allow from fallback to org_role (#77235) 2023-10-26 20:46:45 +03:00
Ryan McKinley
c122ffc72b
K8s: Add integration test infra, and fix authz patterns (#77218) 2023-10-26 20:02:33 +03:00
Ieva
744f4defcf
Bug: fix a typo in dashboard permission logic (#77231)
fix an error handling typo
2023-10-26 19:39:27 +03:00
Ieva
f6e2a775d3
Bug fix: Correctly set permissions on provisioned dashboards (#77155)
* set default basic role permissions for dashboards even if dash creator permissions can't be set

* temporarily increase the test threshold until we can tweak the page
2023-10-26 17:21:50 +01:00
Kristin Laemmert
15c1d5f636
chore: add basic tracing to playlist service (#77165) 2023-10-26 09:25:31 -04:00
João Calisto
7869ca1932
Feature Management: UI improvements (#76866)
* Feature Management: UI improvements

* update UI logic

---------

Co-authored-by: Michael Mandrus <michael.mandrus@grafana.com>
2023-10-26 10:42:00 +01:00
Todd Treece
bf8af608a7
K8s: Add tracer provider to config (#77003) 2023-10-25 15:19:44 -04:00
Ryan McKinley
7e069f9d91
K8s: Move the namespace mapper to the same package that resolves them (#77101) 2023-10-25 14:13:46 -04:00
Misi
1e81ffccac
Auth: Handle when access token has already been refreshed in OAuth token sync (#77118)
* Use singleflight to prevent logging error if the token has already been refreshed

* Change order of error checks

* align tests, change error name

* Change sf key

* Update based on the review

* refactor
2023-10-25 18:15:41 +02:00
Ryan McKinley
d2732ae726
K8s: Add explicit table converter (#77098) 2023-10-25 09:00:20 -07:00
Santiago
f9fc2e4568
Alerting: Remove ConfigHash() from the Alertmanager interface (#77134) 2023-10-25 17:11:53 +02:00
Alexander Weaver
6ee52ac80c
Alerting: Allow more time before Alertmanager expire-resolves alerts (#77094)
* Sync endsAt factor with prometheus

* Fix state tests
2023-10-25 10:03:46 -05:00
linoman
dff7403b29
auth: implement feature flag for service account proxy (#77129)
* add FlagExternalServiceAccounts to proxy service

* add FlagExternalServiceAccounts value to tests

---------

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2023-10-25 16:44:05 +02:00
Gilles De Mey
e12e40fc24
Alerting: Contact Points v2 part IV (#76063) 2023-10-25 15:57:53 +02:00
kay delaney
b215d2f0fb
Library Panels: Fix library panel creation with RBAC enabled (#76553) 2023-10-25 16:29:57 +03:00
Marcus Efraimsson
9bf7eb5fbc
Plugins: Adds logging around loading of plugins for better tracking (#76896) 2023-10-25 14:01:30 +02:00
Santiago
322a9c0b15
Alerting: Replace FileStore() for CleanUp() in the Alertmanager interface (#77126)
Alerting: Remplace FileStore() for CleanUp() in the Alertmanager interface
2023-10-25 13:58:28 +02:00
linoman
1bc81b7bd1
auth: migrate api interface implementation (#77040)
* expand serviceaccount service interface

* implemet FakeServiceAccountService

* Replace SA service interface from api

* merge sa proxy tests with new fake service

* implement DeleteServiceAccountToken

* add test for DeleteServiceAccountToken
2023-10-25 12:40:30 +02:00
Santiago
01add144b8
Alerting: Send alerts to the remote Alertmanager (#77034)
* Alerting: Rename remote.ExternalAlertmanager to remote.Alertmanager

* Alerting: Send alerts to the remote Alertmanager

* add ticker to readiness check, add tests

* use options when creating a new sender.ExternaAlertmanager

* unexport defaultMaxQueueCapacity

* delete unused defaultConfig field

* add debug log line when sending alerts to the remote alertmanager

* move and refactor readiness check

* update tests to not include defaultConfig
2023-10-25 11:52:48 +02:00
Hugo Kiyodi Oshiro
dfc1875061
Plugins: Add managed instance installation resources (#76767)
* Plugins: Add configs to allow managed install

* Expose methods to use with cloud plugin installer

* Change plugins installer bind to OSS
2023-10-24 16:21:37 +02:00
Todd Treece
162a422f0a
K8s: Playlist apply fix (#76971) 2023-10-24 10:19:17 -04:00
Gabriel MABILLE
897e3a4dab
AuthN: Add metrics to external service accounts management (#76789)
* AuthN: Add metrics to external service accounts management

* Add a new metric to count stored external service accounts

* Update variable names

Co-authored-by: linoman <2051016+linoman@users.noreply.github.com>

* Add test to SearchOrgServiceAccounts

* Add feature flags checks before registering and using the metrics

---------

Co-authored-by: linoman <2051016+linoman@users.noreply.github.com>
2023-10-24 15:54:14 +02:00
Matias Chomicki
765defea1e
Loki Queries: Query Splitting enabled by default (#75876)
* Loki Query Splitting: enable by default

* Query splitting: add gdev dashboard

* Update testdata file

* Update devenv/dev-dashboards/datasource-loki/loki_query_splitting.json

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

* Revert "Update testdata file"

This reverts commit 5a891ba1f2.

* Update feature-toggles readme

---------

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2023-10-24 16:09:30 +03:00
Alexander Zobnin
cad3c43bb1
Team LBAC: Move middleware to enterprise (#76969)
* Team LBAC: Move middleware to enterprise

* Remove ds proxy part

* Move utils to enterprise
2023-10-24 14:06:18 +03:00
Gabriel MABILLE
3015e5921f
Chore: Move extsvcaccounts package to serviceaccounts (#76977)
* Chore: Move extsvcaccounts package to serviceaccounts

* Fix proxy

* Fix tests

* Fix linting
2023-10-24 11:01:04 +02:00
Ieva
159bb3c032
RBAC: Allow scoping access to root level dashboards (#76987)
* correctly check permissions to list dashboards on the root

* correctly display the access inherited from general folder for dashboards

* Update pkg/services/sqlstore/permissions/dashboard.go

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

* Update dashboard_filter_no_subquery.go

---------

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2023-10-24 11:55:38 +03:00
Sofia Papagiannaki
03a626f1d6
Search: Fix empty folder details for nested folder items (#76504)
* Introduce dashboard.folder_uid column

* Add data migration

* Search: Fix empty folder details for nested folders

* Set `dashboard.folder_uid` and update tests

* Add unique index

* lint

Ignore cyclomatic complexity of func
`(*DashboardServiceImpl).BuildSaveDashboardCommand

* Fix search by folder UID
2023-10-24 10:04:45 +03:00
Todd Treece
949b3af1b2
K8s: Remove duplicate listener in production (#76583) 2023-10-23 21:42:10 +03:00
Kyle Brandt
59ef1558e8
Prometheus: (Chore) Switch to sdk tracing from infra tracing (#76975) 2023-10-23 13:11:12 -04:00
Ivan Ortega Alba
a03f9e7660
Feature toggle: Mark dashgpt as GA (#76304)
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2023-10-23 09:39:12 -07:00
Alexander Weaver
39599fa7f7
Alerting: Alert rule constraint violations return as 400s in provisioning API (#76396)
Constraint violations become 400s
2023-10-23 10:28:40 -05:00
Sofia Papagiannaki
b04a014341
Chore: Fix failure when importing dashboard (#76947) 2023-10-23 18:16:46 +03:00
Kristin Laemmert
f166202e11
chore(grafana-apiserver): expose apiserver metrics endpoint (#76572)
expose apiserver metrics

Add a route to the apiserver metrics on a new endpoint, `/apiserver-metrics`. This requires a signed-in user but otherwise ignores the MetricsEndpoind-relating configuration. that will come in a following PR
2023-10-23 10:05:50 -04:00