OpenTSDB: Fix data frame construction (#90991)
* Update type and frame construction
* Update tests
* Keep dataField name as value
(cherry picked from commit 06509712ec)
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
Alerting: Fix persisting result fingerprint that is used by recovery threshold (#91224)
(cherry picked from commit 537f1fb857)
# Conflicts:
# pkg/services/ngalert/state/persister_sync.go
Snapshots: Fix panic when snapshot_remove_expired is true (#91232)
(cherry picked from commit bb5d2c83ef)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Notifications: Do not log email address in error message (#89314)
Do not log email address in error message
(cherry picked from commit c2c30c25ed)
Co-authored-by: William Wernert <william.wernert@grafana.com>
Alerting: Fix rule storage to filter by group names using case-sensitive comparison (#88992)
* add test for the bug
* remove unused struct
* update db store to post process filters by group using go-lang's case-sensitive string comparison
--------
Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
# Conflicts:
# pkg/services/ngalert/store/alert_rule.go
# pkg/services/ngalert/store/alert_rule_test.go
RBAC: List only the folders that the user has access to (#88599)
only check folder permissions when listing folders
(cherry picked from commit 095ca66d9f)
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
User: add second migration for lowercasing login/email of users (#88915)
(cherry picked from commit 39bd13f877)
Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
Chore: Fix test to retry fetching provisioned dashboard until is in place (#85408)
Retry fetching provisioned dashboard until is in place
(cherry picked from commit 88be09420c)
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
LibraryPanels/RBAC: Ignore old folder permission check when deleting/patching lib panel (#88422)
* LibraryPanels/RBAC: Ignore old folder permission check when deleting lib panel
* Same for patching
(cherry picked from commit 8f45003192)
Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
Dashboards: Correctly display Admin access to dashboards in the UI (#88439)
* include folder wildcard scope in dash permission inheritance
* Update pkg/services/accesscontrol/ossaccesscontrol/permissions_services.go
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
---------
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
(cherry picked from commit 1c2ae2c72d)
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
Alerting/Annotations: Return nothing from historian store if filtering by tags and matchAny is false (#85488)
* Return nothing from historian store if filtering by tag
(cherry picked from commit cad8190a91)
Co-authored-by: William Wernert <william.wernert@grafana.com>
* Alerting: Fix scheduler to sort rules before evaluation (#88006)
sort rules scheduled for evaluation to make sure that the order is stable between evaluations.
This is especially important in HA mode.
(cherry picked from commit 05d6813a09)
* use old generators
---------
Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
Azure: Fix for username assertion (#87853)
Fix for username assertion
- Allow setting username assertion in INI
- Correctly set the azsettings value
- Update tests
(cherry picked from commit edae5fc791)
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
Alerting: use logger with same context within rule scheduling loop (#87934)
(cherry picked from commit f410c7fca1)
Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
Alerting: Do not store series values from past evaluations in state manager for no reason (#87525)
Do not store previous execution results on states
(cherry picked from commit a6a9ab4008)
Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
* AuthN: Fix signout redirect url (#87631)
* Add missing return
* Use sign out redirect url from auth config if configured
* remove option from auth.jwt that is not used
(cherry picked from commit 0f3080ecb8)
---------
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
Chore: Add login protection when user is trying different uppercase letters (#87588)
* add login protection when the user is trying different uppercase letters
(cherry picked from commit cd98aaf89b)
Co-authored-by: linoman <2051016+linoman@users.noreply.github.com>
Chore: Implement GetOAuthProviders in FakeSocialService (#87590)
Implement GetOAuthProviders in FakeSocialService
(cherry picked from commit 896882b004)
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
Alerting: Add two sets of provisioning actions for rules and notifications (#87149)
(cherry picked from commit 356a29592b)
Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
Provisioning: Look up provisioned folders by UID when possible (#87465)
look up provisioned folders by uid when possible
(cherry picked from commit 1884b03511)
Co-authored-by: Dan Cech <dcech@grafana.com>
Alerting: Also fix HCL field name for MuteTimeIntervals (#87079)
* Correct HCL field name for MuteTimeIntervals
* Update test
(cherry picked from commit 93519f70ca)
Co-authored-by: William Wernert <william.wernert@grafana.com>
fix: sql expressions - sql parser table name case (#87196)
* fix: sql parser table name case
(cherry picked from commit 4fd2cb6014)
Co-authored-by: Scott Lepper <scott.lepper@gmail.com>
InfluxDB: Support cardinality queries with backend mode (#87264)
support cardinality queries
(cherry picked from commit 3317691615)
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
Auth: Force lowercase login/email for users (#86359)
* [WIP]: Force lowercase login/email for user CRUD
* warn and remove use of userCaseInsensitiveLogin check
* remove log warning
* reimplementation of the caseinsensitive
* need to decide if we want the conflict check or not
* remvoved the tests for conflict user by getEmail, getLogin
* added tests for user lowercase migration
* wip: emails next
* tests for email lowercasing
* review comments
* optimized login and email lookup before migrating
(cherry picked from commit e394e16073)
RBAC: Do not set permissions on data sources with wildcard UID in OSS (#87220)
do not set permissions on DS with wildcard UID
(cherry picked from commit 28dd1ddd8e)
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
* Data source: Maintain the default data source permissions when switching from unlicensed to licensed Grafana (#87119)
set managed data source permissions upon resource creation for unlicensed Grafana, remove them on deletion
(cherry picked from commit 5e060d2d99)
* remove code for older version
---------
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
Alerting: Use expected field name for receiver in HCL export (#87065)
* Use expected field name for receiver in hcl
Terraform provider expects `contact_point` instead of `receiver` in
notification settings on a rule.
(cherry picked from commit 70ff229bed)
Co-authored-by: William Wernert <william.wernert@grafana.com>
Alerting: Improve error when receiver or time interval used by rule is deleted (#86865)
* Alerting: Improve error when receiver used by rule is deleted
* Remove RuleUID from public error and data
* Improve fallback error in am config post
* Refactor to expand to time intervals
* Fix message on unchecked errors to be same as before
(cherry picked from commit 3397e8bf09)
Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
SQLStore: Disable redundant create and drop unique index migrations on dashboard table (#86857)
SQLStore: Disable create and drop unique index migrations
(cherry picked from commit a5a3ee9fa3)
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>