Commit Graph

7208 Commits

Author SHA1 Message Date
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
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
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
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
Alexander Weaver
58fdb24b0b
Alerting: Recording rules appear as type=recording in Prometheus API + better abstraction for type (#88805)
* Wire status through to prom API

* Regenerate swagger
2024-06-07 11:24:06 -05:00
Sonia Aguilar
b761153812
Alerting: Fix permissions for silences list view (#88908) 2024-06-07 19:19:28 +03:00
Yuri Tseretyan
32ea1801aa
Alerting: Support AWS SNS integration in Grafana (#88867) 2024-06-07 11:49:49 -04:00
Alexander Weaver
f1dc63565e
Alerting: Fix go-swagger extraction and several embedded types from Alertmanager in Swagger docs (#88879)
Drop redundant swagger model comments
2024-06-07 10:47:47 -05:00
Piotr Jamróz
c9271edfa1
Feature Toggles: Validate if a GA toggle is enabled or not explicitly (#88277) 2024-06-07 16:21:54 +02:00
Eric Leijonmarck
39bd13f877
User: add second migration for lowercasing login/email of users (#88915) 2024-06-07 15:07:14 +02:00
Karl Persson
f3efd95bb4
Auth: Add org to role mappings support to Google integration (#88891)
* Auth: Implement org role mapping for google oauth provider

* Update docs

* Remove unused function

Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
2024-06-07 14:07:35 +02:00
Jack Westbrook
036c878843
Plugins: Improve frontend loader cache (#87488)
* do it

* set empty child version to parent version

* feat(plugins): use pluginId for loader cache keys

* feat(plugins): apply caching to all js and css files systemjs loads

* remove old code and add comment

* test(plugins): update systemjs hooks tests in line with better caching

* test(plugins): wip - comment out failing backend loader tests

* fix tests and improve comment

* Update public/app/features/plugins/loader/cache.test.ts

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>

---------

Co-authored-by: Will Browne <will.browne@grafana.com>
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2024-06-07 10:03:41 +02:00
Dave Henderson
c931a44503
storage: Avoid panic when no previous versions in history (#88880)
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
2024-06-06 21:33:08 -04:00
Yuri Tseretyan
003e3efce9
Alerting: Update mute timings provisioning API to support optimistic locking (#88731)
* add version to time-interval models
* set time interval fingerprint as version
* update to check provided version
* delete to check if version is provided in query parameter 'version'
* update integration tests
* update specs
2024-06-06 18:06:37 -04:00
Alexander Weaver
a2e21d61f8
Alerting: Remove dead evalRunning guard in rule routine (#88312)
Remove dead guard
2024-06-06 16:15:01 -05:00
William Wernert
d359591dac
Alerting: Support recording rule struct in provisioning API (#87849)
* Support record struct in provisioning API

* Update api spec

* Use record field

* Restrict API endpoints following toggle

* Fix swagger spec

* Add recording rule validation to store validator
2024-06-06 21:05:02 +03:00
Dave Henderson
e21d357d67
chore: Updating linter, fixing some new warnings (#88863) 2024-06-06 13:01:27 -04:00
Andreas Christou
c9778c3332
AzureMonitor: Prometheus exemplars support (#87742)
* Update types

* Mark datasource as supporting traces

* Add logic to transform exemplar query to traces query

* Render appropriate editor

* Run trace query for exemplars

* Refactor out common functions

- Add function to retrieve first/default subscription

* Add route for trace exemplars

* Update logic to appropriately query exemplars

* Update traces query builder

* Update instance test

* Remove unneeded import

* Set traces pseudo data source

* Replace deprecated function calls

* Add helper for setting default traces query

* Don't show resource field for exemplars query

* When resetting operation ID for exemplars set query to default

- Update tests

* Update query header to appropriately set the service value

* Fix response frame creation and update tests

* Correctly select resource

* Convert subscriptionsApiVersion to const

* Add feature toggle
2024-06-06 17:53:17 +01:00
Diego Augusto Molina
ae84c5fef9
Unified Storage: Fix Entity Server unconditionally starting (#88857)
fix Entity Server unconditionally starting
2024-06-06 12:17:46 -03:00
Will Browne
7d8722b561
API server: Add shutdown func to interface (#88827)
add shutdown func to interface
2024-06-06 15:18:54 +01:00
Timur Olzhabayev
8690e97c92
Chore: disable proxy trailing slash keep by default (#88842)
disable proxy trailing slash keep by default
2024-06-06 16:28:11 +03:00
Karl Persson
d3b06f09ae
Users: remove unused store function (#88784) 2024-06-06 11:43:51 +02:00
Misi
4f2a9a47f3
Auth: Add org to role mappings support to Okta integration (#88770)
* Add org mapping support to Okta

* Update docs and configs

* Prettier docs

* Apply suggestions from code review

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Improve tests

---------

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2024-06-06 10:35:06 +02:00
Marcus Efraimsson
2403665998
Chore: Remove legacydata package (#88790)
* Chore: Remove legacydata package

* remove unused dependency

* sdk v0.234.0
2024-06-05 22:31:06 +02:00
owensmallwood
1059441ec6
GRPC Service: Use native histogram when enabled (#88804)
* use native histogram when enabled

* enable native histograms permanently for grpc service histogram
2024-06-05 12:25:09 -06:00
Diego Augusto Molina
5fc580b401
Unified Storage: Testing For Fix Create, Update and Delete wrt Resource Versions (#88568)
Add testing harness
2024-06-05 15:18:33 -03:00
Diego Augusto Molina
6fcd7d9e03
Unified Storage: Fix Create, Update and Delete wrt Resource Versions (#88183)
* add sqltemplate utilities, improve tests and documentation

* bunch of things

* remove unnecessary message

* add queries

* add queries

* add queries

* add folders support

* fix diff

* fix linters

* fix diff

* fix linters

* fix linters

* fix typo

* fix linters

* fix linters

* fix linters

* several fixes

* several fixes

* temporarily disable k8s integration tests for Entity Server

* postpone some tests

* postpone documentation changes

* Fix bug in create

* improve error reporting

* fix PostgeSQL parameters

* fix MySQL sqlmode

* fix MySQL-5.7

* reduce but document the number of database connection options

* remove unused code and improve docs
2024-06-05 14:23:32 -03:00
Alexander Weaver
820ee6e9db
Alerting: Make all in api generator tooling now actually makes all (#88793)
* Make all now actually makes all

* Clean depends on clean-go
2024-06-05 11:52:31 -05:00
Fayzal Ghantiwala
80f54778f3
Alerting: Add option to use Redis in cluster mode for Alerting HA (#88696)
* Add config option to use Redis in cluster mode

* Use UniversalOptions
2024-06-05 17:02:25 +01:00
Ivana Huckova
023857625a
Elasticsearch: Remove enableElasticsearchBackendQuerying feature toggle (#88668)
* wip

* Fix newly introduced any

* Remove toggle

* Remove unused code in LegacyQueryRunner
2024-06-05 17:03:29 +02:00
Ryan McKinley
41e0430f83
K8s/Dashboards: Add frontend api to switch between implementations (#88632) 2024-06-05 17:34:23 +03:00
Karl Persson
f28905f8c4
Auth: Add org to role mappings support to Gitlab integration (#88751)
* Conf: Add org_mapping and org_attribute_path to github and gitlab conf

* Gitlab: Implement org role mapping

* Update docs
---------

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2024-06-05 16:15:53 +02:00
Dave Henderson
df784917e4
Alerting: Improve performance of tupleLablesToLabels function (#88736)
* Alerting: Improve performance of tupleLablesToLabels function

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

* use %s for string rather than %v

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

---------

Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2024-06-05 16:19:09 +03:00
Marcus Efraimsson
fe3e5917f1
Plugins: Preserve trailing slash in plugin proxy (#86859)
* Plugins: Preserve trailing slash in plugin proxy

* enable toggle by default
2024-06-05 13:36:14 +02:00
Gabriel MABILLE
b1520e93f1
Fix: Regenerate token on failed encryption/decryption (#88732)
* Add function to rotate the extsvc token

* Recover from failed token decryption

* add log

* Remove error check

* Log outside error
2024-06-05 11:56:54 +02:00
Matias Chomicki
ec9aecd82b
Loki: remove query formatting (#88636)
* Loki: remove query formatting

* Loki formatting: remove feature flag

* chore: remove test

* Formatting
2024-06-05 12:46:28 +03:00