Commit Graph

858 Commits

Author SHA1 Message Date
Ashley Harrison
c16cc488c9
AdHocFilters: Add support for new isOneOf multi value operator (#91837)
* handle oneOf operator in prometheus

* use new supportsMultiValueOperators

* remap oneOf to regex in prometheus datasource

* Remap one of operators for scope filters

* use plugin.json property instead of feature toggle

* optional chaining

* fix unit tests

* use getInstanceSettings

* update to latest scenes

* fix unit tests

---------

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2024-08-30 11:03:44 +01:00
Andres Martinez Gotor
f9cd0fe5d1
Add debug headers when downloading plugins (#92579) 2024-08-29 11:30:21 +02:00
Andres Martinez Gotor
1b336e94c8
Chore: Check version compatibilty when installing a plugin (#92200) 2024-08-22 13:47:00 +02:00
Will Browne
aea8b60849
Plugins: Add support for fetching plugin includes from plugin CDN (#91476)
* update oss side

* add Rel func to plugins.FS

* update tests

* add comment

* fix fs paths for nested plugin

* fix test

* fix sources

* fix cdn class bug

* update tests

* remove commented out code
2024-08-21 09:46:41 +01:00
Todd Treece
a12b372556
Plugins: Update missed ConversionHandler checks (#92011) 2024-08-16 16:10:32 +03:00
Todd Treece
e60b0aef83
Plugins: Add support for ResourceConversion (#91977) 2024-08-15 16:02:21 -04:00
Andres Martinez Gotor
9067797eb4
Feature: Allow to install plugins through configuration (#91790) 2024-08-13 16:57:55 +02:00
Will Browne
9300c1bbea
Plugins: Update CLI check if plugin is already installed (#91213)
* check if plugin installed

* undo remove initial vers check

* still attempt deps
2024-08-06 09:21:40 +01:00
Will Browne
fa49fe3331
Plugins: Use bundle instead of individual plugin during construct step (#91140)
* work off bundle instead of individual plugin

* Remove children

Co-authored-by: Giuseppe Guerra <giuseppe.guerra@grafana.com>

* Remove children ref

Co-authored-by: Giuseppe Guerra <giuseppe.guerra@grafana.com>

* fix assign

* end early

* unset children

---------

Co-authored-by: Giuseppe Guerra <giuseppe.guerra@grafana.com>
2024-07-30 11:24:37 +01:00
Gabriel MABILLE
b982259950
RBAC: Default to plugins.app:access for plugin includes (#90969)
* Default to app access for includes

* Check plugin type
2024-07-29 20:56:09 +02:00
Sven Grossmann
80b2e793ab
Loki: Remove unnecessary featuremgmt (#90874)
Loki: Remove unnecessary featuremgmt
2024-07-24 11:00:41 +02:00
Ieva
4c7d8c8cdd
RBAC: Refactor RBAC plugin interface code (#90679)
move plugin RBAC registration ifaces to pluginsintegrations
2024-07-22 09:31:36 +01:00
Eric Leijonmarck
248af65f9c
Actionsets: Add ability for plugins to add actions for core actionsets (i.e. folders:edit) (#88776)
* initial commit

* Action sets stored
remove the dependancy for actionsets
got the actionsets registered
storing the permissions

* fix golanglinting

* remove unused struct field

* wip

* actionset registry for a plugin from the actionsetservice

* update to make declareactionset the primary way of plugin registration and modification

* declare actually extends actionsets

* tests fixed

* tests skipped

* skip tests

* skip tests

* skip tests

* skip tests

* change to warning instead

* remove step from pipeline to see if it fails due to plugin not registering

* reintroduce step but remove features dependancy

* add back the tests that were failing

* remove comments and another skip test

* fix a comment and remove unneeded changes

* fix and clean up, put the behaviour behind a feature toggle

* clean up

* fixing tests

* hard-code allowed action sets for plugins

* Apply suggestions from code review

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

* small cleanup

---------

Co-authored-by: IevaVasiljeva <ieva.vasiljeva@grafana.com>
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2024-07-19 16:16:23 +01:00
Nathan Vērzemnieks
f8c43d0bf3
Elasticsearch: Decouple backend from infra/tracing (#90528) 2024-07-19 09:26:10 +02:00
Hugo Kiyodi Oshiro
5c966fd400
Plugins: Add logs to for plugin management actions (#90587)
* Plugins: Add logs to for plugin management actions

---------

Co-authored-by: Giuseppe Guerra <giuseppe.guerra@grafana.com>
2024-07-18 17:19:36 +02:00
Ryan McKinley
2bb66209ca
Chore: make protobuf (#90282) 2024-07-10 19:19:21 +03:00
Will Browne
343d6f8a0c
Plugins: Support > 1 levels of plugin dependencies (#90174)
* do it

* prevent loops

* change to sync.Map
2024-07-09 15:46:30 +01:00
Marcus Efraimsson
c8af659f02
Plugins: Enhanced plugin instrumentation (#90199)
* Plugins: Enhanced plugin instrumentation

* use backend.CallResourceResponseSenderFunc

* sdk v0.237.0

* support admission control

* cover all handlers in log and metrics middlewares

* fix after review
2024-07-09 15:03:46 +02:00
Andres Martinez Gotor
be98ab1111
Add apiVersion to datasource settings DTO (#90057) 2024-07-04 16:44:19 +02:00
Andres Martinez Gotor
a22c1ae424
Chore: Remove provisional APIVersion from plugin info (#89831) 2024-07-01 10:53:16 +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
Kevin Minehart
a250706305
CI: Make pkg/build its own module, remove unused Grafana modules in go.mo… (#89243)
* Make pkg/build its own module, remove unused Grafana modules in go.mod/go.sum

* fix go.work format

* log errors on file close errors
2024-06-14 19:35:30 +03:00
Ryan McKinley
99d8025829
Chore: Move identity and errutil to apimachinery module (#89116) 2024-06-13 07:11:35 +03:00
David Harris
60bec80672
Cloudwatch: add keywords (#88855)
---------

Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
2024-06-10 08:11:47 -04:00
Jack Westbrook
036c878843
Plugins: Improve frontend loader cache (#87488)
* do it

* set empty child version to parent version

* feat(plugins): use pluginId for loader cache keys

* feat(plugins): apply caching to all js and css files systemjs loads

* remove old code and add comment

* test(plugins): update systemjs hooks tests in line with better caching

* test(plugins): wip - comment out failing backend loader tests

* fix tests and improve comment

* Update public/app/features/plugins/loader/cache.test.ts

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>

---------

Co-authored-by: Will Browne <will.browne@grafana.com>
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2024-06-07 10:03:41 +02:00
Dave Henderson
e21d357d67
chore: Updating linter, fixing some new warnings (#88863) 2024-06-06 13:01:27 -04:00
Timur Olzhabayev
1909ad6fa8
Chore: Removing editor.html from angular patterns (#88845)
Removing editor.html from angular patterns
2024-06-06 16:12:51 +03:00
Ryan McKinley
ffc2702552
Plugins: Support Admission validation hooks (#87718) 2024-05-24 18:45:16 +03:00
Aaron Godin
0072e4a92d
Update DS Proxy to use RBAC action (#87517)
iam-team: Update DS Proxy to use RBAC action
2024-05-21 08:05:16 -05:00
Andres Martinez Gotor
d8904f3ca4
Add apiVersion to plugin models (#87510) 2024-05-14 13:58:27 +02:00
Marcus Efraimsson
41b29ff93c
Chore: Migrate to use buf for protobuf generation (#87407)
* Chore: Migrate to use buf for protobuf generation

* fix codeowners

* fixes after review

* docs/tooling for installing buf

* add back codeowners

* Update upgrading-dependencies.md

Co-authored-by: Giuseppe Guerra <giuseppe.guerra@grafana.com>

* sdk v0.229.0

---------

Co-authored-by: Giuseppe Guerra <giuseppe.guerra@grafana.com>
2024-05-08 15:42:40 +02:00
Aaron Godin
0bc8992dfa
Revert #86466 (#87405)
Revert "Apply plugin route ReqAction to ds_proxy authorization (#86466)"

This reverts commit 53f94ac50d.
2024-05-06 14:40:32 -05:00
owensmallwood
40558899e4
Unified Storage: Adds health check service for entity server (#86471) 2024-05-01 11:36:44 -06:00
Aaron Godin
53f94ac50d
Apply plugin route ReqAction to ds_proxy authorization (#86466)
* Apply plugin route ReqAction to ds_proxy authorization

Co-authored-by: Eric Leijonmarck <eleijonmarck@users.noreply.github.com>

* fix: move ds_proxy route Evaluator out of plugins pkg

* move DataSourceProxy route authorization to method

---------

Co-authored-by: Eric Leijonmarck <eleijonmarck@users.noreply.github.com>
2024-04-30 09:19:34 -05:00
Arati R
ec6f59a678
Chore: Update protoc-gen-go (#87116)
Update protoc-gen-go
2024-04-30 12:14:33 +02:00
Hugo Kiyodi Oshiro
7783b16e47
Plugins: Make grafana-com API URL usage consistent (#86920)
Plugins: Fix grafana-com API URL usage
2024-04-26 16:47:38 +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
Marcus Efraimsson
ac152ca416
Chore: Upgrade grpc-ecosystem/go-grpc-middleware to v2 (#86724)
* Chore: Replace deprecated prometheus grpc middleware

* go mod tidy without enterprise

* with updated sdk branch

* sdk v0.226.0

* remove deprecated opentracing support for outgoing plugin requests

* migrate to github.com/grpc-ecosystem/go-grpc-middleware/v2

* fix
2024-04-25 17:25:48 +02:00
Timur Olzhabayev
ed89354eaa
Chore: Adding debug logging to signature checks (#86915)
Adding debug logging to signature checks
2024-04-25 11:53:10 +01:00
Andres Martinez Gotor
eac02a61e1
Return plugin error when requesting settings (#86052) 2024-04-18 14:29:02 +02:00
Andres Martinez Gotor
0f4a47b180
Plugin load errors: Add more well-known errors (#85960) 2024-04-18 13:04:22 +02:00
Will Browne
dceb83ab42
Plugins: Expose backendplugin for client proto interface (#86207)
* first pass

* tidy

* add err check

* remove comment

* simplify

* remove unused stuff

* add backend()

* use SDK commit

* add codeowners for go.mod

* fix go.mod

* bump SDK

* go work sync
2024-04-17 18:47:01 +02:00
Andres Martinez Gotor
ab5a065256
Revamp plugin loading error management (#85939) 2024-04-11 16:18:04 +02:00
Andres Martinez Gotor
f375af793f
Plugin loader: refactor step evaluation (#85881) 2024-04-11 09:41:05 +02:00
Marcus Efraimsson
8f12fb94f9
Plugins: Factory for instantiating core plugin (#85047) 2024-03-25 15:41:26 +01:00
Selene
473898e47c
Core: Remove thema and kindsys dependencies (#84499)
* Move some thema code inside grafana

* Use new codegen instead of thema for core kinds

* Replace TS generator

* Use new generator for go types

* Remove thema from oapi generator

* Remove thema from generators

* Don't use kindsys/thema for core kinds

* Remove kindsys/thema from plugins

* Remove last thema related

* Remove most of cuectx and move utils_ts into codegen. It also deletes wire dependency

* Merge plugins generators

* Delete thema dependency 🎉

* Fix CODEOWNERS

* Fix package name

* Fix TS output names

* More path fixes

* Fix mod codeowners

* Use original plugin's name

* Remove kindsys dependency 🎉

* Modify oapi schema and create an apply function to fix elasticsearch errors

* cue.mod was deleted by mistake

* Fix TS panels

* sort imports

* Fixing elasticsearch output

* Downgrade oapi-codegen library

* Update output ts files

* More fixes

* Restore old elasticsearch generated file and skip its generation. Remove core imports into plugins

* More lint fixes

* Add codeowners

* restore embed.go file

* Fix embed.go
2024-03-21 11:11:29 +01:00
Andres Martinez Gotor
abb8ba3885
Update comment in service.go (#84674) 2024-03-19 09:09:07 +01:00
Will Browne
9d453d0dcc
Plugins: Remove direct featuremgmt.FeatureToggles dependency from plugins config (#84482) 2024-03-15 10:58:51 +01:00
Gilles De Mey
8765c48389
Alerting: Remove legacy alerting (#83671)
Removes legacy alerting, so long and thanks for all the fish! 🐟

---------

Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
Co-authored-by: Sonia Aguilar <soniaAguilarPeiron@users.noreply.github.com>
Co-authored-by: Armand Grillet <armandgrillet@users.noreply.github.com>
Co-authored-by: William Wernert <rwwiv@users.noreply.github.com>
Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
2024-03-14 15:36:35 +01:00
Selene
5c7849417b
Schemas: Replace registry generation and github workflow (#83490)
* Create small registries for core and composable kinds

* Update workflow with new registries

* Fix imports in plugin schemas and deleted old registry generation files

* Remove verification and maturity

* Modify registries and add missing composable information to make schemas in kind-registry work

* Add missing aliases

* Remove unused templates

* Remove kinds verification

* Format generated code

* Add gen header

* Delete unused code and clean path in composable template

* Delete kind-registry loader

* Delete unused code

* Update License link

* Update codeowners path

* Sort imports

* More cleanup

* Remove verify-kinds.yml from codeowners

* Fix lint

* Update composable_kidns

* Fix cue extension

* Restore verify-kinds to avoid to push outdated kind's registry

* Fix composable format

* Restore code owners for verify-kinds

* Remove verify check
2024-03-13 18:05:21 +02:00