Commit Graph

15534 Commits

Author SHA1 Message Date
Josh Hunt
bf172dfd29 GrafanaUI: Add noBackdropBlur feature toggle (#102128)
* Create new noBackdropBlur feature toggle

* Disable backdrop blur with feature toggle
2025-03-14 15:21:35 +00:00
Syerikjan Kh
b3452ae720 feat: datasourceconnectionsTab to private preview (#102200) 2025-03-14 11:05:27 -04:00
Eric Leijonmarck
56c896fa72 Revert "Config: Removes setting viewers_can_edit (#101767)" (#102191)
This reverts commit d3a9c04562.
2025-03-14 13:39:59 +00:00
ismail simsek
399df82f0b Prometheus: Read feature toggles once when creating plugin instance (#102131)
* initialize an instance with feature toggles

* read grafana config only once

* use feature toggles directly
2025-03-14 13:54:19 +01:00
ismail simsek
d72b664981 Feature toggle: Introduce infinityRunQueriesInParallel feature toggle (#102129)
introduce infinityRunQueriesInParallel feature toggle
2025-03-14 13:54:04 +01:00
Will Assis
2456eeb69b fix(unified-storage): Improve test coverage on legacy searcher and parse result helper (#102147)
* include TotalHits when searching for provisioning information and improve tests

* return err when parsing search results with mismatch number of columns and cells and add tests for it
2025-03-14 08:25:59 -04:00
Peter Štibraný
9330ca5b54 Remove unused SigningKey struct. (#102041) 2025-03-14 10:41:10 +01:00
Matheus Macabu
0abf0bb0e9 Secrets: make the secrets package a go work module (#102167)
* Secrets: make the decrypt package a go work module

* Chore: add Operator Experience as codeowner for secrets apis

* Chore: move module up two folders
2025-03-14 10:38:19 +01:00
Karl Persson
f1e4706f79 Authn: Concurrent updates to last seen at (#102122)
* Use singleflight for last seen update

* Run last seen update in a signelflight
2025-03-14 10:17:42 +01:00
Peter Štibraný
8625a6c131 Export SpannerConnectorConfigToClientOptions function (used by grafana-enterprise). (#102106)
* Export SpannerConnectorConfigToClientOptions function (used by grafana-enterprise).
2025-03-14 10:07:24 +01:00
Eric Leijonmarck
d3a9c04562 Config: Removes setting viewers_can_edit (#101767)
Reapply "Authz: Removes setting `viewers_can_edit`" (#101528)

This reverts commit 5f6b00a72f.
2025-03-14 08:38:48 +00:00
Alexander Akhmetov
ef5cc12b33 Alerting: Add HMAC signature config to the webhook integration (#100960)
Adds HMAC-SHA256 signature support to webhook notifications, providing a way to verify the authenticity and integrity of webhook requests. The implementation allows to specify the header in which the signature will be sent. The signature is calculated from the request body.

An optional timestamp header name can be provided. If set, the HMAC signature will be generated by concatenating the timestamp, a ":" and the request body: {timestamp}:{body}. The timestamp will also be sent in the provided header name.
2025-03-14 07:22:41 +01:00
Michael Mandrus
4420ff9202 SecretsManager: Merge codegen portion so that we can use the dependency elsewhere (#102152)
* copy changes over from feature branch

* update codegen
2025-03-13 18:10:46 -04:00
Nick Richmond
ae7cba3268 MetricsDrilldown: Advance exploreMetricsUseExternalAppPlugin feature toggle stage (#102137)
* chore: advance `exploreMetricsUseExternalAppPlugin` feature toggle stage

* fix: do not hide from docs
2025-03-13 17:50:37 -04:00
Peter Štibraný
1068568814 Spanner: Fix query for limiting query history. (#102132) 2025-03-13 18:39:49 +02:00
Peter Štibraný
4d5fd2cfb7 Spanner: Fix queries for deleting query history. (#102125) 2025-03-13 17:13:43 +01:00
Peter Štibraný
6f12712ad6 Add Spanner dialect to pkg/storage/unified/sql/sqltemplate package. (#102121) 2025-03-13 16:38:05 +01:00
Ieva
9264431c81 RBAC: Remove action set feature toggle (#101959)
* remove action set feature toggle

* don't pass feature toggles to action set service instantiation

* linting

* test fixes and frontend clean-up

* fix test
2025-03-13 15:18:23 +00:00
Will Assis
31a371e385 fix(unified-storage): remove bleve index metric from global scope (#101825)
* refactor grafana_index_server_index_size to calculate in a goroutine instead of at scrape time and remove grafana_index_server_indexed_docs metric

* use wire to inject bleve index metrics

* remove sprinkles metrics from bleve index metrics

* log error when trying to calculate file index size and bump interval to 1m instead of 5s
2025-03-13 10:09:38 -04:00
Andres Martinez Gotor
a9634f9b12 Advisor: Skip plugin check for provisioned plugins (#101782) 2025-03-13 15:04:08 +01:00
Karl Persson
5d94293305 Authz: Fix namespace authorization when calling a cluster resource (#102110) 2025-03-13 14:54:35 +01:00
Will Browne
8d839780d6 Plugins: Update to latest go plugin SDK version (0.272.0) (#102090)
update go plugin sdk to latest
2025-03-13 10:23:30 +00:00
ismail simsek
4c61991d7c Chore: Remove unused prometheusDataplane feature toggle parameters (#102061)
remove unused prometheusDataplane feature toggle parameters
2025-03-13 11:12:20 +01:00
Gábor Farkas
40b1b62502 improve the debugging experience (#101779)
improve debugging experience
2025-03-13 11:10:07 +01:00
Ashley Harrison
f3fb9592da Org redirection: Fix linking between orgs (#102021)
* don't trim path

* add unit test
2025-03-13 09:42:12 +00:00
Igor Suleymanov
5d2ba10113 K8s/Dashboards: Extract Dashboard APIs to an app submodule (#102029)
* Move dashboard k8s APIs to a separate app

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>

* Copy dashboard code in Dockerfile

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>

* Fix conversion generation

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>

* Update OpenAPI snapshot for dashboard/v0alpha1

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>

---------

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
2025-03-13 11:05:01 +02:00
Steve Simpson
87638c0170 Alerting: Start splitting apart ngalert/api package. (#102075) 2025-03-13 09:28:35 +01:00
Georges Chaudy
3589baac68 Unistore: Batch write events (#101381)
* Batch write events

* Improve instrumentation

* Measure batch phases

* Detect lock contention

* remove the execBatch goroutine

* removing tracing prefix

* detect context cancel

* batch channel map
2025-03-13 10:24:12 +02:00
owensmallwood
56293d8019 Revert "Revert "Unified Storage: Use match all query instead of wildcard for not-in requirement query"" (#102074)
Revert "Revert "Unified Storage: Use match all query instead of wildcard for …"

This reverts commit 4d9bcc6c44.
2025-03-13 02:08:56 +02:00
Will Assis
edb331dc00 fix(unified-storage): Fix legacysearch returning mismatched cell/column count in response (#102044)
Fix legacysearch returning less cells than column count in search response
2025-03-12 13:00:22 -07:00
owensmallwood
4d9bcc6c44 Revert "Unified Storage: Use match all query instead of wildcard for not-in requirement query" (#102058)
Revert "Unified Storage: Use match all query instead of wildcard for not-in r…"

This reverts commit 59d87fe3f1.
2025-03-12 12:28:49 -06:00
Ivan Ortega Alba
bfedf0b512 Dashboard: Redirect between v1alpha1 and v2alpha1 depending on stored version (#101292)
* wip: Create a proxy state manager to avoid complexity

* Read path redirecting

* add tests for unified dashboard API

* add tests

* Contemplate both formats in DashboardProxy

* Fix force old

* Fix tests for proxy

* catch errors

* Save as V2 when dynamic dashboard is enabled

* Improve tests

* Remove feature toggle

* Use kubernetesDashboards for e2e suite

* Fix issue when loading snapshots

* Fix typescript errors

* Integrate with backend conversion error

* Remove legacy annotation

* fix snapshot loading; lint

* Add missing hideTimeControls

* fix test

* make setupDashboardAPI to all suites

* refactor getDashboardAPI

* Add tests

* fix DashboardScenePage tests

* fix tests

* fix go tests

* Refactor to understand better the need of transforming to v2 to compare

* Fix detect changes logic

* yes status from schema gen

---------

Co-authored-by: alexandra vargas <alexa1866@gmail.com>
Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com>
2025-03-12 11:43:32 -06:00
Eric Leijonmarck
94020aa9cd Config: Remove setting editors_can_admin (#101607)
* Remove editors can admin

* delete file

* add ac_test back

* Add linting ignore

* more static ignore
2025-03-12 16:25:23 +00:00
Sam Jewell
21b9d45ca6 SQL Expressions: Add CASE/WHEN nodes and fixes (and test) for functions just added to allowlist (#102040)
* SQL Expressions: Add CASE/WHEN SQL nodes to allowlist

* Fixed and test for functions added in #102011

* Add remaining functions to the test-case

These are mostly aliases, so the LLM chose to omit them originally.
But adding now for completeness

* Fix ordering of allowed nodes
2025-03-12 15:57:50 +00:00
Peter Štibraný
abe6a3121c spanner: disable recursive queries (#102032) 2025-03-12 15:43:06 +01:00
Peter Štibraný
9e1e338c5b signingkeys: Change PrivateKey struct type to string, to match TEXT type of SQL column in signing_keys table. (#102016) 2025-03-12 15:40:39 +01:00
Peter Štibraný
f3df64b7f4 Pass BOOL values as real types (int/bool) instead of strings to SQL parameters. (#101961)
* Pass BOOL values as real types (int/bool) instead of strings to SQL parameters.

Fixes following integration tests when running with Spanner:
* TestIntegrationDataAccess
    * GetDataSourcesByType/Get_prunable_data_sources
* TestIntegrationUserAuthToken:
    * expires_correctly
    * can_properly_rotate_tokens
    *  keeps_prev_token_valid_for_1_minute_after_it_is_confirmed

* Fix more places where "true" or "false" string was passed as query parameter instead of bool value.

* Removed unit test because it brought unwanted dependencies on xorm into multiple modules.
2025-03-12 15:40:11 +01:00
Georges Chaudy
1f637d07eb unistore: check namespace (#102020)
* check namespace in unistore

* fix tests

* fix trace status

* Use capital letter

---------

Co-authored-by: Karl Persson <23356117+kalleep@users.noreply.github.com>
2025-03-12 14:37:17 +01:00
Nick Richmond
00d9916113 ExploreMetrics: Preinstall metrics drilldown app (#100094)
* feat: preinstall metrics drilldown app

* refactor: simplify

* fix: read feature toggles before plugin settings
2025-03-12 09:23:10 -04:00
Yulia Shanyrova
3f2eb087ea Plugins: Update all core plugins with raise issue and docs links (#101929)
* update all core plugins with raise issue and docs links

* fix plugin loader test, run prettier

* fix test

* update test results for api plugin tests
2025-03-12 14:15:46 +01:00
ismail simsek
dcba71a0b0 Prometheus: Improve native histogram response parsing performance (#102024)
* introduce tests

* improve allocation by %61

* ~%27 improvement

goos: darwin
goarch: arm64
pkg: github.com/grafana/grafana/pkg/promlib/converter
cpu: Apple M1 Pro
                                                            │  pmem.0.txt  │             pmem.2.txt             │
                                                            │    sec/op    │   sec/op     vs base               │
ReadPrometheusStyleResult_FromFile/prom-query-range.json-10   117.72µ ± 6%   82.90µ ± 4%  -29.57% (p=0.002 n=6)

                                                            │  pmem.0.txt   │             pmem.2.txt              │
                                                            │     B/op      │     B/op      vs base               │
ReadPrometheusStyleResult_FromFile/prom-query-range.json-10   104.34Ki ± 0%   76.09Ki ± 0%  -27.08% (p=0.002 n=6)

                                                            │ pmem.0.txt  │            pmem.2.txt             │
                                                            │  allocs/op  │ allocs/op   vs base               │
ReadPrometheusStyleResult_FromFile/prom-query-range.json-10   2463.0 ± 0%   899.0 ± 0%  -63.50% (p=0.002 n=6)

* add more tests

* remove comment lines

* read string as slice to prevent type conversion

* golang lint

* revert appendValueFromString improvement

* fix merging issues

* improve native histogram response parsing
2025-03-12 14:12:24 +01:00
ismail simsek
f64be062c4 Prometheus: Improve response parser performance (#101517)
* introduce tests

* improve allocation by %61

* ~%27 improvement

goos: darwin
goarch: arm64
pkg: github.com/grafana/grafana/pkg/promlib/converter
cpu: Apple M1 Pro
                                                            │  pmem.0.txt  │             pmem.2.txt             │
                                                            │    sec/op    │   sec/op     vs base               │
ReadPrometheusStyleResult_FromFile/prom-query-range.json-10   117.72µ ± 6%   82.90µ ± 4%  -29.57% (p=0.002 n=6)

                                                            │  pmem.0.txt   │             pmem.2.txt              │
                                                            │     B/op      │     B/op      vs base               │
ReadPrometheusStyleResult_FromFile/prom-query-range.json-10   104.34Ki ± 0%   76.09Ki ± 0%  -27.08% (p=0.002 n=6)

                                                            │ pmem.0.txt  │            pmem.2.txt             │
                                                            │  allocs/op  │ allocs/op   vs base               │
ReadPrometheusStyleResult_FromFile/prom-query-range.json-10   2463.0 ± 0%   899.0 ± 0%  -63.50% (p=0.002 n=6)

* add more tests

* remove comment lines

* read string as slice to prevent type conversion

* golang lint

* revert appendValueFromString improvement

* fix merging issues
2025-03-12 13:16:19 +01:00
Sam Jewell
4bd5f29e05 SQL Expressions: Allow more functions (#102011)
I used Cursor and Claude 3.7 thinking to expand the list of functions
we allow. Specifically I needed `abs`.

TODO: Check each of these in the official MySQL docs to ensure they
are all safe:
eg. this doc: https://dev.mysql.com/doc/refman/8.4/en/flow-control-functions.html#operator_case
2025-03-12 11:39:48 +00:00
ismail simsek
dacb25ec2a Prometheus: Add labels to all native histogram fields (#101812)
add labels to all histogram fields
2025-03-12 12:34:23 +01:00
Will Browne
5a2cba7b01 Plugins: Forward HTTP headers to plugin streaming calls (#101960)
* forward HTTP headers to plugin streaming calls

* fixup

* fix test based on feedback

* improve test assertions
2025-03-12 10:37:07 +00:00
Peter Štibraný
ee23a7a7d9 Disable dashboard and folder synchronization when running on Spanner. (#102007) 2025-03-12 11:02:00 +01:00
Selene
e128c36127 Codegen: Cog and go fixes (#101408)
* Update to latest cog version and update workspaces

* Update generated go files

* Try to avoid concurrency issues

* Update workspaces

* Try to remove the sync...

* Remove grafana dependency from xorm go.mod file
2025-03-12 10:12:56 +01:00
Ryan McKinley
e6f682bc14 K8s/Dashboards: Fix title extraction (#101990) 2025-03-12 09:46:12 +02:00
Matheus Macabu
848d49e70f Chore: Add username option for redis remote cache (#101787)
* Chore: Add username option for redis remote cache

(cherry picked from commit 25e28dc85e)

* Chore: Update docs and config with sample Redis conn with user+pass

---------

Co-authored-by: Thomas Fournier <tfournier@evolves.fr>
2025-03-12 08:26:41 +01:00
Ryan McKinley
cd7b66e2e8 Provisioning: Add RTK client in main (#101991)
add frontend
2025-03-12 10:01:55 +03:00