Commit Graph

12897 Commits

Author SHA1 Message Date
Josh Hunt
f2628bfad4
Whitelabelling: Override version in UI from config (#84392)
* Unify how the version is shown in the UI

* use versionString in dashboard help bundles

* fix lint

* remove comment

* fix test types

* make test less flakey
2024-03-15 18:39:13 +02:00
Karl Persson
d4e802dd47
Authn: Add function to resolve identity from org and namespace id (#84555)
* Add function to get the namespaced id

* Add function to resolve an identity through authn.Service from org and namespace id

* Switch to resolve identity for re-authenticate in another org
2024-03-15 15:08:15 +01:00
Eric Leijonmarck
6c8895e349
Service accounts: Same Org fix migration to account for duplicate entries (#84349)
* bug: fix migration to account for duplicate entries

* refactoring to create test folder for user migrations

* fix migration log

* added the migration

* additional tests

* added extSrv tests
2024-03-15 15:00:25 +01:00
Isabella Siu
a0b68deae4
Cloudwatch: Remove cloudWatchWildCardDimensionValues feature toggle (#84329) 2024-03-15 09:49:53 -04:00
ismail simsek
eae9bfe4bc
Chore: Promlib allows extendOptions to be nil (#84463)
* use logger from service

* allow extendOptions to be nil

* Update logger
2024-03-15 13:37:29 +01:00
Sofia Papagiannaki
1208888bb6
Folders: Allow listing folders with write permission (#83527)
* Folders: Allow listing folders with write permission

* Check for subfolder access if parent does not have

* Add test

* GetFolders: fix ordering

* Apply suggestion from code review
2024-03-15 14:05:27 +02:00
Will Browne
9d453d0dcc
Plugins: Remove direct featuremgmt.FeatureToggles dependency from plugins config (#84482) 2024-03-15 10:58:51 +01:00
Karl Persson
ebf455d107
RBAC: Don't refetch permissions when searching for users in authenticated org (#84546)
Don't refetch permissions when searching for users in authenticated org
2024-03-15 10:36:16 +01:00
Charandas
759cefd94c
ExtSvcAccounts: FIX tests that accidently depended on enterprise (#84535)
* ExtSvcAccounts: FIX tests that accidently depended on enterprise

* fix
2024-03-15 08:18:11 +01:00
Charandas
34b5303daf
K8s: file-storage: provide empty for resourceVersion initially (#84523) 2024-03-14 16:33:41 -07:00
Dan Cech
0fa0cede75
Storage: streamline context handling (#84319)
streamline context handling
2024-03-14 17:12:20 -04:00
Gabriel MABILLE
2795f9827a
ExtSvcAccounts: FIX prevent service account deletion (#84502)
* ExtSvcAccounts: Fix External Service Accounts Login check

Co-authored-by: Karl Persson <kalle.persson@grafana.com>

* Remove service accounts assignments and permissions on delete

* Fix first set of tests

* Fix second batch of tests

* Fix third batch of tests

---------

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2024-03-14 19:11:02 +01:00
Yuri Tseretyan
827860d459
Alerting: Alerting accesscontrol utilities (#84508)
* create fake for accesscontrol.RuleService
* make errAuthorizationGeneric public
2024-03-14 14:03:53 -04:00
Yuri Tseretyan
f7d836feed
Alerting: Update rule provisioning service to accept user (#84480) 2024-03-14 12:04:10 -04:00
Gilles De Mey
fe15bb5f48
Alerting: Update composable_kind.go (#84479)
update composable_kind.go
2024-03-14 17:20:23 +02:00
Alexander Zobnin
f36ad469d0
Access Control: Get global role from request params (#84469) 2024-03-14 16:17:24 +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
Gilles De Mey
336acaf0bf
Alerting: Promote new alerting detail view (#84277) 2024-03-14 15:18:01 +01:00
William Wernert
8690a42e33
Alerting: Disallow invalid rule namespace UIDs in provisioning API (#83938)
* Disallow invalid rule namespace UIDs in provisioning

Reject requests with rules that reference a nonexistent folder or have an empty folder uid
2024-03-14 09:58:25 -04:00
Timur Olzhabayev
8e90e02db2
Chore: Adding log also for cases where datasource UID length is invalid (#84443)
* Adding log also for datasource length
2024-03-14 14:49:07 +01:00
Karl Persson
8d9521fb6d
Refactor: Email verification (#84393)
* Update template names

* Add verifier that we can use to start verify process

* Use userVerifier when verifying email on update

* Add tests
---------

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2024-03-14 13:25:28 +01:00
Gábor Farkas
97521ef988
postgres: improve snapshot-tests for long/wide situations (#84387) 2024-03-14 12:37:04 +01:00
linoman
831ee9ee16
samlsettings: add sso settings saml feature flag (#84433)
* add feature flag for ssosettings saml configuration

* add generated files
2024-03-14 12:04:45 +01:00
Andreas Christou
391d14d091
Chore: Bump update checker interval to 1 day (#84404)
* Bump interval to 1hr

* 2 hours is better than 1

* Bump further to 1 day
2024-03-14 13:00:26 +02:00
Charandas
b6a020148b
K8s: disallow MT storage functionality for Aggregator builders (#84408) 2024-03-14 01:54:30 +02:00
Sven Grossmann
34f9bff9e0
Loki: Fix null pointer exception in case request returned an error (#84398)
Loki: Fix nullpointer in case query returned an error
2024-03-13 18:14:21 +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
Alexander Zobnin
fd9031ca37
Access Control: Get org from request data for authorization (#84359)
* Access Control: Get org from request data for authorization

* move type to models

* Update pkg/services/accesscontrol/middleware.go

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>

* refactor

* refactor

* Fix linter

---------

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2024-03-13 17:05:03 +01:00
Gábor Farkas
eca1bba01e
postgres: add more tests (to handle zero-rows queries) (#84384) 2024-03-13 16:23:50 +01:00
Joey
1f2e9a544d
Tempo: Remove Loki tab (#84346)
* Update docs

* Remove loki tab from config settings

* Remove loki query field

* Remove loki search from ds, resultTransformer, tracking and tests

* Cleanup removal of loki search

* Remove loki section from query editor docs

* Remove search type
2024-03-13 14:22:20 +00:00
Georges Chaudy
06b7f6befa
k8s: ensure unified storage address is populated from config ini (#84373)
fix: ensure unified storage address is populated from config ini
2024-03-13 15:17:26 +01:00
Misi
f5c78e0ad9
RBAC: Add ActionSettingsRead action to general.auth.config writer (#84366)
Add ActionSettingsRead action to general.auth.config writer
2024-03-13 14:48:13 +01: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
Selene
75ea33e0cd
Schemas: Delete unused code from the previous refactors (#84254)
* Delete unused code from the previous refactors

* Sort imports
2024-03-13 12:30:05 +01:00
Ivana Huckova
2a1a5145d0
Elasticsearch: Fix using of individual query time ranges when querying (#84201)
* WIP - proof of concept

* Update pkg/tsdb/elasticsearch/client/client.go

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>

* update and add test

* lint

* Fix lint

* Bring back logging when creating client

---------

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
2024-03-13 12:49:35 +02:00
Timur Olzhabayev
c6140b9893
Docs: Aligning fallback values with documentation (#83617)
aligning fallback values with documentation
2024-03-13 11:19:04 +02:00
Andres Martinez Gotor
c061cc33cc
Chore: Use response limit middleware from SDK (#83915) 2024-03-13 10:14:16 +01:00
Gábor Farkas
ecd6de826a
Postgres: Switch the datasource plugin from lib/pq to pgx (#83768)
postgres: switch from lib/pq to pgx
2024-03-13 09:52:39 +01:00
Mihai Doarna
2acd48d1c2
SSO: fix mergeSettings() in case the DB contains empty URLs (#84290)
* fix mergeSettings() in case the db contains empty strings

* use correct github urls in test

* overwrite only urls

* update comment for mergeSettings()
2024-03-13 10:31:17 +02:00
linoman
66fa310fba
SAMLSettings: implement settings strategy (#84191)
* add strategy and tests

* use settings provider service and remove multiple providers strategy

* update codeowners file

* reload from settings provider
2024-03-13 09:14:42 +01:00
Sarah Zinger
3f5526b915
Cloudwatch: Fix issue with Grafana Assume Role (#84315) 2024-03-12 16:30:54 -04:00
Charandas
0eee72824c
K8s: omit CABundle until insecure is false (#84323) 2024-03-12 21:58:02 +02:00
Yuri Tseretyan
cfc3957894
Alerting: move store.ErrAlertRuleGroupNotFound to models package (#84308)
move ErrAlertRuleGroupNotFound to models to avoid future circular dependencies
2024-03-12 15:38:21 -04:00
Andres Martinez Gotor
265200799d
Chore: Update grafana-plugin-sdk (#84289) 2024-03-12 17:13:23 +01:00
ismail simsek
22860a7978
Chore: Use mapUtil from grafana-plugin-sdk-go (#84297)
use mapUtil from grafana-plugin-sdk-go
2024-03-12 10:08:10 -05:00
Matias Chomicki
fb172b1b33
Explore logs: remove exploreScrollableLogsContainer and track scroll to top (#84291)
* exploreScrollableLogsContainer: remove

* LogsNavigation: track scroll to top clicks

* Add missing dependency to the effect
2024-03-12 15:53:13 +01:00
Leonard Gram
f15aa2d30d
CloudMigrations: draft of cloud migration tables (#83990)
* CloudMigrations: draft of cloud migration tables

* naming migration rules

* removes feature flag for migration

* tweaked db types

* removed comment
2024-03-12 15:44:10 +01:00
Michael Mandrus
d69b19e431
Queries: Improve debug logging of metrics queries (#84048)
* just log everything

* fix times
2024-03-12 16:17:22 +02:00
Joey
42d8f1bef9
Tempo: Update TraceQLStreaming feature toggle stage (#84203)
Update TraceQLStreaming feature toggle stage
2024-03-12 14:10:13 +00:00
William Wernert
10dc6c6d75
Alerting: Add "Keep Last State" backend functionality (#83940)
* Implement keep last state for state transitions

* Respect For duration when keeping state

* Only keep transition from recording an annotation

* Add keep last state option for nodata/error in UI
2024-03-12 10:00:43 -04:00
ismail simsek
ae70cd953d
Chore: Use the promlib v0.0.1 (#84210)
* use the promlib v0.0.1

* add a readme

* go mod update

* replace promlib

* update readme

* update

* update go work sum

* update 2

* update readme
2024-03-12 15:25:32 +02:00
Josh Michielsen
297d73a7df
InfluxDB: Add configuration option for enabling insecure gRPC connections (#83834)
* InfluxDB: add configuration option for enabling insecure gRPC connections

* fix: add insecureGrpc to InfluxOptions

* rename options label 'gRPC' -> 'Connection'

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>

* update docs: rename options label 'gRPC' -> 'Connection'

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>

* default insecure connection boolean to false in frontend

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>

* run prettier:write

---------

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
2024-03-12 13:36:11 +01:00
Sofia Papagiannaki
22d8258e48
Postgres: Allow disabling SNI on SSL-enabled connections (#83892)
* Postgres: Allow disabling SNI on SSL-enabled connections

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

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

---------

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2024-03-12 12:03:24 +02:00
Adam Yeats
c2b94429e4
Google Cloud Monitor: Fix res being accessed after it becomes nil in promql_query.go (#84223)
Fix res being accessed after it becomes nil in promql_query.go
2024-03-12 10:38:16 +01:00
Misi
63f1c30313
Auth: Set the default org after User login (#83918)
* poc

* add logger, skip hook when user is not assigned to default org

* Add tests, move to hook folder

* docs

* Skip for OrgId < 1

* Address feedback

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

* lint

* Move the hook to org_sync.go

* Update pkg/services/authn/authnimpl/sync/org_sync.go

* Handle the case when GetUserOrgList returns error

---------

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2024-03-12 09:35:13 +01:00
Karl Persson
6ea9f0c447
AuthN: Use fetch user sync hook for render keys connected to a user (#84080)
* Use fetch user sync hook for render keys connected to a user
2024-03-12 09:15:14 +01:00
Charandas
da327ce807
K8s: enable insecure to skip server cert validation for now (#84038) 2024-03-12 01:13:14 +02:00
Alexander Weaver
6c5e94095d
Alerting: Scheduler and registry handle rules by an interface (#84044)
* export Evaluation

* Export Evaluation

* Export RuleVersionAndPauseStatus

* export Eval, create interface

* Export update and add to interface

* Export Stop and Run and add to interface

* Registry and scheduler use rule by interface and not concrete type

* Update factory to use interface, update tests to work over public API rather than writing to channels directly

* Rename map in registry

* Rename getOrCreateInfo to not reference a specific implementation

* Genericize alertRuleInfoRegistry into ruleRegistry

* Rename alertRuleInfo to alertRule

* Comments on interface

* Update pkg/services/ngalert/schedule/schedule.go

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>

---------

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2024-03-11 22:57:38 +02:00
Dan Cech
1ffd1cc8f4
Storage: Support listing deleted entities (#84043)
* support listing deleted entities

* fold listDeleted into List
2024-03-11 13:59:54 -04:00
ismail simsek
3fb6319d1b
Prometheus: Introduce prometheus backend library (#83952)
* Move files to prometheus-library

* refactor core prometheus to use prometheus-library

* modify client transport options

* mock

* have a type

* import aliases

* rename

* call the right method

* remove unrelated test from the library

* update codeowners

* go work sync

* update go.work.sum

* make swagger-clean && make openapi3-gen

* add promlib to makefile

* remove clilogger

* Export the function

* update unit test

* add prometheus_test.go

* fix mock type

* use mapUtil from grafana-plugin-sdk-go
2024-03-11 17:22:33 +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
Will Browne
225ac8003c
Plugins: Tidy config struct (#84168)
* tidy plugins config usage

* fix tests
2024-03-11 16:28:46 +01:00
Karl Persson
9c292d2c3f
AuthN: Use sync hook to fetch service account (#84078)
* Use sync hook to fetch service account
2024-03-11 15:56:53 +01:00
Jo
108202f96c
UsageStats: Separate context and threads for usage stats (#83963)
* separate context and threads for usage stats

* use constants

* ignore original context

* fix runMetricsFunc

* fix collector registration

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

* change background ctx

* fix test randomness

* Add traces to support bundle collector

* Remove unecessay span

* Add trace to usagestats api

* Close spans

* Mv trace to bundle

* Change span name

* use parent context

* fix runtime declare of stats

* Fix pointer dereference problem on usage stat func

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
Co-authored-by: jguer <joao.guerreiro@grafana.com>

* fix broken support bundle tests by tracer

---------

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
Co-authored-by: gamab <gabriel.mabille@grafana.com>
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2024-03-11 15:18:42 +01:00
Karl Persson
0b55d72fb5
FeatureToggles: Add feature toggle for sso email verification (#84184)
* FeatureToggles: Add feature toggle for sso email verification

* Rename toggle

* Fix json
2024-03-11 15:09:44 +01:00
carrychair
0913324668
Chore: Remove repetitive words (#84132)
remove repetitive words

Signed-off-by: carrychair <linghuchong404@gmail.com>
2024-03-11 08:55:18 -04:00
Josh Hunt
1ab8857e48
E2C: Add cloud migration is_target server config option (#83419) 2024-03-11 14:29:44 +02:00
Selene
275ccf994b
Schemas: Reduce duplicated jenny code (#84061)
* Remove jenny_ts_resources and use jenny_ts_types for all cases

* Unify TS generated files into one jenny

* Add missing imports to versioned files

* Update Parca plugin

* Fix loki

* Use LokiQuery

* Fix pyroscope tests

* Fix prettier

* 😒 fix default pyroscope value name

* Set the LokiQuery

* Update Elasticsearch and TestData

* Missed files from testdata

* Order imports
2024-03-11 12:51:44 +01:00
Leonard Gram
5a123bda80
CloudMigration: wires the service (#84081) 2024-03-11 12:40:26 +01:00
Georges Chaudy
15e358e3b9
k8s: add support for configuring the gRPC server address (#84006)
* k8s: add support for configuring the gRPC server address
2024-03-11 11:23:03 +02:00
Andreas Christou
07676ab8a0
Prometheus: Add missing Azure setting (#84094) 2024-03-11 08:57:42 +00:00
Ryan McKinley
d82f3be6f7
QueryService: Use types from sdk (#84029) 2024-03-08 18:12:59 +02:00
Yuri Tseretyan
21719a6b5b
Chore: Fix log message in access control (#84101) 2024-03-07 23:34:22 +02:00
Yuri Tseretyan
7147af6b8e
Alerting: Disable legacy alerting for ever (#83651)
* hard disable for legacy alerting
* remove alerting section from configuration file 
* update documentation to not refer to deleted section
* remove AlertingEnabled from usage in UA setting parsing
2024-03-07 16:01:11 -05:00
Selene
1181141b40
Schemas: Refactor plugin's metadata (#83696)
* Remove kinds verification for kind-registry

* Read plugin's json information with json library instead of use thema binding

* Remove grafanaplugin unification

* Don't use kindsys for extract the slot name

* Fix IsGroup

* Remove all plugindef generation

* Refactor schema interfaces

* Pushed this change from a different branch by mistake...

* Create small plugin definition structure adding additional information for plugins registration

* Add some validation checks

* Delete unused code

* Fix imports lint
2024-03-07 11:09:19 +01:00
Mihai Doarna
beea7d1c2b
Auth: use the scope parameter instead of a hardcoded value in appendUniqueScope() (#84053)
use the scope parameter instead of a hardcoded value
2024-03-07 12:08:58 +02:00
Sofia Papagiannaki
b8d8662bd9
Swagger: Re-generate the enterprise specification if enterprise is cloned (#81730)
* Swagger: Re-generate the enterprise specification if enterprise is cloned successfully

* API change to trigger the swagger CI step execution

* Swagger: Silence logs
2024-03-07 12:07:35 +02:00
Mihai Doarna
e3314f04e4
Auth: perform read locking on every exported func from social providers (#83960)
perform read locking on every exported func from social providers
2024-03-07 10:32:55 +02:00
linoman
8e827afb8c
Password Policy: Validate strong password upon update (#83959)
* add drawer for auth settings

* add StrongPasswordField component

* Add style to different behaviours

* update style for component

* add componenet to ChangePasswordForm

* pass the event handlers to the child component

* add style for label container

* expose strong password policy config option to front end

* enforce password validation with config option
2024-03-07 01:56:48 -06:00
Alexander Weaver
201f5d3ac9
Alerting: Extract large closures in ruleRoutine (#84035)
* extract notify

* extract resetState

* move evaluate metrics inside evaluate

* split out evaluate
2024-03-06 16:39:23 -06:00
Alexander Weaver
7a171fd14a
Regenerate openapidocs at 1.21.8 to match ci (#84037)
* Regenerate openapidocs at 1.21.8 to match ci

* Adjust trigger to work on the actual outputted files

* Also put go.mod and go.sum in the triggers

* manually fix

* Make an arbitrary change rather than touching the trigger to force a run

* Drop all triggers - run all the time

* Print diff - taken from @papagian's PR

* Manual fixes to swagger doc

---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2024-03-06 16:08:45 -06:00
gotjosh
948c8c45d6
Alerting: Use Alertmanager types extracted into grafana/alerting (#83824)
* Alerting: Use Alertmanager types extracted into grafana/alerting

We're in the process of exporting all Alertmanager types into grafana/alerting so that they can be imported in the Mimir Alertmanager, without a neeed to import Grafana directly.

This change introduces type aliasing for all Alertmanager types based on their 1:1 copy that now live in grafana/alerting.

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

Signed-off-by: gotjosh <josue.abreu@gmail.com>
2024-03-06 20:48:32 +00:00
Alexander Weaver
d5fda06147
Alerting: Decouple rule routine from scheduler (#84018)
* create rule factory for more complicated dep injection into rules

* Rules get direct access to metrics, logs, traces utilities, use factory in tests

* Use clock internal to rule

* Use sender, statemanager, evalfactory directly

* evalApplied and stopApplied

* use schedulableAlertRules behind interface

* loaded metrics reader

* 3 relevant config options

* Drop unused scheduler parameter

* Rename ruleRoutine to run

* Update READMED

* Handle long parameter lists

* remove dead branch
2024-03-06 13:44:53 -06:00
Josh Hunt
6a4e0c692a
Page: Use browser native scrollbars for the main page content (#82919)
* remove custom scroll bars from Page component

* make flagged scroller the actual scrolling element,

* enable feature flag by default

* re-enable the scroll props in Page

* rename feature toggle

* fix css

* only update when deleted

* set .scrollbar-view on our scrolling wrapper

---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2024-03-06 15:06:47 +00:00
Ieva
2c5b72e844
AuthZ: add headers for IP range AC checks for data source proxy requests (#81662)
* add a middleware that appens headers for IP range AC to data source proxy requests

* update code

* add tests

* fix a mistake

* add logging

* refactor to reuse code

* small cleanup

* skip the plugins middleware if the header is already set

* skip the plugins middleware if the header is already set
2024-03-06 12:40:48 +00:00
Eric Leijonmarck
e611a736ed
Serviceaccounts: Add ability to add samename SA for different orgs (#83893)
* add ability to add samename SA for different orgs

* Update pkg/services/user/userimpl/user.go

* fix tests

* refactor name

* removed tests

* add migration

* fix linting
2024-03-06 09:53:58 +01:00
Dan Cech
7e4badff1d
Storage: Use our own key format and support unnamespaced objects (#83929)
* use our own key format and support unnamespaced objects

* fix tests
2024-03-05 16:31:39 -05:00
Ryan McKinley
3e86a4edc8
PanelTitleSearch: Show datasource usage in plugins (#83922) 2024-03-05 22:20:38 +02:00
Charandas
e916372249
K8s: bug fixes for file storage to allow for watcher initialization on startup (#83873)
---------

Co-authored-by: Todd Treece <todd.treece@grafana.com>
2024-03-05 10:34:47 -08:00
Dan Cech
9fa9eaab44
Storage: Support get with resourceversion (#83849)
support getting old resourceversion, return explicit resource version in list
2024-03-05 10:57:32 -05:00
Carl Bergquist
b3efb4217e
Cfg: Adds experimental scope grafana.ini settings (#83174)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
2024-03-05 16:41:19 +01:00
Dan Cech
7b4925ea37
Storage: Watch support (#82282)
* initial naive implementation

* Update pkg/services/store/entity/sqlstash/sql_storage_server.go

Co-authored-by: Igor Suleymanov <radiohead@users.noreply.github.com>

* tidy up

* add action column, batch watch events

* initial implementation of broadcast-based watcher

* fix up watch init

* remove batching, it just adds needless complexity

* use StreamWatcher

* make broadcaster generic

* add circular buffer to replay recent events to new watchers

* loop within poll until all events are read

* add index on entity_history.resource_version to support poller

* increment r.Since when we send events to consumer

* switch broadcaster and cache to use channels instead of mutexes

* cleanup

---------

Co-authored-by: Igor Suleymanov <radiohead@users.noreply.github.com>
2024-03-05 10:14:38 -05:00
ismail simsek
2cce9aa2f7
Chore: Move tracing function in influxdb package (#83899)
move tracing function in influxdb package
2024-03-05 07:34:08 -06:00
Michael Mandrus
73c4b24a52
Queries: Fix debug logging of metrics queries (#83877)
fix log statements
2024-03-05 08:27:44 -05:00
Ivan Ortega Alba
a7c06d26f1
Dashboards: Add new toggle for dashboard changes out of dashgpt toggle (#83897) 2024-03-05 14:01:31 +02:00
Karl Persson
22074c5026
RBAC: add debug log for permission evaluation (#83880)
* fix: add debug log when evaluating permissions that includes target permissions
2024-03-05 08:50:19 +01:00
Alexander Weaver
1bb38e8f95
Alerting: Move ruleRoutine to be a method on ruleInfo (#83866)
* Move ruleRoutine to ruleInfo file

* Move tests as well

* swap ruleInfo and scheduler parameters on ruleRoutine

* Fix linter complaint, receiver name
2024-03-04 17:15:55 -06:00
Alexander Weaver
f2a9d0a89d
Alerting: Refactor ruleRoutine to take an entire ruleInfo instance (#83858)
* Make stop a real method

* ruleRoutine takes a ruleInfo reference directly rather than pieces of it

* Fix whitespace
2024-03-04 15:15:01 -06:00
Ryan McKinley
5aa965b9e9
Prometheus: remove cue definition (#83808)
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
2024-03-04 10:23:32 -08:00
Matthew Jacobson
2e8c514cfd
Alerting: Stop persisting user-defined templates to disk (#83456)
Updates Grafana Alertmanager to work with new interface from grafana/alerting#161. This change stops passing user-defined templates to the Grafana Alertmanager by persisting them to disk and instead passes them by string.
2024-03-04 20:12:49 +02:00
Alexander Weaver
fa51724bc6
Alerting: Move alertRuleInfo and tests to new files (#83854)
Move ruleinfo and tests to new files
2024-03-04 11:24:49 -06:00
Ryan McKinley
3036b50df3
Expressions: expose ConvertDataFramesToResults (#83805) 2024-03-04 18:22:56 +02:00
Will Browne
c644826f50
Query: Add query type to json marshal/unmarshal (#83821)
add query type to json marshal/unmarshal
2024-03-04 16:06:57 +01:00
Alexander Zobnin
82a88cc83f
Access control: Extend GetUserPermissions() to query permissions in org (#83392)
* Access control: Extend GetUserPermissions() to query permissions in specific org

* Use db query to fetch permissions in org

* refactor

* refactor

* use conditional join

* minor refactor

* Add test cases

* Search permissions correctly in OSS vs Enterprise

* Get permissions from memory

* Refactor

* remove unused func

* Add tests for GetUserPermissionsInOrg

* fix linter
2024-03-04 13:29:13 +01:00
linoman
67c062acc7
Adjust HD validation default value (#83818) 2024-03-04 12:45:07 +01:00
Misi
07e26226b7
Auth: Add all settings to Azure AD SSO config UI (#83618)
* Add all settings to AzureAD UI

* prettify

* Fixes

* Load extra keys with type assertion
2024-03-04 11:55:59 +01:00
Todd Treece
869b89dce4
K8s: Add accept header to ctx (#83802) 2024-03-01 20:32:59 -05:00
Ryan McKinley
d7bcd119c3
K8s: improve openapi generation (#83796) 2024-03-02 00:26:04 +02:00
Ryan McKinley
5f6bf93dd5
Expressions: Use enumerations rather than strings (#83741) 2024-03-01 19:38:32 +02:00
George Robinson
96127dce62
Alerting: Fix bug in screenshot service using incorrect limit (#83786)
This commit fixes a bug in the screenshot service where
[alerting].concurrent_render_limit was used instead of
[rendering].concurrent_render_request_limit, as in the
docs.
2024-03-01 17:17:55 +00:00
Eric Leijonmarck
8b551b08f9
TeamLBAC: Change to public preview (#83761)
change to public preview
2024-03-01 17:05:59 +00:00
Santiago
8ad367e4ad
Chore: Remove redundant error check (#83769) 2024-03-01 13:28:08 -03:00
owensmallwood
0dfdb2ae47
Revert "Add FolderUID for library elements" (#83776)
Revert "Add FolderUID for library elements (#79572)"

This reverts commit 2532047e7a.
2024-03-01 18:16:43 +02:00
foehammer
1c2b8576e1
CloudWatch: de-duplicate implementation of AWSDatasourceSettings.Load in LoadCloudWatchSettings (#83556) 2024-03-01 10:48:20 -05:00
Gábor Farkas
142ac22023
Revert "Postgres: Switch the datasource plugin from lib/pq to pgx" (#83760)
Revert "Postgres: Switch the datasource plugin from lib/pq to pgx (#81353)"

This reverts commit 8c18d06386.
2024-03-01 12:20:47 +01:00
Jo
0aebb9ee39
Misc: Remove unused params and impossible logic (#83756)
* remove unused params and impossible logic

* remove unused param
2024-03-01 12:08:00 +01:00
Jo
36a19bfa83
AuthProxy: Allow disabling Auth Proxy cache (#83755)
* extract auth proxy settings

* simplify auth proxy methods

* add doc mentions
2024-03-01 11:31:06 +01:00
Misi
75b020c19d
Cfg: Add a setting to configure if the local file system is available (#83616)
* Introduce environment.local_filesystem_available

* Only show TLS client cert, client key, client ca when local_filesystem_available is true

* Rename LocalFSAvailable to LocalFileSystemAvailable
2024-03-01 10:39:50 +01:00
idafurjes
2532047e7a
Add FolderUID for library elements (#79572)
* Add FolderUID in missing places for libraryelements

* Add migration for FolderUID in library elements table

* Add Folder UIDs tolibrary panels

* Adjust dashboard import with folder uid

* Fix lint

* Rename back FolderUID to UID

* Remove default

* Check if folderUID is nil

* Add unique indes on org_id,folder_uid,name and kind

* Update pkg/services/libraryelements/database.go

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* Fix folder integration test, with unique index on library elements

* Make folder uids nullable and rewrite migration query

* Use dashboard uid instead of folder_uid

* Adjust test

---------

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2024-03-01 10:16:33 +01:00
Jo
2182cc47ac
LDAP: Fix LDAP users authenticated via auth proxy not being able to use LDAP active sync (#83715)
* fix LDAP users authenticated via auth proxy not being able to use ldap sync

* simplify id resolution at the cost of no fallthrough

* remove unused services

* remove unused cache key
2024-03-01 10:14:32 +01:00
Charandas
b87ec69431
K8s: add a remote services file config option to specify aggregation config (#83646) 2024-02-29 17:29:05 -08:00
Ryan McKinley
74115f1f08
Chore: fix apiserver integration tests (#83724)
Co-authored-by: Todd Treece <todd.treece@grafana.com>
2024-02-29 14:58:49 -08:00
JERHAV
b2cb8d8038
CloudWatch: Remove unnecessary sortDimensions function (#83450)
Remove sortDimension

Closes #83338
2024-02-29 08:54:37 -08:00
linoman
b02ae375ba
Chore: Query oauth info from a new instance (#83229)
* query OAuth info from a new instance

* add `hd` validation flag

* add `disable_hd_validation` to settings map

* update documentation

---------

Co-authored-by: Jo <joao.guerreiro@grafana.com>
2024-02-29 16:48:32 +01:00
David Harris
5572158eea
chore: update core plugin descriptions (#83449)
* update alertmanager

* fix typo

* update candlestick

* update histogram

* update xy

* fix prettier

* dh-update-desc/ update snapshots

* dh-update-desc/ revert variable

* update failing test snapshot

---------

Co-authored-by: jev forsberg <jev.forsberg@grafana.com>
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2024-02-29 13:14:12 +00:00
Levente Balogh
f394e8333e
Chore: remove the dataConnectionsConsole feature toggle (#83661)
chore: remove `dataConnectionsConsole` feature toggle
2024-02-29 10:29:41 +01:00
Selene
f8ce8d0600
Schemas: Restore spec core go generation (#83594)
* Restore spec core go generation

* Fix go imports
2024-02-29 10:20:28 +01:00
Alexander Weaver
a862a4264d
Alerting: Export rule validation logic and make it portable (#83555)
* ValidateInterval doesn't need the entire config

* Validation no longer depends on entire folder now that we've dropped foldertitle from api

* Don't depend on entire config struct

* Export validate group
2024-02-28 14:40:13 -06:00
William Wernert
af528d2f66
Alerting/Annotations: Prevent panics from composite store jobs from crashing Grafana (#83459)
* Don't directly use pointer to json

* Don't crash entire process if a store job panics

* Add debug logs when failing to parse/handle Loki entries
2024-02-28 20:16:37 +02:00
Joe Blubaugh
b905777ba9
Alerting: Support deleting rule groups in the provisioning API (#83514)
* Alerting: feat: support deleting rule groups in the provisioning API

Adds support for DELETE to the provisioning API's alert rule groups route, which allows deleting the rule group with a
single API call. Previously, groups were deleted by deleting rules one-by-one.

Fixes #81860

This change doesn't add any new paths to the API, only new methods.

---------

Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
2024-02-28 10:19:02 -05:00
Arati R
467302480f
Search: Include collapsed panels in search v2 (#83047)
* Include collapsed panels in searchv2
* Include collapsed row in TestReadSummaries
2024-02-28 16:11:09 +01:00
Misi
3b7e7483c8
Auth: Align loading the legacy auth.grafananet section to the current behaviour in OAuthStrategy (#83479)
* Align oauth_strategy to the current behaviour

* lint

* Address feedback
2024-02-28 13:45:59 +01:00
Gábor Farkas
8c18d06386
Postgres: Switch the datasource plugin from lib/pq to pgx (#81353)
* postgres: switch from lib/pq to pgx

* postgres: improved tls handling
2024-02-28 07:52:45 +01:00
Scott Lepper
70009201d4
Expressions: Sql expressions with Duckdb (#81666)
duckdb temp storage of dataframes using parquet and querying from sql expressions
---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2024-02-27 16:16:00 -05:00
김은빈
96dfb385ca
Grafana: Replace magic number with a constant variable in response status (#80132)
* Chore: Replace response status with const var

* Apply suggestions from code review

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* Add net/http import

---------

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2024-02-27 18:39:51 +02:00
linoman
a7fbe3c6dc
Password Policy: Update frontend facing messages (#83227)
* update tests

* update error messages
2024-02-27 17:34:43 +01:00
Adam Yeats
facb19fefb
AzureMonitor: Fix mishandled resources vs workspaces (#83184) 2024-02-27 16:46:29 +01:00
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
Gabriel MABILLE
8d9921a5ba
RBAC: Fix delete team permissions on team delete (#83442)
* RBAC: Remove team permissions on delete

* Remove unecessary deletes from store function

* Nit on mock

* Add test to the database

* Nit on comment

* Add another test to check that other permissions remain
2024-02-27 12:21:26 +01:00
Jo
cc3b088b6c
Teams: Fix missing context in team service (#83327)
fix missing context in team service
2024-02-27 11:10:54 +01:00
Yuri Tseretyan
6a11bee6af
Alerting: Deprecate max_annotations_to_keep and max_annotation_age in [alerting] configuration section (#83266)
* introduce new config section [unified_alerting.state_history.annotations] and deprecate settings in [alerting]

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2024-02-26 17:04:27 -05:00
Isabella Siu
bdeff84068
CloudWatch: Refactor "getDimensionValuesForWildcards" (#83335) 2024-02-26 16:19:45 -05:00
Isabella Siu
44639e1063
CloudWatch: Fetch externalId from settings instead of env (#83332) 2024-02-26 16:18:22 -05:00
Isabella Siu
0bfe9db668
CloudWatch: Move SessionCache onto the instance (#83278) 2024-02-26 15:59:54 -05:00
Misi
9709ac8b84
Auth: Revert provider list change (#83435)
* Load auth.grafananet as the last provider

* skip test
2024-02-26 20:59:49 +01:00
Takashi Idobe
f209a5a8b8
fix typos (#83414) 2024-02-26 10:52:44 -07:00
Mihai Doarna
7b2fa28e0b
SSO: update info field from SocialBase struct (#83407)
update info field from SocialBase struct
2024-02-26 18:02:46 +02:00
Isabella Siu
7f8a87458f
CloudWatch: Remove unused handleGetRegions and regionCache (#83333)
* remove unused handleGetRegions and regionCache

* cleanup
2024-02-26 09:35:59 -05:00
Misi
617adb137c
Auth: OAuth strategy load extra fields separately (#83408)
Load extra fields separately
2024-02-26 15:33:29 +01:00
idafurjes
80447dd0cc
Restructure cloudmigration service (#83211)
* Restructure cloudmigation service

* Adjust codewoners and wire

* Comment out unused metrics
2024-02-26 14:52:16 +01:00
Khushi Jain
d02de5ddb9
Image Rendering: Add settings for default width, height and scale (#82040)
* Add Image width & height

* ability to change default width, height and scale

* default ini

* Update conf/defaults.ini

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>

* Update pkg/setting/setting.go

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>

* Update pkg/setting/setting.go

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>

* Added docs, changed frontend

* Update conf/defaults.ini

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>

* Update conf/defaults.ini

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>

* Update conf/defaults.ini

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>

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

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>

* Update pkg/api/dtos/frontend_settings.go

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>

* Update pkg/api/frontendsettings.go

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>

* Update pkg/api/render.go

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>

* add query float 64

* Update packages/grafana-runtime/src/config.ts

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>

* Update public/app/features/dashboard/components/ShareModal/utils.ts

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>

* spacing

* fix tests

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

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

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

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

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

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

---------

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2024-02-26 13:27:34 +01:00
Andres Martinez Gotor
fc8a9aad22
Datasource API: Add config to ctx (#83386) 2024-02-26 13:02:55 +01:00
Gabriel MABILLE
80d6bf6da0
AuthN: Remove embedded oauth server (#83146)
* AuthN: Remove embedded oauth server

* Restore main

* go mod tidy

* Fix problem

* Remove permission intersection

* Fix test and lint

* Fix TestData test

* Revert to origin/main

* Update go.mod

* Update go.mod

* Update go.sum
2024-02-26 11:29:09 +01:00
Serge Zaitsev
d0679f0993
Chore: Add support bundle for folders (#83360)
* add support bundle for folders

* fix ProvideService in tests

* add a test for collector
2024-02-26 11:27:22 +01:00
Selene
dea0a0f6c8
Kinds: Generate k8 resources without use kindys/thema (#83310)
Generate k8 resources reading cue file directly instead of use thema/kindsys binding
2024-02-26 10:18:19 +01:00
Todd Treece
110028706a
K8s: Update codegen to support new packages (#83347)
---------

Co-authored-by: Charandas Batra <charandas.batra@grafana.com>
2024-02-23 16:36:23 -08:00
Todd Treece
e5a26a3f7c
K8s: Add apimachinery and apiserver packages (#83190) 2024-02-23 15:15:43 -05:00
Tania
8895b43c85
Chore: Remove docs and kinds report generators (#83277)
* Chore: Remove codegen for docs

* Remove kindsysreport
2024-02-23 20:06:43 +01:00
Ieva
19b1e71fee
IP range AC for data sources: compare the base of the URL only (#83305)
* compare the base of the URL and ignore the path

* change the logic to compare scheme and host explicitly

* fix the test
2024-02-23 18:13:21 +02:00
Ieva
65534e62a6
RBAC: add kind, attribute and identifier to annotation permissions during the migration (#83299)
add kind, attribute and identifier to annotation permissions during the migration
2024-02-23 16:03:23 +00:00
Jo
b2601d71d5
IAM: Remove fully rolled out feature toggles (#83308)
* remove anon stat ft

* remove split scope flag

* remove feature toggle from frontend
2024-02-23 17:53:37 +02: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
George Robinson
a0353b237a
Alerting: Update swagger specs (#83260) 2024-02-23 11:25:43 +00:00
Ashley Harrison
a3c73ae7c4
E2C: Add initial empty state (#83232)
* update subtitle

* add empty state

* rename to InfoPaneLeft/Right

* use &apos;

* add "direction" prop to Box

* update subtitle

* Revert "add "direction" prop to Box"

This reverts commit 99f82a27c7.
2024-02-23 13:18:09 +02:00
George Robinson
a564c8c439
Alerting: Keep order of time and mute time intervals consistent (#83257) 2024-02-22 16:57:20 +00:00
Misi
1ef2e8d366
Chore: Allow self-serve for ssoSettingsApi feature toggle (#83140)
* Set AllowSelfServe to true ssoSettingsApi

* Align ft registry validation with latest changes
2024-02-22 18:33:27 +02:00
George Robinson
1ed1242358
Alerting: Basic support for time_intervals (#83216)
This commit adds basic support for time_intervals, as mute_time_intervals
is deprecated in Alertmanager and scheduled to be removed before 1.0.
It does not add support for time_intervals in API or file provisioning,
nor does it support exporting time intervals. This will be added in
later commits to keep the changes as simple as possible.
2024-02-22 15:58:56 +00:00
Gábor Farkas
ae77fe3602
postgres: do not use unexported grafana-core config (#83241)
* postgres: do not use unexported grafana-core config

* fixed wrong value
2024-02-22 16:47:03 +01:00
Joey
ee5dc14e17
Tempo: Remove trace to metrics feature toggle (#82884)
* Remove trace to metrics feature toggle

* Fix after merge
2024-02-22 13:30:41 +00:00
Gábor Farkas
3ba33fe278
mysql: do not use unexported grafana-core config (#83062)
* mysql: do not use unexported grafana-core config

* updated test
2024-02-22 14:22:14 +01:00
Klesh Wong
9282c7a7a4
AuthProxy: Invalidate previous cached item for user when changes are made to any header (#81445)
* fix: sign in using auth_proxy with role a -> b -> a would end up with role b

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

Co-authored-by: Karl Persson <kalle.persson92@gmail.com>

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

Co-authored-by: Karl Persson <kalle.persson92@gmail.com>
2024-02-22 10:02:31 +01:00
Agnès Toulet
8d68159b52
Public Dashboards: Disable email-sharing when there is no license (#80887)
* PublicDashboards: Disable email-shared dashboards when feature is disabled

* fix pubdash creation when it was email-shared

* add feature name const in OSS

* update doc

* Update service.go

* fix test & linter

* fix test

* Update query_test.go

* update tests

* fix imports

* fix doc linter issues

* Update docs/sources/administration/enterprise-licensing/_index.md

* fix after merge
2024-02-22 09:34:14 +01:00
Pablo
cfcf03bf7a
CloudWatch: Add Firehose kms-related metrics (#83192)
Add KMS firehose metrics
2024-02-21 14:57:31 -05:00
Ashley Harrison
c75502dd8c
Cloud migration UI: Add migrate-to-cloud route (#83072)
* add migrate-to-cloud route

* fix chunk name

* gate route behind feature toggle

* update permission checks
2024-02-21 15:50:13 +00:00
linoman
7e8b679237
OAuth: Improve domain validation (#83110)
* enforce hd claim validation

* add tests
2024-02-21 15:40:18 +01:00
Carl Bergquist
028d0d0c2c
Rename scope.name to scope.title since name exists in metadata. (#83172)
name is part of metadata which is confusing

Signed-off-by: bergquist <carl.bergquist@gmail.com>
2024-02-21 09:32:57 -05:00
Alexander Zobnin
9bbb7f67e0
Chore: Move store interface to top level (#83153)
* Chore: Move store interface to top level

* Update store mock
2024-02-21 14:32:54 +01:00
Ryan McKinley
809c1eaddb
Snapshots: delete from same org (#83111)
delete in org
2024-02-21 08:04:15 -05:00
Giuseppe Guerra
68fe045ec7
Plugins: Remove pluginsInstrumentationStatusSource feature toggle (#83067)
* Plugins: Remove pluginsInstrumentationStatusSource feature toggle

* update tests

* Inline pluginRequestDurationWithLabels, pluginRequestCounterWithLabels, pluginRequestDurationSecondsWithLabels
2024-02-21 12:57:40 +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
Alexander Zobnin
e7a1ecca28
Annotations: Improve query performance when using dashboard filter (#83112)
* Annotations: Improve query performance when using dashboard filter

* Add dashboard id filter
2024-02-21 10:30:26 +01:00
Torkel Ödegaard
64e0a4282e
DataQuery: Track panel plugin id not type (#83091) 2024-02-21 09:38:42 +01:00
Charandas
0bd009fb53
K8s: fix nil deref from dummy factory for API Server options (#83132) 2024-02-20 23:00:02 +02:00
Jan Garaj
8162ec2960
CloudWatch: Update AWS/ES metrics (#83037)
CloudWatch: update AWS/ES metrics
2024-02-20 13:46:29 -05:00
Jan Garaj
ef23148b36
CloudWatch: Update AWS/EC2 metrics (#83039)
CloudWatch: update AWS/EC2 metrics
2024-02-20 12:13:50 -05:00
Kyle Brandt
4859cdeae5
K8S/Scopes: App-server for storing scope objects (#81996)
Build out app-server stub

---------

Signed-off-by: bergquist <carl.bergquist@gmail.com>
Co-authored-by: bergquist <carl.bergquist@gmail.com>
Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
2024-02-20 18:28:27 +02:00
Fabrizio
d1c5e491ac
Zipkin: Decouple Zipkin plugin (#81354) 2024-02-20 18:24:40 +02:00
Andres Martinez Gotor
7f9ebe5464
Chore: Make the secret table name configurable (#83106) 2024-02-20 16:56:43 +01:00
Jan Garaj
3829da0616
CloudWatch: Update AWS/Lambda metrics (#83038) 2024-02-20 16:39:03 +01:00
Piotr Jamróz
30178d468f
Skip a flaky test (#82522)
Co-authored-by: grafana-delivery-bot[bot] <132647405+grafana-delivery-bot[bot]@users.noreply.github.com>
2024-02-20 15:08:29 +01:00
Ida Štambuk
5431c51490
Cloudwatch: Add linting to restrict imports from core (#82538)
---------

Co-authored-by: Kevin Yu <kevinwcyu@users.noreply.github.com>
2024-02-20 14:52:11 +01:00
Kristina
9d6da82e36
Query History: Count using SQL, not post query (#82208)
* Count in SQL, not externally

* Fix linter
2024-02-20 07:32:40 -06:00
Jan Garaj
914f033497
CloudWatch: Update AWS/AutoScaling metrics (#83036) 2024-02-20 11:22:28 +01: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
Matthew Jacobson
87ab98ea95
Alerting: Fix panic in provisioning filter contacts by unknown name (#83070) 2024-02-19 17:30:13 +02:00
Jan Garaj
bfd5475e1e
CloudWatch: Update AWS/Kafka metrics (#83035) 2024-02-19 12:04:23 +01:00
Gábor Farkas
7f77be8f85
postgres: tls: only use non-empty certificates (#82182) 2024-02-19 11:58:42 +01:00
Serge Zaitsev
1aff748e8f
Use split scopes instead of substr in search v1 (#82092)
* use split scopes instead of substr in search v1

* tests, of course

* yet, some test helpers dont use split scopes

* another test helper to fix

* add permission.identifier to group by

* check if attribute is uid

* fix tests

* use SplitScope()

* fix more tests
2024-02-18 22:26:08 +01:00
Ryan McKinley
f23f50f58d
Expressions: Add model struct for the query types (not map[string]any) (#82745) 2024-02-17 02:59:11 +02:00
Matthew Jacobson
46a77c0074
Alerting: Validate upgraded receivers early to display in preview (#82956)
Previously receivers were only validated before saving the alertmanager
configuration. This is a suboptimal experience for those upgrading with preview
as the failed channel upgrade will return an API error instead of being
summarized in the table.
2024-02-16 15:17:07 -05:00