Authn: No longer hash service account token twice during authentication (#92598)
* APIKey: Only decode and hash token once during authentication
* Only update last used every 5 minutes
(cherry picked from commit 56487d37db)
Annotations: only set userID if caller is a user or service account (#91898)
* Ignore errors when extracting current user id
* Only set userID if caller is user or service account
* Fix patch api
(cherry picked from commit e9bb3b4d73)
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
QuotaService: refactor to use ReplDB for Get queries (#91333)
* Feature (quota service): Use ReplDB for quota service Gets
This adds the replDB to the quota service, as well as some more test helper functions to simplify updating tests. My intent is that the helper functions can be removed when this is fully rolled out (or not) and we're consistently using the ReplDB interface (or not!)
* test updates
(cherry picked from commit 299c142f6a)
Co-authored-by: Kristin Laemmert <mildwonkey@users.noreply.github.com>
* OpenTSDB: Fix data frame construction (#90991)
* Update type and frame construction
* Update tests
* Keep dataField name as value
(cherry picked from commit 06509712ec)
* OpenTSDB: Fix test (#91761)
Fix test
---------
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
* RBAC: Fix an issue with server admins not being able to manage users in orgs that they don't belong to (#92024)
* look at global perms if user is not a part of the target org
* use constant
* update tests
(cherry picked from commit 41ac5b5ae7)
* fix tests
---------
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
Auth: Skip email extraction when api url is not present (#91699)
* Auth: Skip email extraction when api url is not present
* fix lint: reduce cyclomatic complexity
(cherry picked from commit be32630de5)
Co-authored-by: Agni Bhattacharyya <34892434+PyAgni@users.noreply.github.com>
Alerting: Support for optimistic concurrency in priovisioning Tempate API (#91195)
* support optimistic concurrency in template service
* update request handler to get version from query parameter
* return not found if a new template is set with version
* update PUT api to set version
* update documentation + for mute timings
---------
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
(cherry picked from commit 1108a00668)
Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
* Add migration to enable TraceQL streaming for Tempo datasources
* lint
* Always run migration but exit early if feature flag is disabled
* Require feature toggle OR datasource config to enable streaming
* minor performance improvement
* apply a warning to any non-core plugins that successfully migrate
* commit frontend wip while I refactor some stuff
* update api
* repurpose error dialog to be a generic details dialog
* whitespace
* add unit test
* fixes from testing
* fix migration summary
* add comment
* fix localization stuff
* fix backend test
* reduce number of queries to the db
* some PR feedback
* whitespace
This PR adds instrumentation for loading frontend SPA along with select methods in the dashboard service, and cleans up span handling in sqlstore.
---------
Co-authored-by: Dave Henderson <dave.henderson@grafana.com>
* remove nonnamespaced paths
* use common.Unstructed for Intergration.Settings
* update codeowners to include alerting
* fix json name of secure fields to start with lower case