Commit Graph

10342 Commits

Author SHA1 Message Date
Ieva
7860ca6c3d
RBAC: protect folder creation and moving (#64636)
* protect moving folders to a subfolder and creating folders in a subfolder

* folder update endpoint isn't used for folder parent update

* lint

* move permission check logic to services, fix tests

* linting
2023-03-20 11:04:22 +00:00
Sofia Papagiannaki
4ee0be6fdf
Chore: Add function for detecting if the SQL driver supported CTEs (#64441)
* Add interface method for detecting if the SQL driver supported CTEs

* Update nested folder store to call RecursiveQueriesAreSupported()
2023-03-20 10:27:08 +02:00
ismail simsek
ae07bf7ce5
Influxdb: Response parser performance improvement (#64776)
* Influxdb response parser allocation improvements

* More improvements

* more improvements

* embed file

* use json-iterator

* rename

* use encoding/json
2023-03-17 20:45:13 +01:00
Alexander Weaver
40c5713cbd
Vendor errors.Join from Go standard library to avoid version incompatibilities (#64985)
Vendor errors.Join from std lib
2023-03-17 14:07:58 -05:00
Alexander Weaver
a31672fa40
Alerting: Create new state history "fanout" backend that dispatches to multiple other backends at once (#64774)
* Rename RecordStatesAsync to Record

* Rename QueryStates to Query

* Implement fanout writes

* Implement primary queries

* Simplify error joining

* Add test for query path

* Add tests for writes and error propagation

* Allow fanout backend to be configured

* Touch up log messages and config validation

* Consistent documentation for all backend structs

* Parse and normalize backend names more consistently against an enum

* Touch-ups to documentation

* Improve clarity around multi-record blocking

* Keep primary and secondaries more distinct

* Rename fanout backend to multiple backend

* Simplify config keys for multi backend mode
2023-03-17 12:41:18 -05:00
Ezequiel Victorero
e01a3e0ea5
PublicDashboards: Added grafana special datasources to supported list (#64930) 2023-03-17 13:14:24 -03:00
Serge Zaitsev
2d30f33ad8
Chore: Unite wire graphs for cli and server (#61143)
* Chore: unite wire graphs for cli and server

* remove cli wire once again

* try to fix runner wire injection

* unify runner initialisation
2023-03-17 16:36:39 +01:00
Sofia Papagiannaki
f5cb8c660e
SQLStore: Fix setting query tries for integration tests (#64944)
* SQLStore: Pass testinfra database configuration to the test database

* Add test

* Bypass gocyclo check for initTestDB
2023-03-17 17:31:03 +02:00
Sven Grossmann
7261c6f7cd
DataSourceWithBackend: Add queryGroupId to find correlated/related queries (#64587)
* add `correlationId` to queries

* trace correlation id in backend

* add correlation id to loki's span

* add correlation id to query chunks

* fix test

* fix DataSourceWithBackend test

* change to `queryGroupId`

* remove empty line

* fix test in `DataSourceWithBackend`
2023-03-17 15:48:13 +01:00
Alexander Weaver
9bcf8819d3
Alerting: Handful of small adjustments to log levels and parameters (#64572)
Calculate duration earlier in scheduler
2023-03-17 12:15:49 +00:00
gotjosh
02a8f62021
Alerting: Fix stats that display alert count when using unified alerting (#64852)
* Alerting: Fix stats when using unified alerting
2023-03-17 11:19:18 +00:00
Ashley Harrison
f4c62a5c5d
Navigation: handle case when there is no alerting node at all (#64941)
* handle case when there is no alerting node at all

* update backend tests
2023-03-17 11:08:36 +00:00
Sofia Papagiannaki
41843464d1
SQLStore: Fix SQLite error propagation if query retries are disabled (#64904)
* SQLStore: Add test when query retrying is disabled

* Fix condition

* Add test cases for sqlite3.ErrLocked
2023-03-17 12:57:13 +02:00
Ezequiel Victorero
8f0a9729f0
PublicDashboards: Allow hidden queries execution (#64858) 2023-03-16 15:39:17 -03:00
Ashley Harrison
54dd8943ca
Navigation: Correctly create Alerts and incidents section when using legacy alerting (#64924)
check for legacy alerting node as well
2023-03-16 17:55:23 +00:00
Jo
0e565a2e6c
ServiceAccounts: Collect usage stat for service account forced expiry (#64833)
collect usage stat for service account forced expiry
2023-03-16 16:36:31 +01:00
Jo
7784782512
AuthN: Add password and login form stats (#64868)
* add password and login form stats

* fix method handler

* fix viewers can edit test
2023-03-16 16:34:43 +01:00
George Robinson
0b506b4ccc
Alerting: Update github.com/grafana/alerting (#64882) 2023-03-16 13:59:35 +00:00
Andrej Ocenas
998b035d52
Phlare: Fix panic on empty pprof profile (#64888) 2023-03-16 14:02:56 +01:00
Stephanie Hingtgen
10db808ea1
Plugins: Add sql support for the secure socks proxy (#64630) 2023-03-16 06:54:19 -06:00
Jo
6b6cf5f4b7
Cfg: Move ViewersCanEdit into cfg (#64876)
move ViewersCanEdit into cfg
2023-03-16 10:54:01 +01:00
Ieva
f966045129
Search: Improvements for starred dashboard search (#64758)
* improvements for starred dashboard search

* fix workflows for the case when no dashboards are starred

* PR feedback (don't query DB if starred dashboards and requested but no starred IDs are found) and linting

* return empty list not null in case of no starred dashboards

* return empty list not null in case of no starred dashboards pt 2

* return empty list not null in case of no starred dashboards pt 3
2023-03-16 09:20:07 +00:00
Jo
ccbf200c4a
SupportBundles: Add OAuth bundle collectors (#64810)
* wip

* add oauth support bundles

* add specific configs for generic oauth and azureAD

* add doc entry

* optimize struct packing

* Update pkg/login/social/azuread_oauth.go

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>

* nit update

---------

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2023-03-16 09:46:25 +02:00
Carl Bergquist
6d5688ed94
remotecache: set secret service on encryptionstorage (#64849)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
2023-03-15 20:19:35 +01:00
ismail simsek
0823672fce
Influxdb: Re-introduce backend migration feature toggle (#64829)
* Revert "Influxdb: Remove backend migration feature toggle (#61308)"

This reverts commit 67c02f66

* Put feature toggle back
2023-03-15 18:12:16 +01:00
Kristin Laemmert
8745d7ef1b
extract kindsys to external library (#64562)
* extract kindsys

* reinstate kindsys report

This may end up living somewhere else (or not! who knows!), but the important part is that I don't get rid of it right now :)

I hate the package layout (kindsysreport/codegen) for the main function and will take pretty much any alternative suggestion, but we can change also change it later.

Note that the generated report.json is in a different location - anything using this (ops something) needs to be updated.

* kindsysreport in codeowners
2023-03-15 12:04:28 -04:00
Ezequiel Victorero
3f5acf346d
PublicDashboards: Query collapsed panels inside rows (#64779) 2023-03-15 12:44:17 -03:00
Artur Wierzbicki
b6f77bdfdb
Chore: provide authn.Service rather than *authnimpl.Service (#64792)
chore: provide `authn.Service` rather than `*authnimpl.Service` (#64792)
2023-03-15 03:04:11 -07:00
ying-jeanne
6974f4340b
NestedFolders: Fix nested folder deletion (#63572)
---------

Co-authored-by: suntala <arati.rana@grafana.com>
Co-authored-by: ying-jeanne <ying-jeanne@users.noreply.github.com>
Co-authored-by: jeanne0731 <jeanne0731@users.noreply.github.com>
2023-03-15 09:51:37 +01:00
Yuri Tseretyan
85a954cd81
Alerting: Update scheduler to get updates only from database (#64635)
* stop using the scheduler's Update and Delete methods all communication must be via the database
* update scheduler's registry to calculate diff before re-setting the cache
* update fetcher to return the diff generated by registry
* update processTick to update rule eval routine if the rule was updated and it is not going to be evaluated at this tick.
* remove references to the scheduler from api package
* remove unused methods in the scheduler
2023-03-14 18:02:51 -04:00
Ryan McKinley
6751a93d49
FeatureToggles: remove open type declaration (#64645) 2023-03-14 19:47:32 +02:00
Jo
aade4b0bd2
AnonymousService: Test tagging service (#64708)
* add anonymous tagging tests

* lint
2023-03-14 10:47:34 +01:00
Alexander Weaver
faef3a8258
Alerting: Log error but don't fail initialization if state history connection test fails (#64699)
Don't return init error if ping fails, add tests
2023-03-13 15:54:46 -05:00
Isabella Siu
74436d31de
CloudWatch Logs: Queries in an expression should run synchronously (#64443) 2023-03-13 13:31:46 -04:00
Ryan McKinley
6720690615
FeatureToggles: generate a csv file for easy auditing (#64647)
Co-authored-by: Artur Wierzbicki <artur.wierzbicki@grafana.com>
2023-03-13 08:07:12 -07:00
Artur Wierzbicki
08f2791b22
Chore: assign owner for prometheusAzureOverrideAudience (#64620)
assign the last owner
2023-03-13 16:56:55 +04:00
Andrej Ocenas
6647217208
Phlare: Use enum config to send deduplicated func and filenames (#64435) 2023-03-13 11:06:04 +01:00
Ivana Huckova
d6eea0c7b5
Elasticsearch: Fix histogram fields to be filterale when processed trough backend (#64514)
* Elasticsearch: Fix histogram fields to be filterale when processed trough backend

* Simplify test and reuse logic
2023-03-13 10:11:18 +01:00
Ryan McKinley
d5a9a0cea0
Chore: remove comments feature (#64644) 2023-03-11 04:28:12 -08:00
Brendan O'Handley
50ef183208
InfluxDB: Fix type assertion panics for interface conversion: interface {} is nil (#64556)
* fix type assertions

* fix chk

* add nil and fix tests

* add test for null bool and strings in the JSON response to be parsed as nil in Go

* reduce complexity

* reduce complexity

* reduce complexity again

* switch case for valTypes
2023-03-10 11:11:00 -05:00
juanicabanas
222ad02176
PublicDashboards: Enable creation when dashboard has template variables (#64560) 2023-03-10 11:45:38 -03:00
Andres Martinez Gotor
80e8ac640e
Docs: Update plugin.json docs and schema (#64297) 2023-03-10 15:07:35 +01:00
Torkel Ödegaard
73ce20ab48
Table Panel: Add ability to use text color for value or hide value in gauge cell (#61477)
* BarGauge: New value options

* Fix typings for cell options, add new value mode option for bar gauge cells

* Add BarGauge panel option, tests, and update test dashboard

* Updated

* Added default

* Goodbye trusty console.log

* Update

* Merge changes from main

* Update docs

* Add valuemode doc changes

* Update gdev dashboard

* Update valueMode symbol name to valueDisplayMode

* Use Enums as Opposed to literals, don't calculate values when hidden

* Remove double import

* Fix tests

* One more test fix

* Remove erroneous targets field, fix type of maxDataPoints

* Strip nulls and add index field to Thresholds

* Gen cue

* remove bad targets again

* Fixes

---------

Co-authored-by: Kyle Cunningham <kyle@codeincarnate.com>
Co-authored-by: sam boyer <sdboyer@grafana.com>
2023-03-10 14:41:46 +01:00
Carl Bergquist
eb507dca89
Remotecache: rename setbytearray/getbytearray to set/get and remove codec (#64470)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
2023-03-10 13:57:29 +01:00
Domas
548a5054ad
Table: Introduce sparkline cell type (#63182) 2023-03-10 14:41:06 +02:00
Ashley Harrison
c955c20670
Chore: assign ownership of tracing feature flag to user essentials (#64598)
assign ownership of tracing feature flag to user essentials
2023-03-10 07:15:41 -05:00
Agnès Toulet
f9b5dbb473
Codegen: fix jenny_eachmajor.go (#64287)
Update jenny_eachmajor.go
2023-03-09 18:24:03 +01:00
juanicabanas
4d0e309d4e
PublicDashboards: New method created to get access through Request access page when its paused (#64451) 2023-03-09 14:17:54 -03:00
Karl Persson
8ef2afda87
ContextHandler: Always initiate permission map on signed in user (#64541) 2023-03-09 18:08:56 +01:00
Ieva
ed11c32c1d
Support bundles: fix user collector permissions and format collector output (#64531)
* fix user collector permissions and format collector output

* lint
2023-03-09 11:43:18 -05:00