Commit Graph

6600 Commits

Author SHA1 Message Date
Karl Persson
1315c67c8b
Team/User: UID migrations (#82298)
* Add user uid migration to run on every startup to protect against empty values in a upgrade downgrade scenario

* Add team uid migration to run on every startup to protect against empty values in a upgrade downgrade scenario

* Run team uid migration
2024-02-12 14:48:29 +01:00
Will Browne
788b9afda3
Plugins: Make it possible to support multiple plugin versions (#82116)
* first pass

* use version in more places

* add comment

* update installer

* fix wire

* fix tests

* tidy

* simplify changes

* fix in mem

* remove unused step

* fix step dupe logic for child plugins + add tests
2024-02-12 12:47:49 +01:00
Torkel Ödegaard
fe6d1460b0
DashboardScene: Adds solo page that uses dasboarde scene to render single panel (#77940)
* DashboardScene: Adds solo page that uses dasboarde scene to render single panel

* Update

* Panel and row repeats working

* Update

* added e2e tests

* Refactor

* Fixes

* Fix e2e

* fix

* fix

* fix
2024-02-11 09:08:47 +01:00
Kyle Cunningham
f0bbfc8422
Chore: Move BI feature flags to Dataviz (#82224) 2024-02-10 02:24:08 +02:00
Ryan McKinley
ce910a7eb2
FeatureFlags: manage creation/modification times automatically (#82131) 2024-02-09 15:34:12 -08:00
Alexander Weaver
5bbe9c6e61
Alerting: Enable group-level rule evaluation jittering by default, remove feature toggle (#82212)
* remove jitter feature flag

* Add an out so users can manually disable jitter

* Pass in cfg

* Add TODO to remove knob in future
2024-02-09 15:53:58 -06:00
Stephanie Hingtgen
87c3d0fb6a
K8s: Update stack id validation (#82275) 2024-02-09 21:51:00 +02:00
João Calisto
42d6e176bc
Feature Toggle Management: allow editing PublicPreview toggles (#81562)
* Feature Toggle Management: allow editing PublicPreview toggles

* lint

* fix a bunch of tests

* tests are passing

* add permissions unit tests back

* fix display

* close dialog after submit

* use reload method after submit

* make local development easier

* always show editing alert in the UI

* fix readme

---------

Co-authored-by: Michael Mandrus <michael.mandrus@grafana.com>
2024-02-09 18:48:56 +02:00
Stephanie Hingtgen
54a77fa55e
K8s: StackIDs can be single digits (#82267) 2024-02-09 18:39:58 +02:00
Jo
6f62d970e3
JWT Authentication: Add support for specifying groups in auth.jwt for teamsync (#82175)
* merge JSON search logic

* document public methods

* improve test coverage

* use separate JWT setting struct

* correct use of cfg.JWTAuth

* add group tests

* fix DynMap typing

* add settings to default ini

* add groups option to devenv path

* fix test

* lint

* revert jwt-proxy change

* remove redundant check

* fix parallel test
2024-02-09 16:35:58 +01:00
Dan Cech
790e1feb93
Chore: Update test database initialization (#81673)
* streamline initialization of test databases, support on-disk sqlite test db

* clean up test databases

* introduce testsuite helper

* use testsuite everywhere we use a test db

* update documentation

* improve error handling

* disable entity integration test until we can figure out locking error
2024-02-09 09:35:39 -05:00
Misi
b1dc505a2b
Auth: Validate admin assignment in SSO Settings (#82233)
* Add validation for allowAssignGrafanaAdmin

* Update default values

* Do not render hidden fields

* Change error message

* Improve tests

---------

Co-authored-by: Clarity-89 <homes89@ukr.net>
2024-02-09 13:10:23 +01:00
ismail simsek
b0dfeb1911
Chore: Clean up intervalv2 functions (#82074)
* clean up intervalv2 functions

* use roundInterval from grafana-plugin-sdk-go

* use from grafana-plugin-sdk-go

* have intervalv2 in publicdashboards and remove tsdb/intervalv2

* legacydata cleanup

* remove unused variables

* Update pkg/tsdb/legacydata/interval/interval.go

Co-authored-by: Arati R. <33031346+suntala@users.noreply.github.com>

---------

Co-authored-by: Arati R. <33031346+suntala@users.noreply.github.com>
2024-02-09 11:39:21 +01:00
Nathan Marrs
829672759c
Deprecation: Create explicit feature toggle to auto-migrate from graph panel (#79369) 2024-02-08 14:00:48 -08:00
Matthew Jacobson
ce57166c9a
Alerting: GA alertingPreviewUpgrade and enable by default (#82038)
* Alerting: GA alertingPreviewUpgrade and enable by default
2024-02-08 18:59:25 +01:00
Jo
fb86ed79fc
Stats: Remove ACL references (#82112)
remove acl references
2024-02-08 17:19:24 +01:00
Ashley Harrison
0e15b4ac76
Navigation: Add config for grafana-slo-app and grafana-aws-app (#82174)
add config for grafana-slo-app and grafana-aws-app
2024-02-08 15:56:43 +00:00
Jean-Philippe Quéméner
4dc1ebbb66
fix(alerting): add a proper compare func for location in mute timings (#82153) 2024-02-08 13:36:09 +01:00
Agnès Toulet
28e66b4ad8
Rendering: Adds PDF support behind feature toggle (#81811)
* start pdf refactor

* Update AppChrome.tsx

* Update AppChrome.tsx

* add encoding param to rendering grpc service

* fix plugin mode

* clean up

* fix backend tests

* fix lint errors

* Support pdf encoding in render http api

---------

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2024-02-08 13:09:34 +01:00
George Robinson
90a26e18db
Alerting: Update Alertmanager to e82436c (#82145)
This commit updates Alertmanager to commit e82436c, which is based
on commit f69a508 from Prometheus Alertmanager.
2024-02-08 11:25:27 +00:00
Will Browne
99feb928cf
Plugins: Don't auto prepend app sub url to plugin asset paths (#81658)
* don't prepend app sub url to paths

* simplify logo path

* fix(plugins): dynamically prepend appSubUrl for System module resolving to work

* fix(sandbox): support dynamic appSuburl prepend when loading plugin module.js

* fix tests

* update test name

* fix tests

* update fe + add some tests

* refactor(plugins): move wrangleurl to utils, rename to resolveModulePath, update usage

* chore: fix a typo

* test(plugins): add missing name to utils test

* reset test flag

---------

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2024-02-08 12:19:28 +01:00
Jo
6ac0bc5ecf
Seeder: Add missing methods to Registrations (#81961)
* add slice copy method

* fix slice copy
2024-02-08 09:54:17 +01:00
Charandas
117a4b4b0a
K8s: resolve crash due to looking up aggregation config when running in a K8s environment (#82125)
K8s: apply authn options only in dev mode - resolves crash due to looking up aggregation config
2024-02-07 16:43:07 -08:00
Dan Cech
1f1461734c
Storage: Add support for sortBy selector (#80680)
* add support for sortBy field selector

* use label selectors instead of field selectors

* set entity_labels on create & update

* make entity server integration tests work

* test fixes

* be more consistent with handling of empty body, meta or status

* workaround for database is locked errors during migration

* fix double import of sqlite3

* rename functions and tidy up

* refactor update

* disable integration tests until we can fix the database locking issue
2024-02-07 15:05:10 -05:00
Dan Cech
156d7ae194
use in-process grpc client instead of wrapping server interface (#81926)
* use in-process grpc client instead of wrapping server interface

* comment out jwt token checks until we're ready to validate the token
2024-02-07 13:17:02 -05:00
Matthew Jacobson
dd0ca1263b
Alerting: Include rule uid, title, namespace in unique constraint errors (#82011)
* Alerting: Include rule_uid, title, namespace_uid in unique constraint errors
2024-02-07 12:55:48 -05:00
Alexander Weaver
843c477899
Alerting: Add exported API to scheduler to access currently loaded rules (#82031)
* Add exported API to fetch rule definitions from scheduler

* Add comment
2024-02-07 09:31:22 -06:00
Kyle Cunningham
756cd3c28b
Transformations: Add Group to Nested Tables Transformation (#79952)
* Stub group to subframe transformation

* Get proper field grouping

* Mostly working but fields not displaying 😭

* Fix display processing in nested tables

* Modularize and start merging groupBy and groupToSubrame

* Get this working

* Prettier

* Typing things

* More types

* Add option for showing subframe table headers

* Prettier

* Get tests going

* Update tests

* Fix naming and add icons

* Betterer fix

* Prettier

* Fix CSS object syntax

* Prettier

* Stub alert for calcs with grouping, start renaming

* Add logic to show warning message for calculations

* Add calc warning

* Renaming and feature flag

* Rename images

* Prettier

* Fix tests

* Update feature toggle

* Fix error showing extra blank row

* minor code cleanup

---------

Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2024-02-07 21:28:26 +07:00
Andres Martinez Gotor
26bc87b60e
Chore: Replace core plugins as external warning (#81877) 2024-02-07 16:17:13 +02:00
ismail simsek
2679599968
Prometheus: Remove grafana/pkg/setting imports (#81813)
* upgrade grafana-azure-sdk-go v1.12.0

* add AzureAuthEnabled to config

* remove grafana/pkg/setting imports

* remove grafana/pkg/setting imports

* remove comment

* add better error message

* Fix the unit test

* fix lint
2024-02-07 11:01:09 +01:00
Yuri Tseretyan
47546a4c72
Alerting: Update API to use folders' full paths (#81214)
* update GetUserVisibleNamespaces to use FolderSeriver
* update GetNamespaceByUID to use FolderService.GetFolders
* update GetAlertRulesForScheduling to use FolderService.GetFolders 

* Update API and GetAlertRulesForScheduling to use the folder's full path
* get full path of folder in RouteTestGrafanaRuleConfig

* fix escaping of titles for MySQL
2024-02-06 17:12:13 -05:00
Ryan McKinley
91754bcda5
K8s: Refactor standalone apiserver initialization (#81932) 2024-02-06 08:40:35 -08:00
Gabriel MABILLE
4af5aef417
id forwarding: transfer Grafana id token to app plugins (#81967)
* id forwarding: allow for app plugins as well

* Add test
2024-02-06 16:26:17 +01:00
Gokhan
cf601fab09
Alerting: Enable sending notifications to a specific topic on Telegram (#79546)
Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
2024-02-06 17:19:22 +02:00
William Wernert
2ea82af6e7
Alerting: Pass in receiver service to API struct (#81978) 2024-02-06 16:49:47 +02:00
Yuri Tseretyan
15223a4b85
Folders: Set FullPath and FullPathUIDs when feature flag is off and query requests (#81896)
* set FullPath and FullPathUIDs if feature flag is off and query requests

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2024-02-06 09:18:40 -05:00
Ashley Harrison
28b336ac80
DockedMegaMenu: Clean up toggle and old code (#81878)
* remove toggle

* remove code not behind toggle

* remove old MegaMenu

* rename DockedMegaMenu -> MegaMenu and clean up go code

* fix backend test

* run yarn i18n:extract

* fix some unit tests

* fix remaining unit tests

* fix remaining e2e/unit tests
2024-02-06 13:43:11 +00:00
Jo
cf616d5074
Remove X-Grafana-Device-Id from outbound requests (#81957) 2024-02-06 14:06:19 +01:00
Sergej-Vlasov
3605d85c4c
Dashboards: Remove advancedDataSourcePicker feature toggle (#81790)
* remove advancedDataSourcePicker feature toggle from DataSourcePickerWithPrompt

* remove advancedDataSourcePicker toggle from DataSourcePicker and adjust tests that relied on old picker

* adjust failing tests in QueryVariableEditorForm

* move DataSourceDropdown to DataSourcePicker file

* covert style declaration syntax to object style in DataSourcePicker

* remove advancedDataSourcePicker  feature flag from registry

* remove .only from test

* adjust QueryVariableEditor test to avoid console.error
2024-02-06 09:20:07 +00:00
George Robinson
c8ccc4649c
Alerting: Support UTF-8 (#81512)
This pull request updates our fork of Alertmanager to commit 65bdab0, which is based on commit 5658f8c in Prometheus Alertmanager.

It applies the changes from grafana/alerting#155 which removes the overrides for validation of alerts, labels and silences that we had put in place to allow alerts and silences to work for non-Prometheus datasources. However, as this is now supported in Alertmanager with the UTF-8 work, we can use the new upstream functions and remove these overrides.

The compat package is a package in Alertmanager that takes care of backwards compatibility when parsing matchers, validating alerts, labels and silences. It has three modes: classic mode, UTF-8 strict mode, fallback mode. These modes are controlled via compat.InitFromFlags. Grafana initializes the compat package without any feature flags, which is the equivalent of fallback mode. Classic and UTF-8 strict mode are used in Mimir.

While Grafana Managed Alerts have no need for fallback mode, Grafana can still be used as an interface to manage the configurations of Mimir Alertmanagers and view configurations of Prometheus Alertmanager, and those installations might not have migrated or being running on older versions. Such installations behave as if in classic mode, and Grafana must be able to parse their configurations to interact with them for some period of time. As such, Grafana uses fallback mode until we are ready to drop support for outdated installations of Mimir and the Prometheus Alertmanager.
2024-02-06 08:33:47 +00:00
Carl Bergquist
c9de794d7f
instrumentation: these features have been enabled for a while (#81617)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
2024-02-06 00:29:41 -08:00
Diego Augusto Molina
a6342fa576
Chore: Fix data race within tests and enable a few parallel tests in ssosettingsimpl (#81837)
* Chore: Fix data race within tests of SSO Setting implementation

* Chore: fix data race within tests to allow parallel testing

* Chore: rollback changes runtime code to test a different approach

* Chore: Fix data race in SSO Setting implementation Upsert method

* Chore: fix typo in comment
2024-02-05 16:41:38 -03:00
Isabella Siu
81da3ff753
CloudWatch: Remove dependencies on grafana/pkg/setting (#81208) 2024-02-05 13:59:32 -05:00
William Wernert
2ab7d3c725
Alerting: Receivers API (read only endpoints) (#81751)
* Add single receiver method

* Add receiver permissions

* Add single/multi GET endpoints for receivers

* Remove stable tag from time intervals

See end of PR description here: https://github.com/grafana/grafana/pull/81672
2024-02-05 20:12:15 +02:00
Jo
7852ea012d
Access: Remove split scopes feature toggle (#81874)
* remove split scopes FT

* Revert "remove split scopes FT"

This reverts commit 349fb081d3.

* make toggle deprecated instead

* fix gen
2024-02-05 17:00:19 +01:00
Gabriel MABILLE
596e828150
Fix: Refresh token when id_token is expired (#79569)
* Fix: Refresh token when id_token is expired

* add id_token comparison

* Fix wire

* Use userID as cache key

* Apply suggestions from code review

---------

Co-authored-by: linoman <2051016+linoman@users.noreply.github.com>
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
2024-02-05 16:44:25 +01:00
ismail simsek
2002a6c4fb
Chore: Bump grafana-azure-sdk-go to v1.12.0 and expose AzureAuthEnabled value in config (#81807)
* upgrade grafana-azure-sdk-go v1.12.0

* add AzureAuthEnabled to config
2024-02-05 13:36:33 +01:00
Sofia Papagiannaki
c1547162e4
Dashboards: Restore deleted index (#81859)
Dashboards: Recreate deleted index
2024-02-05 11:35:13 +02:00
Gabriel MABILLE
d9f7eda284
AuthN: Switch externalServiceAccounts toggle to public preview (#81583) 2024-02-05 09:31:20 +01:00
Sofia Papagiannaki
ec5bc7c4ab
Folders: Fix failure to update folder in SQLite (#81795) 2024-02-05 10:06:11 +02:00