Commit Graph

13413 Commits

Author SHA1 Message Date
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
Ieva
1ac395b785
RBAC: Only store action sets for dashboards and folders (#89053)
* don't store action sets for resources other than dashboards and folders

* remove unneeded comment
2024-06-13 12:06:48 +03:00
Ryan McKinley
99d8025829
Chore: Move identity and errutil to apimachinery module (#89116) 2024-06-13 07:11:35 +03:00
William Wernert
c62cc25513
Alerting: Configure recording rule writer from config.ini (#89056) 2024-06-12 16:04:46 -04:00
Ryan McKinley
ed400f0bbf
EntityStore: Use standard user identifier rather than custom version (#89080)
user uid string
2024-06-12 19:39:34 +03:00
Marcus Efraimsson
1abaa825c6
Tracing: Only enable traces to profiles for api servers for now (#89126) 2024-06-12 19:36:31 +03:00
Ashley Harrison
822644714a
Navigation: Remove ApplyAdminIA logic (#89113)
make admin IA more normal
2024-06-12 16:45:13 +01:00
Ryan McKinley
3ae95a6eb1
K8s: Update grafana resource metadata accessor (#89074) 2024-06-12 14:39:37 +03:00
Santiago
b7120c5a30
Alerting: Fix missing argument in call to createRemoteAlertmanager() (#89101) 2024-06-12 11:57:22 +03:00
Ieva
34c40f959f
RBAC: Add and resolve action sets when searching user's permissions (#88694)
* include and resolve action sets when fetching user's permissions

* expand both action and action prefix (returns an empty set for the one that isn't specified)
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>

* if action is specified, check for exact match; also extend tests
2024-06-12 11:20:19 +03:00
Santiago
12d5251c12
Alerting: Alertmanager configuration sync loop (#88822)
* make the config sync happen on each call to ApplyConfig(), fix tests

* send autogen config

* add fake autogen function for tests

* update stale comments, tidy things up, make linter happy

* add auto-gen routes only if the feature toggle is enabled

* remove unnecessary fake autogen function

* throttle configuration syncs

* restore pkg/services/store/entity/sqlstash/sql_storage_server.go

* test sync loop in ApplyConfig, skip invalid autogen routes

* restore conf/defaults.ini

* restore conf/defaults.ini

* avoid skipping invalid auto-gen routes in SaveAndApplyConfig

* test that autogenFn is called and its errors are returned

* add debug message about the sync interval not having elapsed

* collapse two log lines into one
2024-06-12 10:13:34 +02:00
Eric Leijonmarck
c85d10d6c3
Auth: Removal of conflicting users check upon creation (#89045)
fix: removal of check for conflicting users
2024-06-12 09:19:06 +02:00
Ryan McKinley
a559a66544
FeatureFlags: Update creation timestamps (#88966) 2024-06-11 21:23:12 +03:00
Jacob Valdemar
eb76ea47a0
Alerting: Add ha_reconnect_timeout configuration option (#88823)
* Docs: Update "Configure high availability" guide with ha_reconnect_timeout configuration

---------

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2024-06-11 13:25:48 -04:00
Alexander Akhmetov
667fea6623
Alerting: use hash of labels instead of labels string as the alert state cache key (#88956)
* Alerting: use hash instead of labels as the cache key
* Use data.Labels.Fingerprint to calculate the cache key
2024-06-11 18:34:58 +02:00
Alexander Weaver
d004f8a98d
Alerting: Recording rules understands errors embedded in dataframes (#88946)
* Make MakeDependencyError public for tests in another package

* Create tests for errors in eval results

* Extract logic to pull frame errors out into exported function

* Maybe we can drop cyclomatic complexity lint suppression now?

* extract frame errors and fail recording rules if frames contain error

* Fix up retry logic to actually work

* Do not retry non retryable errors
2024-06-11 10:37:10 -05:00
Misi
2e811c5438
Chore: Use OrgRoleMapper in Grafana.com client (#89013)
* Use OrgRoleMapper in Grafana.com client

* Clean up
2024-06-11 14:53:05 +02:00
Steve Simpson
d440d86bbb
Alerting: Fix erroneous use of grafana-cli/logger. (#89037)
Can't see how this was intentional, likely just a typo.
2024-06-11 14:29:56 +02:00
Santiago
cdbc9d801f
Alerting: Use the internal Alertmanager to test templates and receivers (remote primary) (#88988) 2024-06-11 11:06:07 +02:00
Ieva
095ca66d9f
RBAC: List only the folders that the user has access to (#88599)
only check folder permissions when listing folders
2024-06-11 10:37:16 +03:00
Mihai Doarna
3d40caf819
SSO: Add LDAP fallback strategy for SSO settings service (#88905)
* add root and client certificate value fields for LDAP

* update error messages for connection error

* add LDAP fallback strategy for SSO settings service

* fix params for sso service provider

* fix params for sso service provider

* sort imports

* sort imports

* replace json.Number with int64 in config map

* remove type assertions
2024-06-11 10:22:53 +03:00
Yuri Tseretyan
d4b0ac5973
Alerting: Fix rule storage to filter by group names using case-sensitive comparison (#88992)
* add test for the bug
* remove unused struct
* update db store to post process filters by group using go-lang's case-sensitive string comparison

--------

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
2024-06-10 19:05:47 -04:00
Mihai Doarna
0f936e2939
Auth: Add root and client certificate value fields in LDAP config (#88746)
* add root and client certificate value fields for LDAP

* update error messages for connection error
2024-06-10 18:13:15 +03:00
Santiago
5f4d07bb75
Alerting: Enable remote primary mode using feature toggles (#88976) 2024-06-10 17:07:13 +02:00
Aaron Godin
59a6a6513f
Prevent moving a k6 folder (#88884)
* iam-716 - prevent a folder move operation when the folder's uid or any of its parents uids begin with k6-app

* fox folder move check and only list non-k6 folders to users

* adding tests for moving

* add a test for listing folders

* fix the other tests

* use method that adds folder parent

---------

Co-authored-by: IevaVasiljeva <ieva.vasiljeva@grafana.com>
2024-06-10 09:17:51 -05:00
Leonor Oliveira
b30c81b1ad
Add and fix tests for playlists in mode1 (#88543)
* Add and fix tests for playlists in mode1

* Make etcd tests pass mode1 for now

* Fix mode1 and add more tests for playlists in mode 1

* Remove repeated test

* Fix test setup
2024-06-10 16:11:01 +02:00
Piotr Jamróz
0a05ac6aed
Correlations: Remove flakey test (#88912)
* Make the flakiness error more verbose

* Fix linting

* Remove a flaky test and make assertion failures more verbose
2024-06-10 15:14:38 +02:00
David Harris
60bec80672
Cloudwatch: add keywords (#88855)
---------

Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
2024-06-10 08:11:47 -04:00
Santiago
e15e40fbd3
Alerting: Skip setting up clustering in remote primary/only modes (#88968)
* Alerting: Skip setting up clustering in remote primary mode

* Update pkg/services/ngalert/notifier/multiorg_alertmanager.go

Co-authored-by: Steve Simpson <steve.simpson@grafana.com>

---------

Co-authored-by: Steve Simpson <steve.simpson@grafana.com>
2024-06-10 13:51:11 +02:00
Ieva
35d0597367
RBAC: Only check for the write action when listing editable dashboards/folders (#88518)
* only check for the write action when listing editable resources

* test fix
2024-06-10 14:44:34 +03:00
Laura Fernández
84b638fb26
PinNavItems: Create feature toggle (#88975) 2024-06-10 13:40:03 +02:00
Diego Augusto Molina
4378f89fd9
fix data race in dev runtime (#88887) 2024-06-10 08:30:17 -03:00
Misi
9a44296bc2
Auth: Add org to role mappings support to AzureAD/Entra integration (#88861)
* Added implementation and tests

* Add docs, simplify implementation

* Remove unused func

* Update docs
2024-06-10 12:08:30 +02:00
Isabella Siu
114a136378
CloudWatch: Fix labels for raw metric search queries (#88943) 2024-06-07 17:37:19 -04:00
Diego Augusto Molina
7ca3ec7518
Infra: fix data race in usagestats service (#88881)
fix data race
2024-06-07 17:52:21 -03:00
Todd Treece
22989acf95
K8s: Improve response writer error handling (#88926)
---------

Co-authored-by: Diego Augusto Molina <diegoaugustomolina@gmail.com>
2024-06-07 16:10:02 -04:00
Marcus Efraimsson
4a97ff45fe
API Server: Enhanced profiling with godeltaprof (#88939) 2024-06-07 19:39:45 +02:00
William Wernert
63e9969c1b
Alerting: Recording rule mapping logic for data frames to Prometheus metrics (#88550)
* Add stub Prometheus writer with mapping logic

* Add tests
2024-06-07 20:00:22 +03:00
lean.dev
330da7916d
Chore: Add unit test for cloudmigration package (#88868) 2024-06-07 13:46:19 -03:00