Commit Graph

13451 Commits

Author SHA1 Message Date
Alexander Zobnin
ba16c37126
Zanzana: Simple openfga client wrapper (#89430) 2024-06-20 10:37:16 +02:00
Andres Martinez Gotor
5f44c97e5f
API Servers: Avoid crashing on panic (#89281) 2024-06-20 09:10:03 +02:00
Yuri Tseretyan
92f10b73a8
Alerting: Move interface Namespaced from accesscontrol to models package (#89439)
move Namespaced interface from accesscontrol to models
2024-06-19 16:18:33 -04:00
Karl Persson
3fe29809be
Zanzana: database migrations (#89390)
* Zanana: Use grafana migrations to run openFGA migration files and initilize store.

* Add feature toggle

* Zanzana: return noop client if feature toggle is disabled
2024-06-19 15:59:47 +02:00
Michael Mandrus
8a8f97b0e4
CloudMigrations: Implement snapshot management apis (#89296)
* add new apis

* add payloads

* create snapshot status type

* add some impl

* finish implementing update

* start implementing build snapshot func

* add more fake build logic

* add cancel endpoint. do some cleanup

* implement GetSnapshot

* implement upload snapshot

* merge onprem status with gms result

* get it working

* update comment

* rename list endpoint

* add query limit and offset

* add helper method to snapshot

* little bit of cleanup

* work on swagger annotations

* manual merge

* generate swagger specs

* clean up curl commands

* fix bugs found during final testing

* fix linter issue

* fix unit test
2024-06-19 09:20:52 -04:00
Alexander Zobnin
b3907ca5ec
Zanzana: Simple logger wrapper for openfga (#89396)
* Zanzana: Simple logger wrapper for openfga

* don't export
2024-06-19 13:55:31 +02:00
Steve Simpson
8eabef1f91
Alerting: Update remote alertmanager to use extended receivers API. (#89253)
* Alerting: Update remote alertmanager to use extended receivers API.

* Update integration test and Mimir image

* Update Mimir image in more places
2024-06-19 12:40:22 +03:00
ismail simsek
dfcda2b14a
InfluxDB: Don't interpolate bucket keyword in flux language if it is part of a join query (#89298)
don't interpolate bucket keyword if it is part of a join query
2024-06-19 08:22:16 +02:00
Alexander Weaver
7c69f3657b
Notifications: Redact URL from errors (#85687)
* Remove url logs and redact

* Reinclude redacted URL
2024-06-18 16:02:33 -05:00
Dave Henderson
3bbc821131
Metrics: Add ability to disable classic histogram for HTTP metric (#88315)
metrics: Add ability to disable classic histogram for HTTP metric

Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
2024-06-18 15:37:44 -04:00
Ryan McKinley
9b7f9ae22e
K8s: Rename origin.key to origin.hash (#89337) 2024-06-18 22:27:16 +03:00
Laura Benz
34b3dbdbf3
RestoreDashboards: Adjust path (#89233)
* refactor: change path

* fix: page headline

* refactor: remove condition
2024-06-18 17:24:48 +02:00
Kristin Laemmert
50244ed4a1
Experimental Feature Toggle: databaseReadReplica (#89232)
This adds a version of the SQLStore that includes a ReadReplica. The primary DB can be accessed directly - from the caller's standpoint, there is no difference between the SQLStore and ReplStore unless they wish to explicitly call the ReadReplica() and use that for the DB sessions.

Currently only the stats service GetSystemStats and GetAdminStats are using the ReadReplica(); if it's misconfigured or if the databaseReadReplica feature flag is not turned on, it will fall back to the usual (SQLStore) behavior.

Testing requires a database and read replica - the replication should already be configured. I have been testing this locally with a docker mysql setup (https://medium.com/@vbabak/docker-mysql-master-slave-replication-setup-2ff553fceef2) and the following config:

[feature_toggles]
databaseReadReplica = true

[database]
type = mysql
name = grafana
user = grafana
password = password
host = 127.0.0.1:3306

[database_replica]
type = mysql
name = grafana
user = grafana
password = password
host = 127.0.0.1:3307
2024-06-18 11:07:15 -04:00
Ashley Harrison
50dd95c09b
Chore: Remove betterPageScrolling toggle (#89339)
* remove betterPageScrolling toggle

* add scrollTo test shim
2024-06-18 14:33:08 +01:00
Agnès Toulet
44a40f8e0c
E2E: Add SMTP tester (#88392)
* E2E: Add SMTP tester

* fix loadlocation issue when running tests on alpine

* temporary update

* add log

* update run-suite

* Update run-suite

* Update run-suite

* Update run-suite

* Update yarn.lock

* apply suggestions + cleanup logs

* update yarn.lock & package.json

* fix swagger
2024-06-18 14:32:19 +02:00
Kristin Laemmert
cc1d3d0f8d
Chore(TeamService): remove extra Transaction from getTeamMember (#89308)
remove extra Transaction from getTeamMember
2024-06-18 07:51:50 -04:00
Mihai Doarna
d074cc7892
Auth: Implement reload function for LDAP (#89267)
* keep config in a separate struct in LDAP

* implement reload function for LDAP

* remove param from sso service constructor

* update unit tests

* add feature flag

* remove nil params

* address feedback

* add unit test for disabled config
2024-06-18 14:31:27 +03:00
Sofia Papagiannaki
0afbaa39df
Dashboards: Fix restoring dashboard to root folder (#89020)
* Fix restoring dashboard to root folder

* use a root folder representation instead of nil

* change root folder by general folder

---------

Co-authored-by: Ezequiel Victorero <ezequiel.victorero@grafana.com>
2024-06-18 14:21:40 +03:00
Karl Persson
606a74d0af
Zanzana: Initial work to run openFGA as embedded or standalone service (#89211)
* Zanana: Initial work to run zanana as ebeddedn or standalone

* Add addr settings for when remote client is used.

* sync dependencies

* Lock mysql driver version
---------

Co-authored-by: Dan Cech <dcech@grafana.com>
2024-06-18 10:04:18 +02:00
Gabriel MABILLE
5f83fdef2c
AuthZ: GRPC client init and config options (#89161) 2024-06-18 06:13:24 +02:00
ismail simsek
92233350f8
InfluxDB: Add custom metadata to the first frame via header (#88698)
* add custom metadata via header to the response

* use strings.CutPrefix instead of regex
2024-06-17 20:02:53 +03:00
Brendan O'Handley
8fddf30621
InfluxDB: Flight SQL test, add function to search for free port (#89255)
* add function to search for free port

* Update pkg/tsdb/influxdb/fsql/fsql_test.go

Co-authored-by: Dave Henderson <dave.henderson@grafana.com>

* Update pkg/tsdb/influxdb/fsql/fsql_test.go

Co-authored-by: Dave Henderson <dave.henderson@grafana.com>

* fix test

* fix go linting issue

* fix go lint

---------

Co-authored-by: Dave Henderson <dave.henderson@grafana.com>
2024-06-17 09:16:52 -05:00
Josh Hunt
51c0644e41
RestoreDashboards: add IsDeleted and PermanentlyDeleteDate to deleted search (#89283)
RestoreDashboards: add IsDeleted and PermanentlyDeleteDate to deleted items in Search
2024-06-17 14:26:23 +01:00
Sonia Aguilar
e75fbe10ca
Alerting: Central alert history (part1) (#88593)
* WIP

* Add barchart panel with scenes

* Fix timerange in barchart panel

* Refactor: component names

* Remove not used css styles and rename panel title

* Remove unnecessary HistoryEventsListObject class and update text in labels filter

* add padding top for filter

* Add translations

* update limit labels constant

* Update showing state reason

* Fix scene object

* Address review comments

* Update icons

* use endpoints instead of the autogenerated hook

* Address review comments

* Add tooltip for alert name

* use private polling interval

* fix autogenerated translations

* Address pr rewview comments

* Address review comments

* Update text in placeholder

* Rename variable and remove spaces in Trans children
2024-06-17 14:54:15 +02:00
Mihai Doarna
32d21356b9
Auth: Keep config in a separate struct in LDAP (#89149)
keep config in a separate struct in LDAP
2024-06-17 15:34:06 +03:00
Steve Simpson
43a246f431
Alerting: Improve performance of /api/prometheus for large numbers of alerts. (#89268)
* Alerting: Optimize sorting alert instances.

* Also change other Labels fields for consistency
2024-06-17 12:25:47 +02:00
Darren Janeczek
a7726ff813
fix: "Feature toggles" sentence casing on menu item (#89249)
fix: sentence casing on menu item
2024-06-17 11:22:11 +01:00
Ida Štambuk
ab2af9b8f7
Feature management: Add openSearchBackendFlowEnabled feature toggle (#89208) 2024-06-17 11:41:50 +02:00
Diego Augusto Molina
b9812a0784
Unified Storage: Fix data races and context usage in broadcaster (#88955)
* Fix several broadcaster data races and error handling

- Separate concerns between sender and receiver sides in channel usage
- broadcaster: Fix data race between Subscribe/Unsubscribe and start
- Fix Subscribe error to be io.EOF when broadcaster is terminated
- Fix Watch never unsubscribing
- General cleanup
- fix usage of context
- add a huge amount of documentation about channels
2024-06-15 02:46:14 -03:00
Alexander Weaver
8491e02caf
Alerting: Instrument outbound requests for Loki Historian and Remote Alertmanager with tracing (#89185)
* Add TracedClient

* Handle errors and status codes

* Wire up tracing to normal ASH and loki annotation mapping

* Add tracing to remote alertmanager

* one more spot

* and not or

* More consistency with other grafana traces, lower cardinality name
2024-06-14 13:24:12 -05:00
Dave Henderson
6262c56132
chore(perf): Pre-allocate where possible (enable prealloc linter) (#88952)
* chore(perf): Pre-allocate where possible (enable prealloc linter)

Signed-off-by: Dave Henderson <dave.henderson@grafana.com>

* fix TestAlertManagers_buildRedactedAMs

Signed-off-by: Dave Henderson <dave.henderson@grafana.com>

* prealloc a slice that appeared after rebase

Signed-off-by: Dave Henderson <dave.henderson@grafana.com>

---------

Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
2024-06-14 14:16:36 -04:00
Kevin Minehart
a250706305
CI: Make pkg/build its own module, remove unused Grafana modules in go.mo… (#89243)
* Make pkg/build its own module, remove unused Grafana modules in go.mod/go.sum

* fix go.work format

* log errors on file close errors
2024-06-14 19:35:30 +03:00
Ieva
4e3294cd8d
RBAC: Fix the check for whether an action set should be added (#89219)
fox the check for whether an action set should be added
2024-06-14 14:23:29 +02:00
Sofia Papagiannaki
63c4d7373a
Update cloud_migrations.go (#89218)
Remove unnecessary newline
2024-06-14 15:14:37 +03:00
Leonor Oliveira
1691d80412
Refactor enrichObj function (#89210) 2024-06-14 13:13:59 +02:00
Leonor Oliveira
e1145472c4
For now, only compare if names are the same in playlists (#89206) 2024-06-14 13:13:49 +02:00
Leonor Oliveira
fd44f2ee4f
Init dualwriter metrics (#89003)
* Pass prometheus registerer to the dual writer

* Fix tests

* Remove unused var

* Fix tests

* Uncomment test

* Remove leading line

* Fix tests. Reuse registerer if there's already one

* Lint

* Improve double registering logic

* Rebase main
2024-06-14 11:01:49 +02:00
Steve Simpson
dd3c3b5857
Alerting: Update grafana/alerting. (#88914) 2024-06-14 09:19:04 +02:00
Ryan McKinley
2173429ce2
Identity: Add static requester struct (#89190) 2024-06-14 09:04:06 +03:00
Ryan McKinley
f2b6a9aa3d
K8s: Add numeric revisionVersion helpers to grafanaMetaAccessor (#89191) 2024-06-14 02:35:23 +03:00
Kristin Laemmert
e2f65dda0c
chore: remove redundant transactions from Dashboard (get) sql queries (#89186)
* chore: remove redundant transactions from sql queries
* remove unused parameter
2024-06-13 15:32:01 -04:00
Ryan McKinley
57b760824f
Chore: Remove pkg/infra/x/persistentcollection (#89139) 2024-06-13 21:46:52 +03:00
Michael Mandrus
9d3a4e236d
CloudMigrations: Refactor API for async work (#89084)
* rename some stuff

* more renaming

* clean up api

* rename more functions

* rename cms -> gms

* update comment

* update swagger gen

* update endpoints

* overzealous

* final touches

* dont modify existing migrations

* break structs into domain and dtos

* add some conversion funcs

* fix build

* update frontend

* try to make swagger happy
2024-06-13 17:58:59 +00:00
Ieva
bd35fa10f1
RBAC: Resolve action sets when GetPermissions is called (#89046)
* resolve action sets when GetPermissions is called

* a fix to ensure that dashboard permissions that override parent folder permissions are displayed on top of the inherited permission

* linting

* linting pt2
2024-06-13 20:06:37 +03:00
Ieva
3853f90528
RBAC: Include action sets in dashboard and folder permission filter (#89133)
take action sets into account in dashboard and folder permission filter
2024-06-13 19:40:47 +03:00
Kyle Brandt
82aa000e9d
SSE: (Chore) Update log line with context (trace) (#89172)
Improves log line to help with debugging in Server Side Expressions. In particular, the traceId, datasourceType, and datasourceUid will now be included.
2024-06-13 10:58:39 -04:00
Juan Cabanas
59d83bc55a
PublicDashboards: Fix error message when deleting (#89166) 2024-06-13 10:39:35 -03:00
Sam Jewell
2d0a3953c1
Transformations: Move transformation variables to general availability (#89111) 2024-06-13 07:18:21 -06:00
Will Browne
74230937f4
Plugins: Update plugin SDK Go to 0.235.0 (#89153)
update plugin SDK go to 0.235.0
2024-06-13 15:14:39 +02:00
Gabriel MABILLE
afcb5a855c
AuthZ: embed an authorization server (#89018)
* AuthZ: embed an authorization server

* CODEOWNERS

* Remove swagger

* WIP

* Flatten structure and inject wireset

* sync mod files

* Rename authorization package

* Fix swagger gen

* CODEOWNERS

* Use itf instead of impl

---------

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2024-06-13 11:41:35 +02:00