Plugin Metrics: Eliminate data race in plugin metrics middleware (#99396)
fix: eliminate data race in plugin metrics middleware
A data race was detected when multiple goroutines accessed the `MetricsMiddleware`
simultaneously. The race occurred because a single `MetricsMiddleware` instance
was being shared across goroutines while its `BaseHandler` field was being
modified during middleware chain setup.
Fix by creating a new `MetricsMiddleware` instance for each middleware chain,
while safely sharing the thread-safe Prometheus metrics and plugin registry.
This maintains proper metrics collection while eliminating the mutable shared
state that caused the race condition.
Original error was detected here:
```
WARNING: DATA RACE
Read at 0x00c0039c0790 by goroutine 4486:
github.com/grafana/grafana-plugin-sdk-go/backend.(*ErrorSourceMiddleware).CallResource()
/Users/clord/src/grafana/irm-devstack/.devenv/state/go/pkg/mod/github.com/grafana/grafana-plugin-sdk-go@v0.261.0/backend/error_source_middleware.go:93 +0x40
github.com/grafana/grafana-plugin-sdk-go/backend.BaseHandler.CallResource()
...
```
(cherry picked from commit e74cf72d99)
Co-authored-by: Christopher Lord <christopher.lord@grafana.com>
MSSQL: Correctly type `UDPConnectionLimit` (#99011)
* Correctly type UDPConnectionLimit
* Update tests
* Handle legacy case
(cherry picked from commit cc09f38421)
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
DashboardScenes: Fix issue where relative time does not pass properly (#99282)
fix issue where relative time does not pass properly
(cherry picked from commit bf1a0837af)
* feat: update to Go 1.23.5
* chore: make drone
* chore: make update-workspace
* CI: Force re-build
* build: update mariadb connection
The new Alpine base that the Golang images are built on no longer trust the CA of MySQL.
This is a backport of: https://github.com/grafana/grafana/pull/98857
(cherry picked from commit e1bb8ccb79)
setDashboardPanelContext: Allow to add filters from the table with the same key (#99004)
* always add filters for elastic seach ds when filtering table value
* simplify update filter logic and restore behaviour from old arch
* remove unnecessary modifications
* adjust namig
(cherry picked from commit 3df1fa86ae)
Co-authored-by: Sergej-Vlasov <37613182+Sergej-Vlasov@users.noreply.github.com>
Docs: MySQL data source updates/revamp (#98652)
* made initial edits
* continued updates
* finished initial config doc updates
* updates
* updates to query editor
* edits to query editor
* final edits prior to PR
* more final edits :-)
* edits based on feedback meeting
* fixed some spelling and grammar issues
* final edits
* ran prettier
* minor change to intro description
* Fix prettier
* Update docs/sources/datasources/mysql/query-editor/_index.md
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
* Update docs/sources/datasources/mysql/query-editor/_index.md
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
* Update docs/sources/datasources/mysql/query-editor/_index.md
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
* edits based on feedback
* fixed mistake
* Fix prettier
* fixed ref UIs, edits based on feedback
* one minor change
* ran prettier again
---------
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
(cherry picked from commit ab6d82a33c)
Grafana UI: Re-add react-router-dom as a dependency (#97540)
* chore(grafana/ui): add react-router-dom v5 as a dependency
* chore(grafana-ui): align version of react-router with core
---------
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
(cherry picked from commit 7e4b05c268)
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
* Dashboards: Fix issue where filtered panels would not react to variable changes (#98718)
* Make sure we activate the parent and tree even if current panel is active
* force activate full scene object tree
---------
Co-authored-by: Sergej-Vlasov <sergej.s.vlasov@gmail.com>
(cherry picked from commit 56be39ed4f)
* Fix bad merge
OptionsPicker: Fix matching non-latin template vars in filter (#98416)
(cherry picked from commit e43e86376e)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
Docs: Updated Grafana Enterprise page with missing data sources (#98286)
added 5 missing data sources, changed one name
(cherry picked from commit c172bbba50)
Co-authored-by: Larissa Wandzura <126723338+lwandz13@users.noreply.github.com>
Dashboards: Fixes week relative time ranges when weekStart was changed (#98167)
* Dashborads: Fixes week relative time ranges when weekStart was changed
* Fix
* Update
(cherry picked from commit 02aded2743)
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Fix: Show organization attribute path only for GrafanaAdmins on the UI (#98002)
* Show organization attribute path only for GrafanaAdmins
* prettier
(cherry picked from commit 7b24c4404d)
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
DateTimePicker: Fixes issue with date picker showing invalid date (#97888)
* DateTimePicker: Fixes issue with date picker showing invalid date
* Fix lint
(cherry picked from commit d93a5a7c53)
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
GrafanaData: Add now parameter to dateMath.parse to subsitute now string (#97151)
* Add now parameter to dateMath.parse to subsitute now string
* Create new function, deprecate the old
* Add docstring
* Typo
(cherry picked from commit e3e7086a91)
Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
* Azure Monitor: Add a feature flag to toggle user auth for Azure Monitor only (#96858)
* Azure Monitor: Add a feature flag to toggle user auth for Azure Monitor only
* Fix condition for userIdentityEnabled
* Re-add removed test
* Remove unused prop
* Refactor onAuthTypeChange in AzureCredentialsForm
* Add frontend unit tests
* Lint
(cherry picked from commit b898a4540d)
# Conflicts:
# docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md
# packages/grafana-data/src/types/featureToggles.gen.ts
# pkg/services/featuremgmt/registry.go
# pkg/services/featuremgmt/toggles_gen.csv
# pkg/services/featuremgmt/toggles_gen.go
# pkg/services/featuremgmt/toggles_gen.json
* Update test
* Fix lint
---------
Co-authored-by: Adam Yeats <16296989+adamyeats@users.noreply.github.com>
Dashboards: Fixes issue with panel header showing even when hide time override was enabled (#95814)
* Dashboards: Fixes issue with panel header showing even when hide time override was enabled
* fixes
* fixed test
(cherry picked from commit 6fd3620d50)
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>