Commit Graph

11675 Commits

Author SHA1 Message Date
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