Commit Graph

245 Commits

Author SHA1 Message Date
Will Browne
6bd1865749 Plugins: Fix flaky reverse proxy response tests (#96051)
tidy
2024-11-11 14:35:42 +00:00
Stephanie Hingtgen
4e318e6285 Revert "Chore: Enable cache on golangci linter" (#96069)
Revert "Chore: Enable cache on golangci linter (#95471)"

This reverts commit d5cde0b60a.
2024-11-08 01:05:14 +02:00
Serge Zaitsev
d5cde0b60a Chore: Enable cache on golangci linter (#95471)
* try to enable cache on golangci linter

* bump version

* exclude G115

* reduce timeout

* remove deprecated linter

* bump linter version in bingo

* try a different syntax for workspace modules

* try another command

* add apps to linter path

* try disabling cue codegen

* skip some linting in devenv

* exclude dirs and try again

* try workaround for pkg

* try path instead of dir

* make it one line

* replace package prefix

* exclude xorm

* exclude wire

* file-based aproach to nolint in workspaces

* missing quote

* simplify command line

* change ownership
2024-11-07 18:15:52 +01:00
Eric Leijonmarck
3877537dc0 Reverse proxy: Skip flaky test for 5xx status codes (#95839)
add 5xx status codes
2024-11-06 17:54:34 +00:00
Marcus Efraimsson
42016dc359 Chore: Update SDK to v0.255.0 (#94894) 2024-10-18 10:42:32 +02:00
Diego Augusto Molina
e462974359 Chore: Prevent xorm from interfering with indexes (#94790)
prevent xorm from interfering with indexes
2024-10-16 22:52:42 -03:00
Misi
ee8bb63d2d Auth: Replace jmespath/go-jmespath with jmespath-community/go-jmespath (#94203)
Replace jmespath/go-jmespath with jmespath-community/go-jmespath
2024-10-03 15:43:15 +02:00
Karl Persson
8bcd9c2594 Identity: Remove typed id (#91801)
* Refactor identity struct to store type in separate field

* Update ResolveIdentity to take string representation of typedID

* Add IsIdentityType to requester interface

* Use IsIdentityType from interface

* Remove usage of TypedID

* Remote typedID struct

* fix GetInternalID
2024-08-13 10:18:28 +02:00
Ryan McKinley
21d4a4f49e Auth: use IdentityType from authlib (#91763) 2024-08-12 09:26:53 +03:00
Karl Persson
bcfb66b416 Identity: remove GetTypedID (#91745) 2024-08-09 18:20:24 +03:00
Todd Treece
7f155b2b6f Chore: Add go workspace scripts (#91707) 2024-08-08 16:51:17 -04:00
Kristin Laemmert
a117b090cf chore: preallocate slices where we have a good idea of requirements (#91596)
* chore: preallocate slices where we have a good idea of requirements

* pr feedback
2024-08-07 08:34:52 -04:00
Ryan McKinley
728150bdbd Identity: extend k8s user.Info (#90937) 2024-07-30 08:27:23 +03:00
Ryan McKinley
be7b1ce2df Chore: Replace appcontext.User(ctx) with identity.GetRequester(ctx) (#91030) 2024-07-26 16:39:23 +03:00
Ryan McKinley
9db3bc926e Identity: Rename "namespace" to "type" in the requester interface (#90567) 2024-07-25 12:52:14 +03:00
Ryan McKinley
bb40fb342a Chore: go mod tidy + sum cleanup (#90576) 2024-07-18 07:48:21 -07:00
Todd Treece
9c6d3590a2 Chore: Fix apiserver circular dependencies (#89918) 2024-07-01 11:42:34 -04:00
Marcus Andersson
04f39457cf Chore: Remove sensitive information from presigned URLs prior to logging (#87035)
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
Co-authored-by: Dan Cech <dcech@grafana.com>
Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2024-06-24 14:53:42 +02:00
Kevin Minehart
78e9226ad8 CI: Add bump-version action to the release PR workflow (#89491) 2024-06-20 13:15:09 -05:00
Andres Martinez Gotor
44fd13c742 Repurpose wrong datasource UID feature flag (#89363) 2024-06-20 12:56:39 +02:00
Karl Persson
606a74d0af Zanzana: Initial work to run openFGA as embedded or standalone service (#89211)
* Zanana: Initial work to run zanana as ebeddedn or standalone

* Add addr settings for when remote client is used.

* sync dependencies

* Lock mysql driver version
---------

Co-authored-by: Dan Cech <dcech@grafana.com>
2024-06-18 10:04:18 +02:00
Dave Henderson
6262c56132 chore(perf): Pre-allocate where possible (enable prealloc linter) (#88952)
* chore(perf): Pre-allocate where possible (enable prealloc linter)

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

* fix TestAlertManagers_buildRedactedAMs

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

* prealloc a slice that appeared after rebase

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

---------

Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
2024-06-14 14:16:36 -04:00
Ryan McKinley
99d8025829 Chore: Move identity and errutil to apimachinery module (#89116) 2024-06-13 07:11:35 +03: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
Ryan McKinley
6d10797812 Errors: Update errutil to be compatible with k8s errors (#87605) 2024-05-20 18:11:37 +03:00
Ezequiel Victorero
42d75ac737 Dashboards: Add feature restore dashboards backend (#83131)
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2024-05-16 14:36:26 -03:00
Stephanie Hingtgen
1bc6738d92 Chore: Upgrade go from 1.21.0 to 1.21.10 (#87479) 2024-05-09 15:57:08 +03:00
Dan Cech
41bee274fd Chore: Fix error handling in postDashboard, remove UserDisplayDTO, fix live redis client initialization (#87206)
* clean up error handling in postDashboard and remove UserDisplayDTO

* replace GetUserUID with GetUID and GetNamespacedUID, enforce namespace constant type

* lint fix

* lint fix

* more lint fixes
2024-05-06 14:17:34 -04:00
Andres Martinez Gotor
b6f899d953 Migrate wrong datasource UIDs (#86598) 2024-05-03 13:32:07 +02:00
Karl Persson
d8fbbdefea Identity: Use typed namespace id (#87121)
* Use typed namespace id
2024-05-02 14:50:56 +02:00
Marcus Efraimsson
fbcb9a3677 Chore: Upgrade/fix deps after thema removal (#86763)
* Chore: Upgrade/fix deps after thema removal

* github.com/deepmap/oapi-codegen v1.14.0

* github.com/deepmap/oapi-codegen v1.15.0

* github.com/deepmap/oapi-codegen v1.16.0

* fix for dep used in enterprise

* github.com/deepmap/oapi-codegen/v2 v2.0.0

* oapi-codegen/v2 v2.1.0, kin-openapi v0.122.0, sdk

* keep kin-openapi at v0.122.0 and allow SDK to use v0.124.0

* remove github.com/deepmap/oapi-codegen v1 dep

* fix owner

* add back github.com/deepmap/oapi-codegen v1 dep

* upgrade github.com/influxdata/influxdb-client-go/v2 to get rid of deepmap/oapi-codegen

* migrate to oapi-codegen/runtime

* sdk

* sdk v0.227.0
2024-04-25 20:52:09 +02:00
Diego Augusto Molina
e6ead667b3 Unified Storage: added pkg/util/ring package to handle queueing of notifications (#84657)
* added pkg/util/rinq package to handle queueing of notifications

* fix linters

* Fix typo in comment

Co-authored-by: Dan Cech <dcech@grafana.com>

* improve allocation strategy for Enqueue; remove unnecessary clearing of slice

* Update pkg/util/ringq/dyn_chan_bench_test.go

Co-authored-by: Dan Cech <dcech@grafana.com>

* Update pkg/util/ringq/ringq.go

Co-authored-by: Dan Cech <dcech@grafana.com>

* refactor to move stats and shrinking into Ring

* add missing error assertions in tests

* add missing error assertions in tests and linting issues

* simplify controller closed check

* improve encapsulation of internal state in Ring

* use (*Ring).Len for clarity instead of stats

---------

Co-authored-by: Dan Cech <dcech@grafana.com>
2024-04-11 19:32:31 -03:00
Todd Treece
72472e5eb7 K8s: Add slog wrapper (#84680) 2024-04-09 18:39:25 +03:00
Misi
4c12d77b98 Util: Support parsing and splitting strings enclosed in quotes in util.SplitString (#85735)
* Support parsing string enclosed in quotation marks in util.SplitString

* Support mixed formats of string list
2024-04-09 10:35:57 +02:00
Jo
5340a6e548 Auth: Extended JWT client for OBO and Service Authentication (#83814)
* reenable ext-jwt-client

* fixup settings struct

* add user and service auth

* lint up

* add user auth to grafana ext

* fixes

* Populate token permissions

Co-authored-by: jguer <joao.guerreiro@grafana.com>

* fix tests

* fix lint

* small prealloc

* small prealloc

* use special namespace for access policies

* fix access policy auth

* fix tests

* fix uncalled settings expander

* add feature toggle

* small feedback fixes

* rename entitlements to permissions

* add authlibn

* allow viewing the signed in user info for non user namespace

* fix invalid namespacedID

* use authlib as verifier for tokens

* Update pkg/services/authn/clients/ext_jwt.go

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

* Update pkg/services/authn/clients/ext_jwt_test.go

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

* fix parameter names

* change asserts to normal package

* add rule for assert

* fix ownerships

* Local diff

* test and lint

* Fix test

* Fix ac test

* Fix pluginproxy test

* Revert testdata changes

* Force revert on test data

---------

Co-authored-by: gamab <gabriel.mabille@grafana.com>
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2024-04-02 17:45:15 +02:00
Todd Treece
cdb2e7dd3e Chore: Sync go workspace (#84932) 2024-03-21 18:34:40 +02:00
Ryan McKinley
e27c08cfa9 QueryService: Return application/json and better errors (#84234) 2024-03-19 15:52:15 +02:00
Jack Westbrook
6599fa805d Plugins: Always load decoupled frontend assets from builds (#81873)
* Wip

* Wip

* Adapt to load external module

* build: remove cloudmonitoring from built_in_plugins, clean up webpack output

* chore(plugins): remove decoupled plugins from package.json deps

* chore(codeowners): update file for nx.json

* revert(webpack): put back path in config

* build(frontend): use nx to run prod builds of decoupled plugins with yarn build

* style(prometheus): run prettier-write to fix tsconfig.json

* style(backend): remove unused subFile.isDistDir

* revert(locales): remove formatting changes adding new line at end of files

* chore(webpack): clean up dev output

* build(nx): make grafana an nx project, bump lerna and nx

* build(plugin-configs): move cache directory to node_modules

* style(datasource-plugins): add eslint ignore for .gen.ts files

* chore(codeowners): add frontend-ops as owner of project.json

* build(webpack): add getDecoupledPlugins to automatically ignore when watching

* ci(drone): skip nx cache when building frontend packages

* style(ci): fix missing trailing comma

* Revert "style(ci): fix missing trailing comma"

This reverts commit 7520d41576.

* Revert "ci(drone): skip nx cache when building frontend packages"

This reverts commit 46938883ac.

* feat(zipkin): remove from grafana core bundle

* chore(npm): bump nx package to latest 18.0.8

* docs(dev-guide): add a note about what yarn start now builds

---------

Co-authored-by: Andres Martinez <andres.martinez@grafana.com>
2024-03-13 12:40:09 +01:00
ismail simsek
3bb38d82ab Chore: Bump grafana-plugin-sdk-go version to v0.214.0 (#84162)
* bump grafana-plugin-sdk-go version to v0.214.0

* make swagger-clean && make openapi3-gen
2024-03-11 16:49:53 +01:00
Todd Treece
49d3cb29eb Chore: Add go workspace (#83191)
---------

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
2024-02-23 08:54:24 -05:00
ismail simsek
916a7bbb08 Prometheus: Move converter in prometheus package (#82269)
* use jsoniter from sdk

* move converter into the prometheus

* remove jsonitere

* unit test

* remove redundant ownership
2024-02-15 15:09:30 +01:00
Ryan McKinley
3482c8ef09 Chore: Add omit wrapper for xorm (#82476) 2024-02-14 12:19:46 -08:00
ismail simsek
63670b7adc Chore: Use jsoniter in prometheus from grafana-plugin-sdk-go (#82359)
use jsoniter from grafana-plugin-sdk-go
2024-02-13 21:19:13 +01: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
Diego Augusto Molina
b02f0b926a Settings: Fix data race when dynamically overriding settings with environment variables (#81667)
Chore: Fix data race when dynamically overriding settings with environment variables
2024-02-05 12:25:54 -03:00
Kyle Brandt
1b155a02fd Prometheus: (Dataplane) Set FrameTypeVersion on Scalar type responses (#81491)
So expressions (SSE) and recorded queries (RQ) detect the response correctly
2024-01-29 11:39:23 -05:00
Ryan McKinley
c9ff6a9ab9 Chore: Generate shorter UIDs (#79843) 2024-01-24 11:27:46 -08:00
Sven Grossmann
e1aa8a95d9 Loki: Fix bug duplicating parsed labels across multiple log lines (#80292) 2024-01-11 15:09:13 +01:00
Will Browne
78ae795e06 Plugins: Fix loading of dist folders (#80015)
* end to end

* tidy

* fix whitespace

* remove unused code

* fix linter

* fix gosec + add sort

* fix test

* apply cr feedback
2024-01-08 11:45:03 +01:00
Serge Zaitsev
4f70586ead Chore: Remove mssql driver from xorm (#79930)
remove mssql driver from xorm
2024-01-02 17:11:35 +01:00