Commit Graph

11841 Commits

Author SHA1 Message Date
Agnès Toulet
bb12fe7d82
UsageInsights: Disable frontend features when backend is disabled (#77772)
* UsageInsights: Disable frontend features when backend is disabled

* Disable DS insights

* Update doc

* fix linter issue

* Update docs/sources/setup-grafana/configure-grafana/_index.md

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

---------

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2023-11-09 11:53:20 +01:00
Santiago
ba51c371ec
Alerting: Add methods for receivers to the forked Alertmanager (#77574)
* Alerting: Add an empty Forked Alertmanager

* Alerting: Add methods for silences to the forked Alertmanager

* check for errors in tests

* make linter happy

* Alerting: Add methods for alerts to the forked Alertmanager

* Alerting: Add methods for receivers to the forked Alertmanager

* make linter happy

* separate into both forked AMs

* fix tests

* rename testErr -> expErr
2023-11-09 11:38:16 +01:00
Andres Martinez Gotor
f7361a2755
Chore: Update TestData README (#77607)
Co-authored-by: Joseph Perez <45749060+josmperez@users.noreply.github.com>
2023-11-09 10:03:00 +01:00
Ryan McKinley
4b5310dae7
Playlists: Merge the frontend vs backend k8s feature flags (#77875) 2023-11-08 21:14:05 +02:00
Ryan McKinley
6ab79a9f2f
K8s: Improve table converter (support non runtime.Object values) (#77816) 2023-11-08 10:59:19 -08:00
Charandas
28e58c1725
Grafana app platform: drop etcd requirement in example-apiserver (#77886) 2023-11-08 10:57:32 -08:00
Kat Yang
71a2ce5a71
Chore: Deprecate FolderID from CountDashboardsInFolderRequest (#77804)
Deprecate FolderID from CountDashboardsInFolderRequest
2023-11-08 11:27:03 -05:00
Kat Yang
bc875b4c13
Chore: Deprecate FolderID from DashboardSearchProjection (#77811) 2023-11-08 11:23:56 -05:00
Andreas Christou
6df5b30fa3
Azure: Remove data plane feature toggle (#77754)
* Remove feature toggle

* Fix test and lint
2023-11-08 15:02:46 +00:00
Eric Leijonmarck
c13fd62b16
Team LBAC: Add permission check for Update datasource (#77709)
* add permission check for updating the LBAC Rules

* permission scoped for id in the updating datasource

* fixed test to cover for permissions

* fix proper check for permissions and empty teamHTTPHeader requests

* check for jsondata

* check nil for jsondata inside the getEncodedString
2023-11-08 14:37:32 +00:00
Alexander Zobnin
a39242890e
Folders: Able to fetch folders available for user as "shared" folder (#77774)
* Folders: Show folders user has access to at the root level

* Refactor

* Refactor

* Hide parent folders user has no access to

* Skip expensive computation if possible

* Fix tests

* Fix potential nil access

* Fix duplicated folders

* Fix linter error

* Fix querying folders if no managed permissions set

* Update benchmark

* Add special shared with me folder and fetch available non-root folders on demand

* Fix parents query

* Improve db query for folders

* Reset benchmark changes

* Fix permissions for shared with me folder

* Simplify dedup

* Add option to include shared folder permission to user's permissions

* Fix nil UID

* Remove duplicated folders from shared list

* Only left the base part

* Apply suggestions from code review

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

* Add tests

* Fix linter errors

---------

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2023-11-08 15:28:49 +01:00
Gábor Farkas
4a6b209d64
sql: refactor code, eliminate from-core-grafana import (#77810) 2023-11-08 14:08:20 +01:00
Santiago
e24fe96d90
Alerting: Add methods for alerts to the forked Alertmanager (#77571)
* Alerting: Add an empty Forked Alertmanager

* Alerting: Add methods for silences to the forked Alertmanager

* check for errors in tests

* make linter happy

* Alerting: Add methods for alerts to the forked Alertmanager

* make linter happy

* separate into both forked AMs

* rename testErr -> expErr
2023-11-08 13:52:04 +01:00
João Calisto
cbb85b77a5
Live: Default to local engine if redis is unavailable (#77467)
* Live: Default to local engine if redis is unavailable

* fix error formatting
2023-11-08 12:22:26 +00:00
Santiago
197f0d2859
Alerting: Add methods for silences to the forked Alertmanager (#77805)
* Alerting: Add an empty Forked Alertmanager

* Alerting: Add methods for silences to the forked Alertmanager

* check for errors in tests

* make linter happy

* make linter happy

* Alerting: Add methods for silences to the forked Alertmanager
2023-11-08 12:03:40 +01:00
Misi
5285e9503b
Auth: SSO settings foundations (#77724)
* inital changes, db migration

* changes

* Implement basic GetAll, Delete

* Add first batch of tests

* Add more tests

* Add service tests for GetForProvider, List

* Update http_server.go + wire.go

* Lint + update fixed role

* Update CODEOWNERS

* Change API init

* Change roles, rename

* Review with @kalleep

* Revert a mistakenly changed part

* Updates based on @dmihai 's feedback

---------

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2023-11-08 10:50:01 +01:00
Charandas
8a46dc39d0
Grafana App Platform: provide an example-apiserver to easily deploy aggregated APIservers (#77826) 2023-11-07 22:35:15 -08:00
Ryan McKinley
229fb2c261
Stars: Remove sqlx storage implementation (#77766) 2023-11-07 06:55:24 -08:00
Kat Yang
71dd335bf8
Chore: Deprecate FolderID in Hit (#77623)
* Chore: Deprecate FolderID in Hit

* chore: regen specs

* chore: remove accidental deprecation comment
2023-11-07 09:51:54 -05:00
Kat Yang
a5044fe6db
Chore: Deprecate FolderIds in Query (#77624)
Chore: Deprecate FolderID in Query
2023-11-07 09:51:44 -05:00
Kat Yang
a7d08997f7
Chore: Deprecate folderIDs from testCases (#77649) 2023-11-07 09:51:18 -05:00
Ivana Huckova
d4a257bc8e
Logs: Update logic to process logs dataPlane frame with labels field (#77708)
* Logs: Update dataplane logic to use labels instead of attributes

* Update Loki logs data plane data frame according to specs

* Remove only in test
2023-11-07 10:53:10 +01:00
Sofia Papagiannaki
2598ff7c93
Provisioning: Set dashboard.folder_uid column for provisioned dashboards (#77637)
Provisiong: Store folder UID to provisioned dashboards
2023-11-07 11:15:20 +02:00
Taewoo K
4fbd9a55b2
Remove feature toggle data source page header (#77751)
* remove feature toggle:dataSourcePageHeader

* remove feature flag: dataSourcePageHeader

* remove unused prop:alertingSupported
2023-11-06 15:21:15 -05:00
Adela Almasan
6b4b712754
Chore: Create newVizTooltips feature flag (#77643) 2023-11-06 10:35:59 -06:00
Kat Yang
1959f3434b
Chore: Deprecate FolderId in ImportDashboardRequest and ImportDashboardResponse (#77627)
* Chore: Deprecate FolderId in ImportDashboardRequest

* chore: deprecate FodlerId from ImportDashboardResponse

* chore: add missing nolint comment

* chore: regen specs
2023-11-06 11:32:34 -05:00
Kat Yang
6ed09de47d
Chore: Deprecate FolderId in DashboardMeta (#77626)
* Chore: Deprecate FolderId in DashboardMeta

* chore: regen specs
2023-11-06 11:31:44 -05:00
Kat Yang
911ffed45b
Chore: Deprecate FolderID in libraryElement struct in tests (#77473)
* Chore: Deprecate FolderID in LibraryElement struct in tests

* chore: revert formatting for deprecation comment
2023-11-06 11:31:15 -05:00
Kat Yang
2c7f364067
Chore: Deprecate FolderID in PatchLibraryElementCommand (#77472)
* Chore: Deprecate FolderID in PatchLibraryElementCommand

* chore: regen specs
2023-11-06 11:31:01 -05:00
Kat Yang
dd5314c6a8
Chore: Deprecate FolderID in LibraryElementDTO (#77471)
* Chore: Deprecate FolderID in LibraryElementDTO

* chore: fix formatting of deprecation comment

* chore: revert deprecation comment formatting

* chore: regen specs
2023-11-06 11:30:32 -05:00
Alexander Zobnin
c0d8a7132e
Teams: Search by team ids (#77730)
* Teams: Search by team ids

* Add tests

* Fix tests
2023-11-06 18:08:11 +02:00
Serge Zaitsev
5458ea18e7
Chore: Use vendored xorm instead of a fork (#77388)
* use vendored xorm instead of a fork

* bring back mssql driver

* backport azuresql driver

* restore NoAutoTime
2023-11-06 16:09:49 +01:00
Ryan McKinley
5e7f6e8699
Snapshots: Do not return internal database ids (#77672) 2023-11-06 06:53:52 -08:00
Carl Bergquist
bc7c7bec16
instrumentation: remove live endpoints from slo (#77706)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
2023-11-06 06:51:59 -08:00
Agnès Toulet
95b48339f8
Feature Flag: Add pdfTables (#76452)
Feature Toggles: Add PDF Tables
2023-11-06 14:39:22 +01:00
Sofia Papagiannaki
f999fe3d12
Search: Modify query for better performance (#77576)
* Add missing `org_id` in query condition

* Update benchmarks
2023-11-06 15:16:23 +02:00
Ivana Huckova
a1718aafce
Elasticsearch: Add error source for DataQuery (#77386)
* WIP

* Refactor, plus update source of error in response_parser

* Adjust test

* Use methods and httpclient from errorsource

* Update pkg/tsdb/elasticsearch/data_query.go

Co-authored-by: Scott Lepper <scott.lepper@gmail.com>

* Return nil error

* Fix test

* Fix integration test

---------

Co-authored-by: Scott Lepper <scott.lepper@gmail.com>
2023-11-06 11:36:39 +01:00
Julien Duchesne
c3962acf98
Swagger: Rename annotations model (#77605)
Currently, in the schema, it's a global definition called `ItemDTO`. It's hard to figure out what that is
Renaming it to `Annotation` should be more helpful
2023-11-03 18:32:06 -04:00
Gabriel MABILLE
bf363b3234
ServiceAccounts: Use isManaged in DTO instead of isExternal (#77634)
* ServiceAccounts: Use IsManaged in DTO instead of isExternal

* Revert omitempty

* Modify the other DTO

* Swagger
2023-11-03 17:49:11 +01:00
Ryan McKinley
549787d4f9
Playlist: Implement the entire API with k8s client (#77596) 2023-11-03 09:25:29 -07:00
João Calisto
ade140c161
Feature Management: Define HideFromAdminPage and AllowSelfServe configs (#77580)
* Feature Management: Define HideFromAdminPage and AllowSelfServe configs

* update tests

* add constraint for self-serve

* Update pkg/services/featuremgmt/models.go

Co-authored-by: Michael Mandrus <41969079+mmandrus@users.noreply.github.com>

---------

Co-authored-by: Michael Mandrus <41969079+mmandrus@users.noreply.github.com>
2023-11-03 15:59:07 +00:00
Ryan McKinley
35c1ee9686
EntityStore: Remove http access (can use apiserver now) (#77602) 2023-11-03 08:14:51 -07:00
Ryan McKinley
dd654fdc87
K8s/Playlist: Refactor apis packages so the types and registry are in different packages (#77586) 2023-11-03 08:07:55 -07:00
Ryan McKinley
72ed6434ca
EntityStore: Use protobuf for summary objects (#77600)
use protobuf for summary
2023-11-03 10:49:01 -04:00
Victor Marin
61d63d3034
Transformations: Cumulative and window modes for Add field from calculation (#77029)
* cumulative sum

* refactor and create new mode

* refactor - use reduceOptions for new mode also

* revert naming

* Add window function, rename statistical to cumulative (#77066)

* Add window function, rename statistical to cumulative

* Fix merge errors

* fix more merge errors

* refactor + add window funcs

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>

* add ff + tests + centered moving avg

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>

* make sum and mean cumulative more efficient (#77173)

* make sum and mean cumulative more efficient

* remove cumulative variance, add window stddev

* refactor window to not use reducer for mean. wip variance stdDev

* fix tests after optimization

---------

Co-authored-by: Victor Marin <victor.marin@grafana.com>

* optimize window func (#77266)

* make sum and mean cumulative more efficient

* remove cumulative variance, add window stddev

* refactor window to not use reducer for mean. wip variance stdDev

* fix tests after optimization

* fix test lint

* optimize window

* tests are passing

* fix nulls

* fix all nulls

---------

Co-authored-by: Victor Marin <victor.marin@grafana.com>

* change window size to be percentage

* fix tests to use percentage

* fixed/percentage window size (#77369)

* Add docs for cumulative and window functions of the add field from calculation transform. (#77352)

add docs

* splling

* change WindowType -> WindowAlignment

* update betterer

* refactor getWindowCreator

* add docs to content.ts

* add feature toggle message

---------

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2023-11-03 16:39:58 +02:00
Dan Cech
67b2972052
Chore: add/update sqlstore-related helper functions (#77408)
* add/update sqlstore-related helper functions

* add documentation & tests for InsertQuery and UpdateQuery, make generated SQL deterministic by sorting columns

* remove old log line
2023-11-03 10:30:52 -04:00
Brendan O'Handley
6b729389b5
Prometheus: Set httpMethod as POST for new query client when not defined (#77503)
set httpMethod as POST for new query client when not defined
2023-11-03 10:16:02 -04:00
Brendan O'Handley
ef7b583169
OpenTSDB: Use refid to support alerting on multiple queries (#77575)
* add refid to responses

* add test for refId
2023-11-03 10:15:31 -04:00
Kat Yang
f40de8b613
Chore: Deprecate folderIDs in FolderFilter (#77590)
Chore: Deprecate FolderID in FolderFilter
2023-11-03 10:12:40 -04:00
Alexander Zobnin
225a69ba02
Team LBAC: Fix backend validation (#77612)
* Team LBAC: Fix backend validation

* more tests

* use slices.ContainsFunc()
2023-11-03 17:02:57 +03:00
Will Browne
19cd7dbae1
Plugins: Add API for creating pluginv2 proto client (#77492)
* first pass

* remove client from plugin

* fix wire

* update

* undo import change

* add opts

* add check

* tidy

* re-use logic

* rollback changes
2023-11-03 14:01:08 +01:00
Vardan Torosyan
d624a5d490
Chore: Replace grafana-authnz-team with identity-access-team as code owners (#77609)
* Chore: Replace grafana-authnz-team with identity-access-team as code owner

* Chore: Replace grafana-authnz-team with identity-access-team as code owner

* Fix the failing test
2023-11-03 13:20:39 +01:00
Jacob Zelek
6bf4d0cbc6
DashboardGrid: Add support to filter panels using variable (#77112)
* DashboardGrid panel filter

* Missed segment and changes per PR discussion

* Hide feature flag from docs

---------

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2023-11-03 05:15:54 -07:00
linoman
c50ada3a1a
auth: wire service account proxy (#77215)
* Add interface verification compliance

* rework service account api to a provider

* wire the service accounts api

* rewire the implementation of sa srv for the proxy

---------

Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
2023-11-03 10:27:43 +01:00
Alyssa Bull
a4744a8f5e
Azure Monitor: buildResourceURI function incorrectly migrating (#77178) 2023-11-02 14:30:18 -06:00
Isabella Siu
64e28c0ae2
CloudWatch Logs: Add labels to alert and expression queries (#77529) 2023-11-02 16:26:31 -04:00
Yuri Tseretyan
a2629f3dd3
Alerting: Remove unused Accesscontrol dependency from DbStore (#77479) 2023-11-02 15:54:30 -04:00
Dominik Prokop
6e80a3d59b
DashboardScene: Viewer role only support (#76748)
* Allow starring DashboardScene

* Add feature toggle to enable dashbaord scene for viewers

* Basics for proxying viewers to a dashboard scene

* Removed isHomeDashboard flag

* Don't use proxy for rendering dashboard page

* Revert "Don't use proxy for rendering dashboard page"

This reverts commit 95836bdb2c.

* Pre-fetch dashboard prior page rendering

* Depend only on dashboard permissions

* Update default home dashboard to proper model...

* Fix breadcrumbs

* Types update

* Dashboards page proxy tests

* Fix missing controls

* URLs generation

* DashboardScenePageStateManager caching test

* Tests updates

* Fix wrong import

* Test update

* Gen
2023-11-02 12:02:25 -07:00
William Wernert
e562250f72
Alerting: Handle edge cases without panicking during template migration (#76890)
* Handle empty variable, remove panics

* Use fmt.Errorf only where appropriate
2023-11-02 13:24:54 -04:00
Santiago
01af8f61f1
Alerting: Separate the forked Alertmanager into two implementations (#77582) 2023-11-02 17:53:18 +01:00
Santiago
8fc9873443
Alerting: Add an empty Forked Alertmanager struct (#77550)
Alerting: Add an empty Forked Alertmanager
2023-11-02 16:49:03 +01:00
Oscar Kilhed
0eda368d32
Transformations: Deduplicate names when using extract fields transformation. (#77569)
* dedupe field names

* add test to make sure we don't break normal case
2023-11-02 16:47:42 +01:00
Ryan McKinley
45d59cf31b
Dashboards: Remove dummy trim dashboard api (#77249)
Co-authored-by: nikimanoledaki <niki.manoledaki@grafana.com>
2023-11-02 08:35:14 -07:00
Andres Martinez Gotor
d5f749482a
Ignore dist folder for core plugin (#77549) 2023-11-02 14:56:47 +01:00
Andres Martinez Gotor
00a596b2e0
Chore: Add app URL to the plugin config (#77455) 2023-11-02 13:26:16 +01:00
Andres Martinez Gotor
82a7e1229a
Bug Fix: Respect data source version when provisioning (#77428) 2023-11-02 12:27:17 +02:00
Yuri Tseretyan
85425b2194
Alerting: Fix flaky test TestExportRules (#77519)
* fix test to correclty mock data store

* Update pkg/services/ngalert/api/api_ruler_export_test.go

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>

* Update pkg/services/ngalert/api/api_ruler_export_test.go

---------

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2023-11-01 21:35:04 +02:00
Ryan McKinley
e3641d925c
K8s/Playlist: Support full CRUD from k8s to existing storage (#75709) 2023-11-01 12:32:24 -07:00
Shabeeb Khalid
a59588a62e
Cloudwatch: Use context in aws DescribeLogGroupsWithContext (#77176) 2023-11-01 15:06:06 -04:00
Drew Slobodnjak
9116043453
Storage: Add maxFiles to list functions (#76414)
* Storage: Add maxFiles to list functions

* Add maxDataPoints argument to listFiles function

* Add maxFiles to ResourceDimensionEditor

* Update pkg/services/store/http.go

* rename First to Limit

---------

Co-authored-by: jennyfana <110450222+jennyfana@users.noreply.github.com>
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-11-01 09:42:24 -07:00
Ryan McKinley
5d5f8dfc52
Chore: Upgrade Go to 1.21.3 (#77304) 2023-11-01 09:17:38 -07:00
Sofia Papagiannaki
dfc33a70b7
Dashboards: Fix creating dashboard under folder using deprecated API (#77501)
* Dashboards: Add integration tests for creating a dashboard

* Fix creating dashboard under folder using deprecated API

* Update swagger response

* Fix comments
2023-11-01 17:01:54 +02:00
Todd Treece
384f5ccdc6
Playlist: Add internal API version (#77318) 2023-11-01 09:44:04 -04:00
Joey
c39e9a8f52
Tracing: Trace to profiles (#76670)
* Update Tempo devenv to include profiles

* Update devenv to scrape profiles from local services

* Cleanup devenv

* Fix issue with flame graph

* Add width prop to ProfileTypeCascader

* Add trace to profiles settings

* Add new spanSelector API

* Add spanSelector to query editor

* Update span link query

* Conditionally show span link

* Combine profile and spanProfile query types and run specific query type in backend based on spanSelector presence

* Update placeholder

* Create feature toggle

* Remove spanProfile query type

* Cleanup

* Use feeature toggle

* Update feature toggle

* Update devenv

* Update devenv

* Tests

* Tests

* Profiles for this span

* Styling

* Types

* Update type check

* Tidier funcs

* Add config links from dataframe

* Remove time shift

* Update tests

* Update range in test

* Simplify span link logic

* Update default keys

* Update pyro link

* Use const
2023-11-01 10:14:24 +00:00
Ryan McKinley
dd773e74f1
K8s: Implement playlist api with k8s client (#77405) 2023-10-31 10:26:39 -07:00
Kat Yang
254648b96b
Chore: Deprecate FolderID in CreateLibraryElementComand (#77403)
* Chore: Deprecate FolderID in CreateLibraryElementComand

* chore: add remaining nolint comments

* chore: regen specs to include deprecation notice
2023-10-31 13:24:16 -04:00
Kat Yang
f9b21083c6
Chore: Deprecate FolderID in LibraryElement struct (#77377)
* Chore: Deprecate FolderID in LibraryElement struct

* chore: format deprecated comment

* chore: add remaining nolint comments
2023-10-31 13:02:53 -04:00
Kat Yang
f7ce6f8b41
Chore: Deprecate FolderID in LibraryElementWithMeta (#77406) 2023-10-31 11:50:02 -04:00
Kat Yang
87717849da
Chore: Deprecate FolderID in GetLibraryElementCommand (#77404) 2023-10-31 11:46:48 -04:00
Domas
cf085480fa
Chore: remove (preview) tag from application (#77054)
remove (preview) from Application
2023-10-31 17:11:41 +02:00
Ieva
c51c51458e
RBAC: add a feature toggle for annotation permission changes (#77432)
add a feature toggle for annotation permission changes
2023-10-31 13:30:13 +00:00
Giuseppe Guerra
46261de32d
Plugins: Fix status_source always being "plugin" in plugin request logs (#77433)
* Plugins: Fix status_source always being "plugin" in plugin logs

* add tests

* Fix TestInstrumentationMiddlewareStatusSource
2023-10-31 13:42:39 +01:00
Fabrizio
f8912517e6
Improve logs for backends owned by the Observability Traces and Profiling squad (#76109) 2023-10-31 11:57:17 +01:00
Santiago
a6b9b27673
Alerting: Remove OrgID() from the Alertmanager interface (#77398) 2023-10-31 10:58:47 +01:00
Andres Martinez Gotor
b8105caa05
Chore: Add min Grafana dependency version (#77272) 2023-10-31 10:20:04 +01:00
Dan Cech
e01d096ce2
add resource group to grn (#77396) 2023-10-30 17:08:46 -04:00
Dan Cech
db6035a843
Chore: update kind annotation names to grafana.app/* (#77401)
* update kind annotation names to grafana.app/*
2023-10-30 17:08:31 -04:00
Shabeeb Khalid
abebcf4385
CloudWatch: Use context in aws GetLogGroupFieldsWithContext (#77174) 2023-10-30 15:14:18 -04:00
Kyle Brandt
e4d1fdc3d0
Errors: Make errors the same in dev as prod (#77366)
When running in dev mode, error messages would contain an additional "error" property alongside "message". Since this causes confusion, that has been removed and now error messages are the same both modes (using "message").
2023-10-30 14:06:26 -04:00
Santiago
363830883c
Alerting: Add feature toggles for Alertmanager migration (#77372)
* Alerting: Add feature toggles for Alertmanager migration

* address code review comments
2023-10-30 17:27:08 +01:00
ismail simsek
6b13064cf6
InfluxDB: Fix parsing multiple tags on backend mode (#77340)
* Multiple tags separated by comma in the result

* A non-flaky unit test
2023-10-30 15:45:20 +01:00
Ezequiel Victorero
16034ef062
PublicDashboards: Add swagger documentation (#75318) 2023-10-30 10:32:07 -03:00
ismail simsek
4ed36cbc1d
InfluxDB: Fix parsing empty response (#77353)
Fix parsing empty response
2023-10-30 11:39:15 +01:00
Karl Persson
87eba34745
User: remove empty email / username check from update in service (#77347)
User: remove empty email / username check from update in service
2023-10-30 10:44:26 +01:00
Yuri Tseretyan
bc7357727c
Alerting: Enable feature flag alertingNoDataErrorExecution by default (#77242) 2023-10-27 17:17:34 -04:00
Todd Treece
798e224ce6
K8s: JSON file storage (#75759) 2023-10-27 16:39:27 -04:00
Yuri Tseretyan
48b55f39bf
Alerting: Add support for responders to Opsgenie integration (#77159)
* add support for responders in opsgenie UI config
* update export model

Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
2023-10-27 13:06:46 -04:00
Michael Mandrus
0231873d70
Feature Management: Link to grafana.com docs from feature toggle admin page (#77302)
* add link to gcom

* re-add subtitle on backend so it displays in the high level administration view
2023-10-27 19:16:43 +03:00
ismail simsek
046791e2be
InfluxDB: Response parser improvements (#76852)
* remove retention policy lookup

* Back to one big function

* %10 less memory allocation

pkg: github.com/grafana/grafana/pkg/tsdb/influxdb/influxql
                │    1.txt    │                2.txt                │
                │   sec/op    │   sec/op     vs base                │
ParseBigJson-10   540.9m ± 3%   474.0m ± 2%  -12.37% (p=0.000 n=10)

                │    1.txt     │                2.txt                │
                │     B/op     │     B/op      vs base               │
ParseBigJson-10   580.6Mi ± 0%   573.2Mi ± 0%  -1.28% (p=0.000 n=10)

                │    1.txt     │                2.txt                │
                │  allocs/op   │  allocs/op   vs base                │
ParseBigJson-10   10.123M ± 0%   9.086M ± 0%  -10.25% (p=0.000 n=10)

* Slightly better results comparing with the previous commit
pkg: github.com/grafana/grafana/pkg/tsdb/influxdb/influxql
                │    2.txt    │               3.txt                │
                │   sec/op    │   sec/op     vs base               │
ParseBigJson-10   474.0m ± 1%   503.4m ± 3%  +6.21% (p=0.000 n=10)

                │    2.txt     │                3.txt                │
                │     B/op     │     B/op      vs base               │
ParseBigJson-10   573.2Mi ± 0%   564.0Mi ± 0%  -1.60% (p=0.000 n=10)

                │    2.txt    │               3.txt                │
                │  allocs/op  │  allocs/op   vs base               │
ParseBigJson-10   9.086M ± 0%   9.052M ± 0%  -0.37% (p=0.000 n=10)

* Split into smaller functions

* Unit test for parseTimestamp
2023-10-27 17:17:19 +02:00
Ryan McKinley
9b472b3726
K8s: Use client-go to test legacy playlist changes (#77245) 2023-10-27 06:59:49 -07:00
Gabriel MABILLE
83e9088314
AuthN: Set oauth client grant_types based on plugin state (#77248)
* Disable plugin service account

* Fix bug seen by linoman 💯

Co-authored-by: linoman <2051016+linoman@users.noreply.github.com>

* Account for PR feedback

Co-authored-by: linoman <2051016+linoman@users.noreply.github.com>

* Fix test data

* Enable datasource plugins by default

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>

* Update pkg/services/extsvcauth/oauthserver/oasimpl/service.go

* Handle error differently

* Fix service reg

---------

Co-authored-by: linoman <2051016+linoman@users.noreply.github.com>
Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2023-10-27 14:45:04 +02:00
Gabriel MABILLE
25b30aeb6d
Plugin: Enable service account based on plugin settings on init (#77193)
* Disable plugin service account

* Revert extsvc injection

* handle plugin state changes

* Use isProxyEnabled

* Remove plugininteg changes

* Change update function to also work for mysql 😩

* Plugin: enable service account based on plugin settings on
initialization

* Remove misleading comment

* Fix tests

* test message

* Clean up tests

* Simplify tests

* Re-order imports

* Remove unecessary comment

* Enable datasource plugins by default

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>

---------

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2023-10-27 14:27:06 +02:00
Gabriel MABILLE
2727f41474
AuthN: Change the external service account state on plugin state change (#77157)
* Disable plugin service account

* Revert extsvc injection

* handle plugin state changes

* Use isProxyEnabled

* Remove plugininteg changes

* Change update function to also work for mysql 😩

* Change test to also check no collateral update

* Update pkg/services/serviceaccounts/database/store_test.go

* Update pkg/services/serviceaccounts/database/store_test.go
2023-10-27 13:46:25 +02:00
Eric Leijonmarck
57335cb173
Team LBAC: Add validation/regex of teamheaders (#76905)
* add validation of team header values w. regex

* apply valid headers

* refactor testcases to account for badly formatted json

* refactoring to move validation code close to the validation itself

* removed tes

* Update pkg/api/datasources_test.go

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>

* Update pkg/api/datasources.go

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>

* review comments

* review during pairing

---------

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
2023-10-27 12:37:37 +01:00
Matias Chomicki
46f331e284
Logs: remove toggleLabelsInLogsUI (#77264)
* toggleLabelsInLogsUI: remove flag

* Remove unused imports

* isFilterLabelActive: refId is not optional

* Revert "isFilterLabelActive: refId is not optional"

This reverts commit 008931b7e9.

* Revert method signature change

* Update tests

* Update tests
2023-10-27 13:00:49 +02:00
Shabeeb Khalid
df41378472
CloudWatch: Use context in aws ListSinks and ListAttachedLinks (#77083)
* Use context in aws ListSinks and ListAttachedLinks

In the current way, ListSinks and ListAttachedLinks is used which doesn't
allow cancelling the request if the context changes.
Using ListSinksWithContext and ListAttachedLinksWithContext is the
preferred way. Adding context for GetAccountsForCurrentUserOrRole
is required to pass it to ListSinks method.
2023-10-27 11:49:37 +03:00
Karl Persson
bc9fab6f30
IDForwarding: Update settings name (#77257)
Update settings name
2023-10-27 10:20:49 +02:00
Giuseppe Guerra
45bcbff115
Plugins: Fix plugin alias ID being used in PluginContext.ID (#77206)
* Fix PluginID being populated with alias in plugincontext Get and GetWithDataSource

* Add tests

* pr review suggestion

* pr review suggestion
2023-10-27 11:14:07 +03:00
Horst Gutmann
aa9fc3be72
CI: Fix release-npm-packages action (#77127)
* Remove dependency of NpmReleaseAction to the git binary

* Switch to using the node image for the release-npm-packages step
2023-10-27 10:20:20 +03:00
Karl Persson
1b6d39f823
IDForwarding: Require that id forwarding is enabled for data source (#77131)
* Require that id forwarding is enabled for data source

* Address feedback
2023-10-27 08:30:33 +02:00
Ezequiel Victorero
b2ef9a81f2
PublicDashboards: Chore refactor api test (#77091) 2023-10-26 14:52:27 -03:00
Ryan McKinley
7d619199d0
K8s/Authorizer: Move allow from fallback to org_role (#77235) 2023-10-26 20:46:45 +03:00
Ryan McKinley
c122ffc72b
K8s: Add integration test infra, and fix authz patterns (#77218) 2023-10-26 20:02:33 +03:00
Ieva
744f4defcf
Bug: fix a typo in dashboard permission logic (#77231)
fix an error handling typo
2023-10-26 19:39:27 +03:00
Ieva
f6e2a775d3
Bug fix: Correctly set permissions on provisioned dashboards (#77155)
* set default basic role permissions for dashboards even if dash creator permissions can't be set

* temporarily increase the test threshold until we can tweak the page
2023-10-26 17:21:50 +01:00
Ryan McKinley
ba1575322b
K8s: Share legacy storage configs with etcd based configs (#77181) 2023-10-26 09:05:51 -07:00
Kristin Laemmert
15c1d5f636
chore: add basic tracing to playlist service (#77165) 2023-10-26 09:25:31 -04:00
João Calisto
7869ca1932
Feature Management: UI improvements (#76866)
* Feature Management: UI improvements

* update UI logic

---------

Co-authored-by: Michael Mandrus <michael.mandrus@grafana.com>
2023-10-26 10:42:00 +01:00
Todd Treece
bf8af608a7
K8s: Add tracer provider to config (#77003) 2023-10-25 15:19:44 -04:00
Ryan McKinley
7e069f9d91
K8s: Move the namespace mapper to the same package that resolves them (#77101) 2023-10-25 14:13:46 -04:00
Ieva
39a30b0c01
Bug fix: add library panel permissions to basic roles (#77144)
set library panel permissions to basic roles
2023-10-25 18:44:55 +01:00
Misi
1e81ffccac
Auth: Handle when access token has already been refreshed in OAuth token sync (#77118)
* Use singleflight to prevent logging error if the token has already been refreshed

* Change order of error checks

* align tests, change error name

* Change sf key

* Update based on the review

* refactor
2023-10-25 18:15:41 +02:00
Ryan McKinley
d2732ae726
K8s: Add explicit table converter (#77098) 2023-10-25 09:00:20 -07:00
Santiago
f9fc2e4568
Alerting: Remove ConfigHash() from the Alertmanager interface (#77134) 2023-10-25 17:11:53 +02:00
Alexander Weaver
6ee52ac80c
Alerting: Allow more time before Alertmanager expire-resolves alerts (#77094)
* Sync endsAt factor with prometheus

* Fix state tests
2023-10-25 10:03:46 -05:00
linoman
dff7403b29
auth: implement feature flag for service account proxy (#77129)
* add FlagExternalServiceAccounts to proxy service

* add FlagExternalServiceAccounts value to tests

---------

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2023-10-25 16:44:05 +02:00
Ryan McKinley
5d44240fca
K8s: Use grafana.app as the playlist+example group name domains (#77096) 2023-10-25 07:24:19 -07:00
Gilles De Mey
e12e40fc24
Alerting: Contact Points v2 part IV (#76063) 2023-10-25 15:57:53 +02:00
kay delaney
b215d2f0fb
Library Panels: Fix library panel creation with RBAC enabled (#76553) 2023-10-25 16:29:57 +03:00
Gabriel MABILLE
20fc0cbf35
Chore: Allow env overrides for the extended_jwt config (#77132)
Chore: Allow env overrides for the extended_jwt config
2023-10-25 14:28:12 +02:00
Marcus Efraimsson
9bf7eb5fbc
Plugins: Adds logging around loading of plugins for better tracking (#76896) 2023-10-25 14:01:30 +02:00
Santiago
322a9c0b15
Alerting: Replace FileStore() for CleanUp() in the Alertmanager interface (#77126)
Alerting: Remplace FileStore() for CleanUp() in the Alertmanager interface
2023-10-25 13:58:28 +02:00
linoman
1bc81b7bd1
auth: migrate api interface implementation (#77040)
* expand serviceaccount service interface

* implemet FakeServiceAccountService

* Replace SA service interface from api

* merge sa proxy tests with new fake service

* implement DeleteServiceAccountToken

* add test for DeleteServiceAccountToken
2023-10-25 12:40:30 +02:00
Santiago
01add144b8
Alerting: Send alerts to the remote Alertmanager (#77034)
* Alerting: Rename remote.ExternalAlertmanager to remote.Alertmanager

* Alerting: Send alerts to the remote Alertmanager

* add ticker to readiness check, add tests

* use options when creating a new sender.ExternaAlertmanager

* unexport defaultMaxQueueCapacity

* delete unused defaultConfig field

* add debug log line when sending alerts to the remote alertmanager

* move and refactor readiness check

* update tests to not include defaultConfig
2023-10-25 11:52:48 +02:00
Horst Gutmann
f7445777c7
CI: Temporarily disable arm build-tooling (#77064) 2023-10-24 18:14:08 +03:00
Hugo Kiyodi Oshiro
dfc1875061
Plugins: Add managed instance installation resources (#76767)
* Plugins: Add configs to allow managed install

* Expose methods to use with cloud plugin installer

* Change plugins installer bind to OSS
2023-10-24 16:21:37 +02:00
Todd Treece
162a422f0a
K8s: Playlist apply fix (#76971) 2023-10-24 10:19:17 -04:00
Gabriel MABILLE
897e3a4dab
AuthN: Add metrics to external service accounts management (#76789)
* AuthN: Add metrics to external service accounts management

* Add a new metric to count stored external service accounts

* Update variable names

Co-authored-by: linoman <2051016+linoman@users.noreply.github.com>

* Add test to SearchOrgServiceAccounts

* Add feature flags checks before registering and using the metrics

---------

Co-authored-by: linoman <2051016+linoman@users.noreply.github.com>
2023-10-24 15:54:14 +02:00
Matias Chomicki
765defea1e
Loki Queries: Query Splitting enabled by default (#75876)
* Loki Query Splitting: enable by default

* Query splitting: add gdev dashboard

* Update testdata file

* Update devenv/dev-dashboards/datasource-loki/loki_query_splitting.json

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

* Revert "Update testdata file"

This reverts commit 5a891ba1f2.

* Update feature-toggles readme

---------

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2023-10-24 16:09:30 +03:00
Alexander Zobnin
cad3c43bb1
Team LBAC: Move middleware to enterprise (#76969)
* Team LBAC: Move middleware to enterprise

* Remove ds proxy part

* Move utils to enterprise
2023-10-24 14:06:18 +03:00
Gabriel MABILLE
3015e5921f
Chore: Move extsvcaccounts package to serviceaccounts (#76977)
* Chore: Move extsvcaccounts package to serviceaccounts

* Fix proxy

* Fix tests

* Fix linting
2023-10-24 11:01:04 +02:00
Ieva
159bb3c032
RBAC: Allow scoping access to root level dashboards (#76987)
* correctly check permissions to list dashboards on the root

* correctly display the access inherited from general folder for dashboards

* Update pkg/services/sqlstore/permissions/dashboard.go

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>

* Update dashboard_filter_no_subquery.go

---------

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2023-10-24 11:55:38 +03:00
Sofia Papagiannaki
03a626f1d6
Search: Fix empty folder details for nested folder items (#76504)
* Introduce dashboard.folder_uid column

* Add data migration

* Search: Fix empty folder details for nested folders

* Set `dashboard.folder_uid` and update tests

* Add unique index

* lint

Ignore cyclomatic complexity of func
`(*DashboardServiceImpl).BuildSaveDashboardCommand

* Fix search by folder UID
2023-10-24 10:04:45 +03:00
Todd Treece
949b3af1b2
K8s: Remove duplicate listener in production (#76583) 2023-10-23 21:42:10 +03:00
ismail simsek
63abe25b74
InfluxDB: Fix table parsing with backend mode (#76899)
* Add resultFormat to query model

* don't add row name if the result format is table

* No need special formatting since we use unified dataframes

* betterer

* specify visualization type in response

* Unit tests

* fix unit tests
2023-10-23 19:21:30 +02:00
Kyle Brandt
59ef1558e8
Prometheus: (Chore) Switch to sdk tracing from infra tracing (#76975) 2023-10-23 13:11:12 -04:00
Ivan Ortega Alba
a03f9e7660
Feature toggle: Mark dashgpt as GA (#76304)
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2023-10-23 09:39:12 -07:00
Shabeeb Khalid
3a9eb33b14
CloudWatch: Use context in aws GetResourcesPagesWithContext (#76921) 2023-10-23 11:46:48 -04:00
ismail simsek
5eb0b2bedb
InfluxDB: Fix aliasing with $measurement or $m on backend mode (#76917)
* better interpolation $measurement aliasing

* unit tests
2023-10-23 17:36:51 +02:00
Alexander Weaver
39599fa7f7
Alerting: Alert rule constraint violations return as 400s in provisioning API (#76396)
Constraint violations become 400s
2023-10-23 10:28:40 -05:00