Commit Graph

26 Commits

Author SHA1 Message Date
Will Browne
5edd96ae77
Plugins: Refactor plugin config into separate env var and request scoped services (#83261)
* seperate services for env + req

* merge with main

* fix tests

* undo changes to golden file

* fix linter

* remove unused fields

* split out new config struct

* provide config

* undo go mod changes

* more renaming

* fix tests

* undo bra.toml changes

* update go.work.sum

* undo changes

* trigger

* apply PR feedback
2024-02-27 12:38:02 +01:00
Gábor Farkas
a62dccb0c0
plugins: add more configuration parameters to the plugin-config (#83060)
* envvars: add more configs

* made row-limit optional

* more consistent naming
2024-02-21 12:32:10 +02:00
Gábor Farkas
57499845c2
envvars: improve tests (#83071)
* envvars: improve tests

* removed commented-out code

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>

---------

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2024-02-20 09:41:11 +02:00
Isabella Siu
81da3ff753
CloudWatch: Remove dependencies on grafana/pkg/setting (#81208) 2024-02-05 13:59:32 -05:00
ismail simsek
2002a6c4fb
Chore: Bump grafana-azure-sdk-go to v1.12.0 and expose AzureAuthEnabled value in config (#81807)
* upgrade grafana-azure-sdk-go v1.12.0

* add AzureAuthEnabled to config
2024-02-05 13:36:33 +01:00
ismail simsek
536153c336
InfluxDB: Run queries in parallel behind influxdbRunQueriesInParallel feature toggle (#81209)
* create the feature flag

* bring the concurrency in to the play

* Update feature flag

* Use concurrency number from settings

* update influxdb dependency

* use ConcurrentQueryCount from plugin-sdk-go

* use helper method for concurrent query count

* log the error

* add value guard

* add unit tests

* handle concurrency error
2024-02-01 11:58:24 +01:00
Giuseppe Guerra
b40d3e7487
Plugins: Add enablePluginsTracingByDefault feature flag (#80195)
* Add enablePluginsTracingByDefault feature flag

* Enable tracing for all plugins if enablePluginsTracingByDefault is set

* fix docstrings for IsEnabled and IsEnabledGlobally

* fix tests

* do not use separate feature manager

* add test case

* Revert "fix tests"

This reverts commit 46a2420ed1.

* cleanup

* fix plugin tracing disabled if wrong plugin setting is present

* add test case for enabled on plugin with wrong plugin setting but with enablePluginsTracingByDefault feature flag

* Add RequiresRestart = true to enablePluginsTracingByDefault

* re-generate feature flags

* pr review feedback
2024-01-10 13:25:54 +02:00
Ryan McKinley
1caaa56de0
FeatureFlags: Use interface rather than manager (#80000) 2024-01-09 10:38:06 -08:00
Bruno
58678f5879
Plugins: Add option to disable TLS in the socks proxy (#79246)
* Plugins: add option to disable TLS in the socks proxy

* fix allow_insecure docs

* upgrade github.com/grafana/grafana-plugin-sdk-go from v0.196.0 to v0.197.0

* fix conflicts
2023-12-14 12:16:32 -03:00
Andreas Christou
f3cdb44898
Plugins: Include Azure settings as a part of Grafana config sent in plugin requests (#79342)
* Add Azure settings and update tests

* Filter by plugin ID

* Add forward settings config variable

* Update line

* Add tests

* Update so that data sources are fully defined in config

* Update SDK and test

* Fix lint

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

Co-authored-by: Andrew Hackmann <5140848+bossinc@users.noreply.github.com>

* Remove unnecessary if

---------

Co-authored-by: Andrew Hackmann <5140848+bossinc@users.noreply.github.com>
2023-12-14 11:48:22 +00:00
Gabriel MABILLE
5b70130e6c
Plugins: Rename externalServiceAuthentication to iam (#78686)
Plugins: Rename externalServiceAuthentication to iam
2023-12-04 13:14:21 +01:00
Giuseppe Guerra
027a157898
Plugins: Allow disabling "skip host environment variables" per-plugin (#78266)
* Plugins: Allow disabling skipping host environment variables per-plugin

* Renamed SkipEnvVarsDecorateFunc to SkipHostEnvVarsDecorateFunc

* PR review feedback

* fix tests
2023-11-17 16:12:05 +02:00
Giuseppe Guerra
cb0a88a027
Plugins: Backend: Skip host environment variables (#77858)
* Add pluginsSkipHostEnvVars feature flag

* Set go-plugin's SkipHostEnvVar depending on feature flags

* add missing file

* Re-generate feature flags

* Add allowedHostEnvVarNames

* Fix feature toggles not being passed to plugin context service's plugin env vars

* Fix tests

* PR review feedback: Use cfg.Features

* Fix tests

* PR review feedback: removed DefaultProviderWithFeatures

* merge with master

* fix tests

* use features.IsEnabledGlobally
2023-11-15 18:09:14 +01:00
Giuseppe Guerra
7b4bcc86f1
Plugins: Pass OTEL sampling config to plugins (#76834)
* Pass OTEL sampling config to plugins

* fix capital letters

* Do not pass sampler env vars if sampling is not configured

* Add tests

* PR review feedback

* Simplify tracing env vars logic

* Update test to reflect pkg/infra/tracing behaviour
2023-11-10 14:56:08 +01:00
Andres Martinez Gotor
00a596b2e0
Chore: Add app URL to the plugin config (#77455) 2023-11-02 13:26:16 +01:00
Gabriel MABILLE
797a3c57af
Plugins: Automatic service account (and token) setup (#76473)
* Update cue to have an AuthProvider entry

* Cable the new auth provider

* Add feature flag check to the accesscontrol service

* Fix test

* Change the structure of externalServiceRegistration (#76673)
2023-10-17 16:21:23 +02:00
Gabriel MABILLE
969e6a17ba
Plugins: Rename oauth package to auth (#75611)
* Plugins: Rename oauth package to auth

* Missed one comment
2023-09-28 12:18:09 +02:00
Will Browne
d6db9eaeb2
Plugins: Make sure feature toggles config value is deterministic (#75249)
* make sure feature toggle config vals are deterministic

* fix nil pointer

* undo changes

* fix condition

* add tests
2023-09-22 13:56:48 +02:00
Will Browne
7fca1bde54
Plugins: Set grafana config, plugin version and user agent on plugin requests (#75171)
* first pass

* fixup

* remove test line

* fix tests

* use new fields

* fix imports + formatting

* fix tests

* rollback changes

* undo whitespace

* apply pr feedback
2023-09-21 11:33:31 +02:00
Hugo Kiyodi Oshiro
c69dd41bf9
Plugins: Forward feature toggles to plugins (#72995) 2023-08-25 15:01:54 +02:00
Will Browne
c830c01e61
Plugins: Remove unnecessary error result from env vars interface (#73224)
* remove error from interface

* fix test
2023-08-14 14:17:54 +02:00
Sarah Zinger
deeb1d85f8
Config: making [aws][external_id] part of env (#72062)
* Config: making [aws][external_id] part of env

* Fix go.sum

* Add a test
2023-08-04 16:06:01 -04:00
Andres Martinez Gotor
025465e611
Chore: Update plugin schema with service registration info (#70692) 2023-06-27 08:47:25 +02:00
Andres Martinez Gotor
4ff0abd0d1
SaveExternalService (OAuth) on plugin load (#69764) 2023-06-26 16:38:43 +02:00
Will Browne
1fd4953833
Plugins: Optimize creation of Golang errors and slices (#69448)
* tidy up

* fix tests
2023-06-07 17:22:43 +02:00
Will Browne
ae373c662c
Plugins: Refactor env vars to dedicated service (#68960)
* add env vars service

* fix tests

* fix more tests
2023-05-24 14:02:14 +02:00