Sofia Papagiannaki
5e88d29814
Folders: Introduce folder service function for fetching folders by org and UIDs that contain optionally the folder full path ( #80716 )
...
* Folders: Expose function for getting all org folders with specific UIDs
* Return all org folders if UIDs is empty
* Filter out not accessible folders by the user
* Modify query to optionally returning a string that contains the UIDs of all parent folders separated by slash.
2024-01-25 09:27:13 +02:00
William Wernert
2203bc2a3d
Alerting: Refactor provisioning tests/fakes ( #81205 )
...
* Fix up test Alertmanager config JSON
* Move fake AM config and provisioning stores to fakes package
2024-01-24 17:15:55 -05:00
Matthew Jacobson
e45f664ca4
Alerting: Replace index role_id, action, scope with action, scope, role_id on permission table ( #80336 )
...
* Alerting: Add action, scope, role_id to permission table
The existing role_id, action, scope index has the wrong ordering to be most
effectively used in dashboard/folder permission requests.
On a large tests set, the slow database calls were on the order of ~30-40ms, so
when performed individually they don't have that large of a latency impact.
However, when done in bulk in the migration this adds up to some very slow
requests.
After the index is added these same database calls are reduced to ~4-5ms
* Change index to action, scope, role_id
* Make new index unique and drop [role_id, action, scope] index
2024-01-24 16:18:14 -05:00
Matthew Jacobson
71e70c424f
Alerting: During legacy migration reduce the number of created silences ( #78505 )
...
* Alerting: During legacy migration reduce the number of created silences
During legacy migration every migrated rule was given a label rule_uid=<uid>.
This was used to silence DatasourceError/DatasourceNoData alerts for
migrated rules that had either ExecutionErrorState/NoDataState set to
keep_state, respectively.
This could potentially create a large amount of silences and a high cardinality
label. Both of these scenarios have poor outcomes for CPU load and latency in
unified alerting.
Instead, this change creates one label per ExecutionErrorState/NoDataState when
they are set to keep_state as well as two silence rules, if rules with said
labels were created during migration. These silence rules are:
- __legacy_silence_error_keep_state__ = true
- __legacy_silence_nodata_keep_state__ = true
This will drastically reduce the number of created silence rules in most cases
as well as not create the potentially high cardinality label `rule_uid`.
2024-01-24 15:56:19 -05:00
Santiago
fbbda6c05e
Alerting: Retry readiness check to the remote Alertmanager on 5xx status code responses ( #81174 )
2024-01-24 21:39:06 +01:00
Ryan McKinley
c9ff6a9ab9
Chore: Generate shorter UIDs ( #79843 )
2024-01-24 11:27:46 -08:00
Marcus Efraimsson
20fe0eb173
Chore: Extract DatabaseConfig parsing from SQLStore ( #81157 )
...
Extract the parsing/creating of database config/connectiong from SQLStore string
to a separate DatabaseConfig struct.
2024-01-24 16:49:49 +01:00
Andres Martinez Gotor
3b96eb854a
Chore: Replace config with datasource in names ( #81098 )
2024-01-24 16:44:40 +01:00
Misi
c47b55ae10
Auth: Add SSO settings usage stats ( #81143 )
...
* Add usage stats
* UsageStats test + svc rename
* Fix test
2024-01-24 15:39:50 +01:00
Alexander Zobnin
7872a128a2
Folders: Add metric for listing subfolders duration ( #81144 )
2024-01-24 14:15:32 +01:00
Andres Martinez Gotor
a06197188f
Chore: Fix plugins magefile ( #81146 )
2024-01-24 14:01:15 +01:00
Karl Persson and Victor Cinaglia
28bb6979f5
IDForwading: cache based on expires in ( #81136 )
...
* IDFowarding: Cache based on expires in
* IDFowarding: Change default expires in
---------
Co-authored-by: Victor Cinaglia <victor@grafana.com >
2024-01-24 13:56:44 +01:00
Andres Martinez Gotor
1c02220916
Chore: Fix plugins magefile for Azure ( #81138 )
2024-01-24 14:18:18 +02:00
idafurjes
6b4eaa0d18
Add MFolderIDsAPICount metric to count FolderIDs in api package ( #80866 )
...
* Add MFolderIDsAPICount metric to cound FolderIDs in api package
* Change counter to counter vector with method names as string values
2024-01-24 12:39:11 +01:00
Gabriel MABILLE
63679813b0
RBAC: prevent seeding oncall access ( #80862 )
...
* RBAC: prevent seeding oncall access
* Add comments and an early exit
* Test SeedAssignmentOnCallAccessMigrator
* imports
* Comment rework
* Check error
* Nit.
2024-01-24 09:23:40 +01:00
Gábor Farkas
fd73b75ef7
SQL datasources: Consistent interval handling ( #78517 )
...
sql: apply the received interval-value
2024-01-24 08:47:07 +01:00
George Robinson
05d858635c
Alerting: Add metric for inhibition rules ( #81119 )
...
This commit adds a metric for the number of inhibition rules.
It matches the metric added upstream in #3681 .
2024-01-23 19:43:17 +00:00
Matthew Jacobson
2607528b52
Alerting: Update legacy migration docs to include Upgrade Preview ( #80628 )
...
* Alerting: Update legacy migration docs to include Upgrade Preview
2024-01-23 14:09:52 -05:00
Sofia Papagiannaki
57effed70a
Chore: Fix flaky test ( #81116 )
...
* Chore: Fix flaky test
2024-01-23 20:33:32 +02:00
Ryan McKinley
2b355ff280
K8s: Remove grafanaAPIServer feature toggle ( #81030 )
2024-01-23 08:27:28 -08:00
Jean-Philippe Quéméner
aa25776f81
Alerting: Add a feature flag to periodically save states ( #80987 )
2024-01-23 17:03:30 +01:00
Denis
f7fd8e6cd1
DashboardSchema: Add options to VariableModel ( #79236 )
...
* Add includeAll and regex fields to VariableModel #67639
* Add allValue option to VariableModel
2024-01-23 10:56:20 -05:00
George Robinson
85b9edcd28
Alerting: Fix incorrect initialization of logger ( #81099 )
2024-01-23 17:29:38 +02:00
Misi
ea1ab0d84f
Auth: Remove DevModeRequired from the SsoSettingsApi feature toggle ( #81091 )
...
Remove DevModeRequired from ft
2024-01-23 16:11:26 +01:00
Misi
8246d97587
Auth: Introduce configurable_providers config option for SSO settings ( #80911 )
...
* Add SSOSettingsConfigurableProviders config option
* Add check to Delete and ListWithRedactedSecrets
* Add check to GET, small improvements
2024-01-23 15:48:06 +01:00
Jo
9f5a8bf926
AuthInfo: Revert #81013 . Fix cache invalidation ( #81050 )
...
* Revert "Auth: Revert "Auth: Cache Auth Info" (#81013 )"
This reverts commit ce84f7c540 .
* fix cache invalidation during user takeover
* fix incomplete test
2024-01-23 15:26:38 +01:00
Andrej Ocenas
59595c7318
Table: Keep expanded rows persistent when data changes if it has unique ID ( #80031 )
2024-01-23 14:14:57 +01:00
Eric Leijonmarck
b43b2608b5
Chore: Enable and Fix flaky test in anonimpl service ( #80896 )
...
* fix: flaky test
* set fixed time instead
* flaky
2024-01-23 12:27:26 +00:00
Sven Grossmann
3d033839d7
Elasticsearch: Fix URL creation and allowlist for /_mapping requests ( #80970 )
...
* Elasticsearch: Fix URL creation for mapping requests
* remove leading slash by default
* add comment for es route
* hardcode `_mapping`
* update doc
2024-01-23 12:41:13 +01:00
Marcus Efraimsson
6768c6c059
Chore: Remove public vars in setting package ( #81018 )
...
Removes the public variable setting.SecretKey plus some other ones.
Introduces some new functions for creating setting.Cfg.
2024-01-23 12:36:22 +01:00
Karl Persson
147bf01745
IDForwarding: Always forward id tokens to plugins ( #81041 )
...
* Always forward id tokens to plugins
2024-01-23 12:12:32 +01:00
Sven Grossmann
b315c5e54d
Loki: Also log statusSource in error case ( #81040 )
2024-01-23 11:16:29 +01:00
Ryan McKinley
c7c594dba0
K8s/DataSource: Introduce PluginConfigProvider ( #80928 )
2024-01-22 11:32:25 -08:00
Misi
ce84f7c540
Auth: Revert "Auth: Cache Auth Info" ( #81013 )
...
Revert "Auth: Cache Auth Info"
2024-01-22 21:25:24 +02:00
Michael Mandrus
cf13cb9f70
Cloud Migrations: Create new service for cloud migrations ( #80949 )
...
* introduce feature toggle
* create base service structure
* fix sample metric
* register metrics
* add to codeowners
* separate api dtos from service models
* remove leading newline
2024-01-22 11:09:08 -05:00
Tania
07aa173939
Nested Folders: Add back syncing of folders between folder and dashboard tbls ( #80972 )
...
Add back syncing of folders between folder and dashboard tbls
This partially reverts commit 06d2ae3ada .
2024-01-22 17:04:18 +01:00
Sofia Papagiannaki
4243079cb5
Folders: Fix creating/updating a folder whose title has leading and trailing spaces ( #80909 )
...
* Add tests
* Folders: Fix creating folder whose title has leading and trailing spaces
* Fix folder update
* Remove redundant argument
* Fix test
2024-01-22 18:03:30 +02:00
Dave Henderson
e0402115ea
Notifications: Optional trace propagation through SMTP ( #80481 )
...
* Notifications: Optional trace propagation through SMTP
Signed-off-by: Dave Henderson <dave.henderson@grafana.com >
* fix failing test
Signed-off-by: Dave Henderson <dave.henderson@grafana.com >
* Add documentation
Signed-off-by: Dave Henderson <dave.henderson@grafana.com >
---------
Signed-off-by: Dave Henderson <dave.henderson@grafana.com >
2024-01-22 10:50:05 -05:00
Brendan O'Handley and Isabel
3409e0ea5a
Prometheus: Invest in tests and docs for min interval or min step explanation ( #80165 )
...
* add clearer comment for function def
* update test to reflect change in range for 1w step
* clarify docs
* add more clarity
* add explanation to query options min interval and link to min step
* Update docs/sources/panels-visualizations/query-transform-data/_index.md
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com >
---------
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com >
2024-01-22 08:44:46 -06:00
Will Browne
2a0f1900d5
Datasources: Add wireset for datasource.DataSourceAPIBuilder ( #80914 )
...
tidy up
2024-01-22 15:21:27 +01:00
Joey
f3c64a7337
Tempo: Remove profiling toggles ( #80792 )
...
* Remove traceToProfiles toggle
* Remove tracesEmbeddedFlameGraph toggle
* Remove superfluous import
* Update ConfigDescriptionLink
* Update getting of profiles from standalone build PR
2024-01-22 14:21:14 +00:00
Misi
20bb0a3ab1
AuthN: Support reloading SSO config after the sso settings have changed ( #80734 )
...
* Add AuthNSvc reload handling
* Working, need to add test
* Remove commented out code
* Add Reload implementation to connectors
* Align and add tests, refactor
* Add more tests, linting
* Add extra checks + tests to oauth client
* Clean up based on reviews
* Move config instantiation into newSocialBase
* Use specific error
2024-01-22 14:54:48 +01:00
Gábor Farkas
e6f8176674
postgres: test: switch to numbers that are represented well in floating point ( #80722 )
2024-01-22 14:14:40 +01:00
Jean-Philippe Quéméner
eb7e1216a1
feat(alerting): add async state persister ( #80763 )
2024-01-22 13:07:11 +01:00
Sven Grossmann
61ed0ef73f
Tests: Update geomap golden json ( #80964 )
...
update geomap golden json
2024-01-22 13:25:51 +02:00
Piotr Jamróz
98e3a01aff
Correlations: Enable correlations feature toggle by default ( #80881 )
...
* Enable correlations by default
* Update docs
2024-01-22 09:27:11 +01:00
ismail simsek
777b9bdc49
Prometheus: minStep value is affecting $__interval value ( #80904 )
...
* minStep value is affecting $__interval value
* rename
2024-01-19 21:55:27 +01:00
colin-stuart and Mihaly Gyongyosi
e241188f00
Auth: Implement the SSO Settings List endpoint ( #80769 )
...
* add list endpoint & initial tests
* add tests and ETag
* format service_test.go
* add list swagger param, generate openAPI, remove ETag, use RedactedPassword
* correct swagger param name
* Align tests to latest changes
* use setting.RedactedValue()
* add string assertion
* lint & require no error on res.Body.Close()
* add custom response type
---------
Co-authored-by: Mihaly Gyongyosi <mgyongyosi@users.noreply.github.com >
2024-01-19 14:39:09 -05:00
Julien Duchesne
40312c527b
ngalert openapi: Fix ObjectMatchers definition ( #79477 )
...
These don't get marshalled and unmarshalled in the same way as they are represented in Go
This PR changes the OpenAPI spec to reflect what the API accepts and sends back
2024-01-19 14:37:11 -05:00
Will Browne
d5bec225ed
Plugins: Fix Plugin Context method docs ( #80906 )
...
* fix method docs
* add docs for new method
2024-01-19 16:22:17 +01:00