667 Commits

Author SHA1 Message Date
5ec1bd91df datasources: querier: log empty refids (#107111)
* datasources: querier: log empty refids

* improved logging
2025-07-10 13:28:45 +02:00
106206ae93 Ignore delete error if not found 2025-07-10 12:45:35 +02:00
b0df15c770 Fix issue with path in folder deletion
Folder path must not have a trailing slash in Nanogit
2025-07-10 12:45:35 +02:00
2484402f7a address PR comments 2025-07-10 12:45:35 +02:00
4386085aa9 fix linter 2025-07-10 12:45:35 +02:00
bd81243bbb Git sync: Implement folder deletion 2025-07-10 12:45:35 +02:00
0012345a7e Folders/apiserver: Fix mutate method for folders (#107819)
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
2025-07-09 15:57:04 -03:00
8283d35e56 Secrets: make operations sync (#107732)
* Secrets: make operations sync

* k8s gen / update query to list secure values to include the version

* always store new version of a secret

* make update-workspace

* go mod tidy

* update queries

* update queries

* improve and use testutils in decrypt_store_test

* fix broken test

* make update-workspace

* ./hack/update-codegen.sh secret

* update Test_SecureValueMetadataStorage_CreateAndRead

* undo dependency changes

* linter: fix remaining errors

---------

Co-authored-by: Matheus Macabu <macabu.matheus@gmail.com>
Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>
2025-07-09 10:43:34 -03:00
b249942b61 Bump nanogit 2025-07-09 (#107871)
* Bump nanogit 2025-07-09

This version contains significant performance improvements in memory and
CPU thanks to optimizing buffers, using a faster zlib library and using
streaming instead of loading everything in memory.
2025-07-09 14:03:29 +02:00
3f502f305d Chore: Update mocks with recent mockery (#107816) 2025-07-09 09:15:34 +02:00
1244f5c53d AuthZ: Add CoreRoleStorageBackend to the extension set (#103912)
* Wiring

* Trigger CI

---------

Co-authored-by: mohammad-hamid <mohammad.hamid@grafana.com>
2025-07-07 20:08:44 +02:00
cc069d301e Secrets: Skip allowlist check when decrypting if the list is empty (#107693) 2025-07-07 15:32:39 +02:00
46c38fdbb7 SecretsManager: Introduce worker and secret async service (#107614)
SecretsManager: Introduce worker and secret aysnc service

Co-authored-by: PoorlyDefinedBehaviour <brunotj2015@hotmail.com>
Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>
Co-authored-by: Michael Mandrus <michael.mandrus@grafana.com>
2025-07-04 13:13:48 +01:00
713f6d1551 IAM: Move resource definitions to apps/iam step 1 (#107389)
* wip

* Use serviceaccount model from /apps/iam

* revert version update

* Add tembinding, userteam, other improvements

* Change serviceaccounttoken spec

* Revert the change of ServiceAccountToken

* Revert the change of UserTeam

* Clean up

* Remove files that are not needed for now

* Lint

* Update sql query's integration tests

* Fix tests

* update openapi spec

* Move LastSeenAt to the annotations

* Updte openapi_snapshots

* Change lastSeenAt annotation name
2025-07-04 11:07:48 +02:00
a59ec345c2 SecretsManager: Introduce metrics and logs (#107582)
Co-authored-by: Michael Mandrus <michael.mandrus@grafana.com>
2025-07-03 17:32:18 +01:00
66d9a33cc9 Datasources: Update grafana-aws-sdk for new sigv4 middleware and aws-sdk-go v1 removal (#107522)
Datasources: Update grafana-aws-sdk
2025-07-03 17:48:57 +02:00
cfd3b9f582 SecretsManager: outbox use message id (#107472)
* SecretsManager: outbox use message id

Co-authored-by: PoorlyDefinedBehaviour <brunotj2015@hotmail.com>

* Remove query timestamp

* Add missing query

---------

Co-authored-by: PoorlyDefinedBehaviour <brunotj2015@hotmail.com>
Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>
Co-authored-by: Matheus Macabu <macabu.matheus@gmail.com>
2025-07-03 15:21:47 +01:00
e76f470b44 NestedFolderPicker: Migrate to app platform API (#106926)
* Add /children endpoint

* Update folder client

* Add comment

* Add feature toggle

* Add new version of useFoldersQuery

* Error handling

* Format

* Rename feature toggle

* Remove options and move root folder constant

* Fix feature toggle merge

* Add feature toggle again

* Rename useFoldersQuery files

* Update API spec

* Fix test

* Add test

* Better typings

---------

Co-authored-by: Clarity-89 <homes89@ukr.net>
2025-07-03 16:15:23 +02:00
4d8678c7f2 SecretsManager: Add base encryption manager (#107562)
Co-authored-by: Michael Mandrus <michael.mandrus@grafana.com>
Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>
2025-07-03 11:29:14 +01:00
f51db112d4 SecretsManager: Add decrypt service (#107473)
* SecretsManager: Add decrypt service

Co-authored-by: Dana Axinte <53751979+dana-axinte@users.noreply.github.com>

* Missed space to sync files
2025-07-03 10:41:38 +01:00
a68f8107df Unified Storage/Large Object Support: Add test for dashboardv2 support (#107470)
* Add more unit tests to cover dashboardv2 and cross version unmarshalling

Signed-off-by: Bruno Abrantes <bruno@brunoabrantes.com>

* Change import name of meta v1

* Rename TestLargeDashboardSupport since there are tests for multiple versions

* Simplify TestLargeDashboardSupportV2

* Use v1 in TestLargeDashboardSupportCrossVersion, simplify original dash

* Marshal spec in TestLargeDashboardSupportCrossVersion

* Remove TestLargeDashboardSupportCrossVersion

---------

Signed-off-by: Bruno Abrantes <bruno@brunoabrantes.com>
Co-authored-by: Bruno Abrantes <bruno@brunoabrantes.com>
2025-07-03 07:13:56 +02:00
f32d944b23 Secrets: Add initial tracing instrumentation (#107513) 2025-07-02 14:43:36 +02:00
7614089077 Secrets: Only register dependencies to start up (#107504) 2025-07-02 14:02:52 +02:00
8b9e57f2f6 OFREP: Enable with standard aggregation (#107349) 2025-07-01 09:17:36 -07:00
b46e305cb2 SecureValues: Remove actor prefix from decrypters (#107433)
Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>
2025-07-01 08:40:26 +01:00
d28594d2f9 SecretsManager: Limit of 24kiB for raw input for secure value (#107403)
* SecureValues: Add limit of 24kiB for raw input

Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>

* Fix lint

---------

Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>
2025-06-30 22:28:41 +01:00
b1d3155b60 K8s: Library Panels: Add rerouting for get (#107362) 2025-06-30 13:26:24 -05:00
0fccc01ebe SecretsManager: add data key store (#107396)
* SecretsManager: Add data key store

Co-authored-by: Michael Mandrus <michael.mandrus@grafana.com>
Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>
Co-authored-by: Dana Axinte <53751979+dana-axinte@users.noreply.github.com>

* SecretsManager: Add wiring of data key store

Co-authored-by: Michael Mandrus <michael.mandrus@grafana.com>
Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>
Co-authored-by: Dana Axinte <53751979+dana-axinte@users.noreply.github.com>

---------

Co-authored-by: Michael Mandrus <michael.mandrus@grafana.com>
Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>
2025-06-30 17:17:07 +01:00
67a952c34e Implement OFREP compatible feature flag service (#105632)
* Add ofrep pkg

* api server: Use namespace from request in case user is not authenticated

* Add handlers to ofrep api builder

* Add NewOpenFeatureService to initialize mt apiserver

* allow specifying CA and insecure

* Compare namespace with eval ctx stackID

* Organize ofrep package

* Implement AllowedV0Alpha1Resources

* Revert folderimpl changes

* Handle default namespace

* Fix extracting stack id from eval ctx

* Add more logs

* Update pkg/registry/apis/ofrep/register.go

Co-authored-by: Dave Henderson <dave.henderson@grafana.com>

* Update pkg/registry/apis/ofrep/register.go

Co-authored-by: Dave Henderson <dave.henderson@grafana.com>

* Apply review feedback

* Replace contexthandler with types

* Fix identifying authed request

* Refactor checks in the handlers

* Remove anonymous from isAuthenticatedRequest check

---------

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
Co-authored-by: Gabriel Mabille <gabriel.mabille@grafana.com>
Co-authored-by: Charandas Batra <charandas.batra@grafana.com>
Co-authored-by: Dave Henderson <dave.henderson@grafana.com>
2025-06-27 18:30:38 +02:00
c47fc53eee fix: set withHistory flag to true for non-interactive mode (#107263) 2025-06-26 16:08:30 +00:00
3d543a336f IAM: Register CoreRole apis (#106924)
* IAM: Register CoreRole apis

* one line store instantiation

* Small refactor for readability

* Add authorizer for CoreRole

* Nit

* Error strings should not end with punctiation

* Account for error

* Switch to use the local resource client

* error should not start with upper casing

* noopStorageErr should have a name starting with err

* Update workspace

* I don't know why I don't have the same output as the CI 🤷

* Dependency xOwnership

* imports

* Import order

* Rename alias to make it clear this is legacy
2025-06-26 10:11:28 +02:00
79fe8a9902 Library Panels: Modify connection api endpoint to be compatible with unified storage (#107088) 2025-06-25 22:21:56 +00:00
8a05378ef3 apiserver/folders: use exact match on GetFolderByTitle in legacy (#106867)
* apiserver/folders: use exact match on GetFolderByTitle in legacy

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>


---------

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
2025-06-24 17:42:08 -03:00
8ba6487b15 datasources: querier: add unit tests (#107105) 2025-06-24 13:07:05 +02:00
ef6e28b955 K8s: Make v0alpha1 opt-in (#107056) 2025-06-20 16:37:17 -05:00
3a13c2db64 chore: add logging around migration cli (#107046) 2025-06-20 15:20:06 +00:00
d1b4bb182d Provisioning: Bump nanogit library for performance improvemnents (#107026)
* Bump nanogit library

This version of nanogit will be optimized for performance, specially for
bulk writes. It will store packfiles in a temporary file if there are
too many and clean up after push or when the writer is removed.

* Format code in nanogit/git.go
2025-06-20 12:51:29 +02:00
fe4abf2221 Git Sync UI: Delete Provisioned Dashboard Flow (#106593)
* DeleteProvisionedDashboardDrawer: delete provisioned dashboard flow set up with drawer

* clean up

* add tests

* more test and clean up

* revert endpoint change

* adjust tests

* remove unuse codes

* fix type, fix test, add read only message

* small changes

* fix test, i18n fix

* comments

* Fix bug for file deletion using a branch

* PR comments update

* Use the provided ref for parser so that URLs work

* call useDeleteRepositoryFilesWithPathMutation in delete drawer component directly

* remove console log

* Update public/app/features/dashboard-scene/components/Provisioned/DashboardEditFormSharedFields.test.tsx

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* PR comments

* use string for fields

* extract handle request logic from save form and delete form and put into one hook

* Add test for useProvisionedRequestHandler

* Update public/app/features/dashboard-scene/components/Provisioned/DashboardEditFormSharedFields.test.tsx

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* Update public/app/features/dashboard-scene/components/Provisioned/DashboardEditFormSharedFields.test.tsx

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* Update public/app/features/dashboard-scene/components/Provisioned/DashboardEditFormSharedFields.test.tsx

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* Update public/app/features/dashboard-scene/components/Provisioned/DashboardEditFormSharedFields.test.tsx

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* Update public/app/features/dashboard-scene/settings/DeleteProvisionedDashboardForm.test.tsx

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* Update public/app/features/dashboard-scene/settings/DeleteProvisionedDashboardForm.tsx

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* use drawer close in both save form and delete form

* Add back panelEditor onDiscard

* add panelEditor onDiscard to delete flow

* Update public/app/features/dashboard-scene/settings/DeleteProvisionedDashboardForm.tsx

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

---------

Co-authored-by: Roberto Jimenez Sanchez <roberto.jimenez@grafana.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2025-06-18 15:14:03 -04:00
67f50478d9 Loki: Refactor getting of panel/dashboard title headers as part of decoupling (#106829)
* Loki: Refactor getting of panel/dashboard title headers as part of decoupling

* Add headers to be passed to api server

* Address review comments
2025-06-18 17:41:31 +02:00
945bc53b4c DualWrite: Manage values from KV store (not file) (#106772) 2025-06-18 10:37:44 +03:00
3cb62e370b Provisioning: Add pure git repository type (#106815)
* Add repository type git to spec
* Register git type
* Update test checks
2025-06-18 09:05:37 +02:00
689cafc1fa App Platform Provisioning: Add experimental nanogit mode for Git Sync (#106763)
* Add nanogit package
* Add nanoGit feature flag
* Put logger into nanogit context
* Commit go mod and go sum updates
* Add more stuff around logging
* Nanogit also in extra one
* Add owner to dependency
2025-06-17 19:07:30 +02:00
59c2f15433 Dashboard V0->V1 Migration: Schema migration v36 (#100757)
---------

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com>
Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
2025-06-16 15:53:41 +02:00
5d54289509 datasources: querier: more robust error handling, and report no errors for single-tenant (#106288)
* datasources: querier: more robust error handling, and report no error for st

* do not leak error details out

* apply the change to the real file, not just to the test
2025-06-16 14:12:37 +02:00
6097841e67 SecretsManager: add secure value store (#106708)
* SecretsManager: add secure value model and sql templates

Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>
Co-authored-by: Dana Axinte <53751979+dana-axinte@users.noreply.github.com>
Co-authored-by: Leandro Deveikis <leandro.deveikis@gmail.com>
Co-authored-by: PoorlyDefinedBehaviour <brunotj2015@hotmail.com>

* SecretsManager: secure value rest layer to use store

Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>
Co-authored-by: Dana Axinte <53751979+dana-axinte@users.noreply.github.com>
Co-authored-by: Leandro Deveikis <leandro.deveikis@gmail.com>
Co-authored-by: PoorlyDefinedBehaviour <brunotj2015@hotmail.com>

* SecretsManager: temporary add actor prefix to decrypters

* Remove list securevalue by namefor now

---------

Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>
Co-authored-by: Leandro Deveikis <leandro.deveikis@gmail.com>
Co-authored-by: PoorlyDefinedBehaviour <brunotj2015@hotmail.com>
2025-06-16 10:19:44 +01:00
feeced9618 K8s: Dashboards /apis: Fix library element connections (#106734) 2025-06-13 21:40:39 +02:00
3e3fa18118 Revert "fix(folders): only return continue token if more results" (#106700)
Revert "fix(folders): only return continue token if more results (#106667)"

This reverts commit 3fd8ad8476077b69c44172159852162fdf4dc605.
2025-06-13 12:07:27 +02:00
3fd8ad8476 fix(folders): only return continue token if more results (#106667) 2025-06-13 09:55:30 +02:00
de28231f2f SecretsManager: Add outbox store (#106613)
SecretsManager: add outbox store

Co-authored-by: PoorlyDefinedBehaviour <brunotj2015@hotmail.com>
Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>
2025-06-12 13:31:48 +01:00
1be9e60667 SQL Expressions: Exclude CTEs from required Tables (#106479)
Fixes #105030

---------

Co-authored-by: Sam Jewell <2903904+samjewell@users.noreply.github.com>
2025-06-11 10:36:28 -04:00