Commit Graph

47014 Commits

Author SHA1 Message Date
Eric Leijonmarck
a9a18a4b6d
Team LBAC: Remove default rules of lbac rules (#77946)" (#78188)
This reverts commit 944593c4d5.

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
2023-12-06 14:52:05 +01:00
Yasir Ekinci
399d0708da
Prometheus: Fix PromQail health check + add test (#77259)
promQail: fix health check + add test
2023-12-06 07:51:33 -06:00
Mihai Doarna
d7641b0ecb
Auth: encrypt secrets for oauth providers in SSO settings API service (#79081)
encrypt secrets for oauth providers
2023-12-06 14:37:10 +02:00
ismail simsek
c088d003f2
InfluxDB: Implement InfluxQL json streaming parser (#76934)
* Have the first iteration

* Prepare bench testing

* rename the test files

* Remove unnecessary test file

* Introduce influxqlStreamingParser feature flag

* Apply streaming parser feature flag

* Add new tests

* More tests

* return executedQueryString only in first frame

* add frame meta and config

* Update golden json files

* Support tags/labels

* more tests

* more tests

* Don't change original response_parser.go

* provide context

* create util package

* don't pass the row

* update converter with formatted frameName

* add executedQueryString info only to first frame

* update golden files

* rename

* update test file

* use pointer values

* update testdata

* update parsing

* update converter for null values

* prepare converter for table response

* clean up

* return timeField in fields

* handle no time column responses

* better nil field handling

* refactor the code

* add table tests

* fix config for table

* table response format

* fix value

* if there is no time column set name

* linting

* refactoring

* handle the status code

* add tracing

* Update pkg/tsdb/influxdb/influxql/converter/converter_test.go

Co-authored-by: İnanç Gümüş <m@inanc.io>

* fix import

* update test data

* sanity

* sanity

* linting

* simplicity

* return empty rsp

* rename to prevent confusion

* nullableJson field type for null values

* better handling null values

* remove duplicate test file

* fix healthcheck

* use util for pointer

* move bench test to root

* provide fake feature manager

* add more tests

* partial fix for null values in table response format

* handle partial null fields

* comments for easy testing

* move frameName allocation in readSeries

* one less append operation

* performance improvement by making string conversion once

pkg: github.com/grafana/grafana/pkg/tsdb/influxdb/influxql
             │ stream2.txt │            stream3.txt             │
             │   sec/op    │   sec/op     vs base               │
ParseJson-10   314.4m ± 1%   303.9m ± 1%  -3.34% (p=0.000 n=10)

             │ stream2.txt  │             stream3.txt              │
             │     B/op     │     B/op      vs base                │
ParseJson-10   425.2Mi ± 0%   382.7Mi ± 0%  -10.00% (p=0.000 n=10)

             │ stream2.txt │            stream3.txt             │
             │  allocs/op  │  allocs/op   vs base               │
ParseJson-10   7.224M ± 0%   6.689M ± 0%  -7.41% (p=0.000 n=10)

* add comment lines

---------

Co-authored-by: İnanç Gümüş <m@inanc.io>
2023-12-06 12:39:05 +01:00
Alexa V
e8b2e85966
Dashboard: Scene Migration: Add variable definition prop to serialization (#79022)
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
2023-12-06 11:33:54 +01:00
Ryan McKinley
3299809977
Chore: remove unused math function (#79120) 2023-12-06 01:38:48 -08:00
Gábor Farkas
9f0fc60477
sql: remove xorm dependency from postgres/mysql/mssql (#77870)
* sql: remove xorm

* sql: remove pkg/util dependency (#78821)

sql: removed md5-util dependency
2023-12-06 09:35:05 +01:00
Zoltán Bedi
d85ac7cea7
Chore: Add comments to RAQB config (#79075) 2023-12-06 08:33:04 +01:00
Ryan McKinley
439edebcd6
K8s: fix standalone command and add hack scripts (#79052)
Co-authored-by: Charandas Batra <charandas.batra@grafana.com>
2023-12-05 14:31:49 -08:00
Ezequiel Victorero
66df17869d
Chore: Use dashboard service to retrieve dashboards (#79020) 2023-12-05 18:09:21 -03:00
gotjosh
0c9356a3c7
Unified Alerting: Set max_attempts to 1 by default (#79095)
* Unified Alerting: Set `max_attempts` to 1 by default

The retry logic for unified alerting has been broken as far as v9.4.x, rather than fixing it in one go and causing a headache to our users with rules putting extra load on their datasources - I think a better approach is to simply set 1 as a default and then let our users change it.

I see two cons with this approach:

- Configuration for legacy to unified alerting cannot be ported over automatically, users will have to manually set `max_attempts` to 3 when migrating.
- Users expecting to get any sort of retrying (as with legacy alerting) will not have it out of the box and will have to manually edit the configuration.

Signed-off-by: gotjosh <josue.abreu@gmail.com>
---------

Signed-off-by: gotjosh <josue.abreu@gmail.com>
2023-12-05 17:42:34 +00:00
Ashley Harrison
7cdddb2790
PluginList: Add plugin list loading skeleton (#79012)
* add plugin skeleton

* lineHeight: 1 instead of 0
2023-12-05 16:39:23 +00:00
Jo
5efa85e634
Plugins: Use org role to separate unauthed from anon (#79082)
use org role to separate unauthed from anon
2023-12-05 16:40:19 +01:00
Alexander Zobnin
959ebf82da
Folders: Show dashboards and folders with directly assigned permissions in "Shared" folder (#78465)
* 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

* Folders: Fix fetching empty folder

* Nested folders: Show dashboards with directly assigned permissions

* Fix slow dashboards fetch

* Refactor

* Fix cycle dependencies

* Move shared folder to models

* Fix shared folder links

* Refactor

* Use feature flag for permissions

* Use feature flag

* Review comments

* Expose shared folder UID through frontend settings

* Add frontend type for sharedWithMeFolderUID option

* Refactor: apply review suggestions

* Fix parent uid for shared folder

* Fix listing shared dashboards for users with access to all folders

* Prevent creating folder with "shared" UID

* Add tests for shared folders

* Add test for shared dashboards

* Fix linter

* Add metrics for shared with me folder

* Add metrics for shared with me dashboards

* Fix tests

* Tests: add metrics as a dependency

* Fix access control metadata for shared with me folder

* Use constant for shared with me

* Optimize parent folders access check, fetch all folders in one query.

* Use labels for metrics
2023-12-05 16:13:31 +01:00
Dan Cech
647f576359
Server: Automatically generate a self-signed TLS cert if needed (#78243)
generate a self-signed cert when running in https or http2 mode without a provided cert
2023-12-05 10:04:39 -05:00
Todd Treece
7e2aad1d01
Revert "K8s: Refactor metrics to share k8s registry (#77957)" (#79079)
This reverts commit 38bc41651a.
2023-12-05 09:34:07 -05:00
Dominik Prokop
c30098e772
QueryVariable: Always run queries with dashboard time range (#79056) 2023-12-05 06:06:26 -08:00
Alexander Zobnin
043096d652
Team LBAC: Limit access to data source (#78376)
* Team LBAC: Limit access to data source

* Fix tests
2023-12-05 13:45:40 +02:00
Misi
d099292d99
Auth: Fix for the github_oauth parse config error (#79063)
* Fix for reverting the github_oauth parse config behaviour

* minimal changes
2023-12-05 13:13:55 +02:00
Joey
f51ad749ab
Pyroscope: Decouple config editor (#79027)
Decouple config editor
2023-12-05 10:57:49 +00:00
Ashley Harrison
568d979dd5
Chore: Improve typings (#78940)
* improve typings

* transformations typings improvements

* add bootData to window

* more grafana-data fixes

* undo window.grafanaBootData typings
2023-12-05 10:26:23 +00:00
Torkel Ödegaard
ed128ea964
Frontend: Foundations for multi tenant frontend (#78815)
* Frontend: Foundations for multi tenant frontend

* improve manifest parsing for multi-tenant frontend (#78876)

* add test

* add test

* ??

* Updates

* Added cache

* test cleanup

* lint

* fix test

* fix error templates

* cleanup

* remove copy

* revert changes to list testdata

* comment cleanup

* prepare integration tests

* Remove integrety

---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-12-05 08:34:22 +01:00
Ryan McKinley
7b78061235
K8s: Add grafana metadata accessor (#79050) 2023-12-04 18:20:17 -08:00
Rodrigo Villablanca
ab83bc7346
Alerting: Fix export of notification policy to JSON (#78021)
* Export Notification Policy correctly (#78020)

The JSON version of an exported Notification Policy now
inline correctly the policy in the same way the Yaml version
does.

Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
2023-12-04 16:57:37 -05:00
Gabriel MABILLE
99580d60f5
Chore: Fix flaky test by removing the extsvcauth background service (#79044) 2023-12-04 22:26:55 +01:00
Todd Treece
38bc41651a
K8s: Refactor metrics to share k8s registry (#77957)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-12-04 10:54:59 -08:00
Julien Duchesne
cd584e9261
Swagger: Fix getLibraryElementByName response (#78221)
It returns an array of library elements, not a single one. This has been tested by generating the OpenAPI client and using it in Terraform
2023-12-04 11:20:13 -05:00
Julien Duchesne
3c51190392
ngalert make: Support GNU install on Darwin (#78482)
* ngalert `make`: Support GNU install on Darwin
Currently, the Makefile assumes that Darwin is using the Mac version of `sed`
I have the GNU version, so it failed. With this PR, it checks which version is installed
I also called `make` and there are some changes that came out of it

* swagger-gen
2023-12-04 10:11:39 -05:00
Darren Janeczek
ac1b9e44a2
data-trails: ability to (de)serialize parents and current index (#78782)
fix: ability to (de)serialize parents and current index

- refactored so only history stores parent relations and current index

- rounded indirect parent links
2023-12-04 10:04:58 -05:00
Dan Cech
318f51eaee
Chore: Remove unused CacheService dependency from sqlstore (#78507)
remove unused CacheService dependency from sqlstore
2023-12-04 10:00:45 -05:00
Julien Duchesne
637cfa89be
Swagger: Rename Spec to Preferences (#78226)
The definition for preferences is globally named `Spec` because that's the type that cue outputs
This adds a swagger annotation to rename the definition in the swagger schema to `Preferences`
This will be easier to use in generated clients
2023-12-04 09:51:09 -05:00
Julien Duchesne
2fb207ba13
Generate latest OpenAPI spec (#79017)
Following https://github.com/grafana/grafana-enterprise/pull/6003
Also, some other pending changes aren't reflected in the spec it seems
2023-12-04 09:16:33 -05:00
Gabriel MABILLE
5b70130e6c
Plugins: Rename externalServiceAuthentication to iam (#78686)
Plugins: Rename externalServiceAuthentication to iam
2023-12-04 13:14:21 +01:00
Marcus Efraimsson
0825b63b79
Plugins: Only preload plugins if user is authenticated (#78805)
Fixes #75941
2023-12-04 11:53:05 +01:00
ssama88
fbaa611f17
Storybook: Fix Selected Card layout issues (#77830) 2023-12-04 10:52:42 +00:00
dependabot[bot]
5d2593db13
Bump google-github-actions/auth from 1 to 2 (#78867)
Bumps [google-github-actions/auth](https://github.com/google-github-actions/auth) from 1 to 2.
- [Release notes](https://github.com/google-github-actions/auth/releases)
- [Changelog](https://github.com/google-github-actions/auth/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/auth/compare/v1...v2)

---
updated-dependencies:
- dependency-name: google-github-actions/auth
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-04 10:42:18 +00:00
Marcus Efraimsson
00fa6c7caa
Chore: Upgrade sdk to v0.194.0 (#78961)
* Upgrade sdk to v0.194.0

* update replace for k8s.io/apiserver
2023-12-04 11:42:09 +01:00
Sofia Papagiannaki
6d4625ad52
Alerting: Fix deleting rules in a folder with matching UID in another organization (#78258)
* Remove usage of obsolete function for deleting alert rules under folder

* Apply suggestion from code review

* Update tests
2023-12-04 11:34:38 +02:00
Torkel Ödegaard
4e2201ffeb
DataTrails: Fixes filters taking metric into account (#78786)
* DataTrails: Fixes filters taking metric into account

* fix merge
2023-12-04 09:42:34 +01:00
Ryan McKinley
f761ae1f02
FeatureFlags: Add created time property (#78996) 2023-12-03 20:45:51 -08:00
Andrej Ocenas
b40913c5e5
Flamegraph: Refactor css styling (#78698) 2023-12-03 12:00:42 +01:00
Ashley Harrison
4a6ff8cf69
Navigation: add application-observability icon (#78935)
add application-observability icon
2023-12-02 09:51:46 +00:00
Yuri Tseretyan
64feeddc23
Alerting: Update rule access control to return errutil errors (#78284)
* update rule access control to return errutil errors
* use alerting in msgID
2023-12-02 01:42:11 +02:00
Matthew Jacobson
6644e5e676
Alerting: Fix migration that is brittle to version downgrades (#78976) 2023-12-01 15:18:41 -05:00
Kyle Cunningham
b42d652106
Transformations: Move transformation addition into drawer (#78299)
* Start splitting out code

* Use flag

* A bit of rocket surgery

* Prettify

* Cleanup behavior

* Work through behaviors

* Move empty message from other PR

* Import fixes and prettier

* Clean things up

* Add selector for tests

* Cleanups

* Working with transformation redesign

* Some more tweaks to make sure of correct behavior

* Update betterer/eslint exceptions

* Localization

* Remove unecessary fragments

* Spacing and prettier

* Update tests for new UI

* Update e2e tests

* One more e2e test fix

* Update selectors

* Fix one test and break another
2023-12-01 14:08:54 -06:00
Isabella Siu
d894f4cc79
CloudWatch: Correctly quote metric names with special characters (#78958) 2023-12-01 14:37:09 -05:00
Sven Grossmann
af05fdc806
Transformations: Fill array with undefined to prevent mismatching length (#78911)
* fill array with `undefined` to prevent matching length

* update unit test to include sortBy transformation

---------

Co-authored-by: Galen <galen.kistler@grafana.com>
2023-12-01 13:33:05 -06:00
Piotr Jamróz
b64802ed3b
Correlations: Add error logging (#78272)
* Add error logging when parsing correlations

* Make orgId optional

* Add module property and move source and target to context for better readability
2023-12-01 20:26:05 +01:00
Gilles De Mey
58d0c51cf4
Alerting: Add note to the docs that GMA rules are evaluated concurrently (#78902) 2023-12-01 18:32:48 +01:00
ismail simsek
2b0e7afb4e
InfluxDB: Fix an edge case while parsing table response (#78802)
* Prepare the test files

* use json files everywhere

* update golden json files

* disable update

* update test file

* fix naming

* lint

* InfluxDB: Add metadata information to first frame only (#78664)

* executedString in first frame only

* lint

* fix tests

* update tests

* don't update

* linting

* update

* update again

* handle nil values

* append in the right array

* add comments

* remove redundant if condition
2023-12-01 18:31:49 +01:00