16603 Commits

Author SHA1 Message Date
37bfea8685 FrontendService: Add tracing to frontend service (#107236)
* FrontendService: Add tracing to frontend service

* wire gen

* fix test
2025-07-09 19:21:31 +01:00
0cde9e4f3f UI: Disable tabular numbers toggle by default (#107911)
* UI: disable tabular numbers toggle

* gen
2025-07-09 16:57:16 +00:00
a7aed23d47 Disable TestIntegrationFoldersGetAPIEndpointK8S for all databases (#107913)
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
2025-07-09 16:55:15 +00:00
4bb6926eee Alerting: Separate configuration model for remote Alertmanager Mimir client (#107741)
* replace PostableUserConfig with GrafanaAlertmanagerConfig to decouple from internal Grafana models
* update alertmanager + tests
* calculate hash of the GrafanaAlertmanagerConfig
2025-07-09 12:42:10 -04:00
4228ed789b Folders: disable TestIntegrationFoldersGetAPIEndpointK8S (#107897)
* Folders: disable TestIntegrationFoldersGetAPIEndpointK8S

it's breaking the enteprise CI pipeline

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

* Run only against sqlite

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

* noop: force backend change

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

---------

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
2025-07-09 15:44:20 +00:00
9d2eadcfd2 PoC: replace using testing.Short in storage/unified package with integration test skip method (#107887)
* PoC: check if testing.Short is called from integration tests only.

* Rename helper function.

* Fix logic.

* Remove skipping of integration tests from non-integration tests.

* Remove skipping of integration tests from non-integration tests.

* Fix import.
2025-07-09 15:32:10 +00:00
1e0fd825eb Plugins: Simplify assetpath logic (#107876)
* simplify assetpath logic

* fix tests
2025-07-09 15:48:52 +01:00
1d252de1e9 Docs: Clean up ssoSettingsApi references from docs (#107896)
* Clean up ssoSettingsApi references from docs

* lint
2025-07-09 14:22:07 +00: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
f34a9fc0c2 CloudWatch: Fix http client handling + assume role bug (#107893) 2025-07-09 15:28:50 +02: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
c3eeb1fcd9 CloudWatch: Fix proxy transport issue (#107807)
CloudWatch: fix proxy transport issue
2025-07-09 11:03:53 +02:00
3f502f305d Chore: Update mocks with recent mockery (#107816) 2025-07-09 09:15:34 +02:00
d7f7a19c56 Dashboard permissions: Update integration tests to take into account kubernetesDashboards flag value (#107706)
Dashboard permissions: Update integration tests to take into account  flag value
2025-07-09 08:46:27 +02:00
e4743a9092 IAM: Return 401 if identity type is not valid in GetUserPreferences (#107760)
fix(GetUserPreferences): Return 401 if identity type is not valid
2025-07-09 08:35:18 +02:00
79ebe2dc10 Folders: Ensure all folder tests under /pkg/tests/apis/folders are handled as integrations tests (#107801)
Folders: ensure integration tests are executed in our CI pipeline

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
2025-07-08 16:32:41 -03:00
53537148e1 Folders: reenable unit tests (#107751)
* Folders: reenable unit test TestFoldersCreateAPIEndpointK8S

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

* reenable unit test TestFoldersGetAPIEndpointK8S

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

---------

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
2025-07-08 11:26:45 -03:00
0f23988132 JWT.Authenticate: remove err != nil check for error that has already been checked (#107727) 2025-07-08 11:19:39 -03:00
Jo
1e1fd3db38 OAuth: Add access token as third source for user info extraction (#107636)
* Add access token as third source for user info extraction

- Add extractFromAccessToken method to extract user info from JWT access tokens
- Mutualize code by creating parseUserInfoFromJSON helper method
- Rename methods for clarity: extractFromToken -> extractFromIDToken, retrieveRawIDToken -> retrieveRawJWTPayload
- Update test suite to include comprehensive access token retrieval scenarios
- Support three sources in priority order: ID token, API response, access token
- Maintain backward compatibility while adding new functionality

* Update Generic OAuth documentation to reflect access token support

- Add access token as a third source for user information extraction
- Update configuration sections to mention access tokens alongside ID tokens and UserInfo endpoint
- Document the priority order: ID token → UserInfo endpoint → access token
- Update configuration option descriptions to reflect new functionality
- Maintain consistency with implementation changes

* Refactor access token test cases to use parameter instead of hardcoded logic

- Add AccessToken field to test case struct for explicit access token specification
- Remove hardcoded string matching logic that determined access token based on test name
- Update all access token test cases to include the AccessToken field with appropriate JWT values
- Improve test maintainability and clarity by making access tokens explicit parameters
- Remove unused strings import that was only needed for the hardcoded logic

* fix doc lint

* reduce cyclomatic complexity
2025-07-08 15:38:11 +02:00
e33047bdf1 Dashboard: Library Panels - Add ability to search by folder name (#106997)
* Dashboard: Add ability to search by folder name in library panels

* restore to main to fix linting issues

* restore from main to avoid go linting issues

* add logic to the writers.go that search by folder title if folder is not passed

* add missing left joing from the folder table

* Add extra logic to prevent folder searches without permission

* fix go linting issue about memory

* Add test when searching by folder name

* Refactor tests to include a bit more validation

* apply feedback and use SearchFolder from search folder service

* clean up comments

* Update pkg/services/libraryelements/database.go

Co-authored-by: Ezequiel Victorero <ezequiel.victorero@grafana.com>

* Fix logic of early return

* Extract into a function and remove the left join

* Apply feedback to be aligned with idiomatic go

* Apply suggestion from @evictorero

Co-authored-by: Ezequiel Victorero <ezequiel.victorero@grafana.com>

* fix liting

---------

Co-authored-by: Ezequiel Victorero <ezequiel.victorero@grafana.com>
2025-07-08 15:07:22 +02:00
047349638d CI: Run lerna bump version before yarn build (#107731)
lerna bump version before yarn build

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2025-07-08 14:58:45 +02:00
d5a1781fb6 Schema V2: Simplify annotations v1<->v2 conversions (#107390)
* Initial migration pending to test

* Update tests

* apply feedback

* Remove unnecessary types

* Fix types

* Update tests

* fixing tests

* Default DS for transformer

* Update the default DS

* Update the generated sdk files

* Restore commented tests

* Update tests

* Updating snapshots

* fix

* Do not preserve empty datasource in panel spec

* update provisioning v2 sample dashboard

* Fix test

* Prettier

* Fix import e2e

* Prettier

* restore commented tests

* Update to support annotations

* Lint

* Make gen apps

* Make the build pass

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>

* Update grafana-app-sdk to 0.39.2

* Workspace update

* make gen-cue

* Runtime error fix

* Update dashboard spec

* Update go workspaces

* Schema V2: Simplify annotations v1<->v2 conversions

* Update public/app/features/dashboard-scene/serialization/transformSceneToSaveModelSchemaV2.ts

* Cleanup and some more tests

* test improvement

* Update public/app/features/dashboard-scene/serialization/transformSceneToSaveModelSchemaV2.ts

* Update go.sum

* make generate

* Update public/app/features/dashboard-scene/serialization/transformSceneToSaveModelSchemaV2.ts

Co-authored-by: Haris Rozajac <58232930+harisrozajac@users.noreply.github.com>

* ts

* make gen-apps

* Update response transformers to correctly handle v2->v1 annotations

* Update dashboards openapi snapshot

---------

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
Co-authored-by: alexandra vargas <alexa1866@gmail.com>
Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com>
Co-authored-by: Igor Suleymanov <igor.suleymanov@grafana.com>
Co-authored-by: spinillos <selenepinillos@gmail.com>
Co-authored-by: Haris Rozajac <58232930+harisrozajac@users.noreply.github.com>
2025-07-08 14:42:30 +02:00
de50c5a497 Alerting: Fix crypto_test.go errors in CI (#107759)
Fix test
2025-07-08 11:03:26 +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
c93fd3ee9e Alerting: idempotent decrypt\encrypt operations on extra configs (#107592)
* add prefix to encrypted string to distinguish between unencrypted and encrypted ones

---------

Co-authored-by: Alexander Akhmetov <me@alx.cx>
2025-07-07 12:17:41 -04:00
d15e1ad8d0 Alerting: Fix route validation in provisioning service (#107550)
* introduce ExtraConfigsCrypto
* delete getLastConfiguration and move all code into method Get
* update legacy store to encrypt ExtraConfigs same way we do in MultiOrgAlertmanager
* update legacy store init
* delete PersistConfig
* remove unnecessary unmarshalling
* add better error

* add tests for legacy store

* add tests that cover extra config validation

* add integration test for conflicting routes

---------

Signed-off-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
2025-07-07 12:16:31 -04:00
37c480def4 K8s: Add support for stored subresources in app runner (#105481) 2025-07-07 11:25:23 -04:00
cc069d301e Secrets: Skip allowlist check when decrypting if the list is empty (#107693) 2025-07-07 15:32:39 +02:00
075770070e Future-proofing query and data source model in Dashboard Schema v2 (#104194)
---------

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
Co-authored-by: alexandra vargas <alexa1866@gmail.com>
Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com>
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: Igor Suleymanov <igor.suleymanov@grafana.com>
Co-authored-by: spinillos <selenepinillos@gmail.com>
2025-07-07 15:31:25 +02:00
7787ff6b2e unistore: add more kvstore tests (#107692)
add more kvstore tests
2025-07-07 15:00:40 +02:00
c2b7acae35 chore(datasources): Adding debug logging to datasource provisioning when resource is not found in SqlStore (#107652) 2025-07-07 12:23:51 +00:00
9b7e2aa5f3 unistore: add custom kv grpc (#107464)
add StorageTypeUnifiedKVGrpc
2025-07-07 09:57:08 +00:00
2d8f751e6d Auth: make skipTokenRotationIfRecent feature flag enabled by default (#107676) 2025-07-07 10:24:36 +02:00
5b5d5fe675 Auth: fix role_attribute_path when using ID tokens in Gitlab OAuth (#107634) 2025-07-04 23:58:04 +02:00
59542bb95a Extensions: Undo removal of required enterprise dependencies (#107641) 2025-07-04 15:26:47 +00:00
3abe84121f feat(config): add config ensure_default_org_and_user (#107619) 2025-07-04 17:19:53 +02:00
443ea5924c Eslint: Allow 'unset' in no-border-radius-literal lint rule (#106619)
* allow border radius of 0

* Prefer unset or initial over 0

* readme

* add an autofix for 0 -> unset

* replace 0 with unset

* fix fixes tests

* fix snapshot

* Fix lint in SecretFormField

* fix unused cx
2025-07-04 15:43:48 +01:00
650abfd2ff Unified Storage: Remove distributor todo comment (#107623)
Remove todo
2025-07-04 12:59:22 +00:00
6bb74ff56a unistore: add key validation (#107622) 2025-07-04 12:52:24 +00: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
dcb853d309 Unified Search: Remove resource-server-specific methods from distributor (#107607)
* Remove resource-server-specific methods from distributor
* Remove BlobStoreServer interface implementation from distributor
2025-07-04 12:48:27 +02: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
c7374b6910 Alerting: Add Synthetic and IRM link cards (#107538) 2025-07-04 10:52:43 +02:00
15e1aa8855 SecretsManager: Introduce decrypt store (#107586)
Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>
Co-authored-by: Michael Mandrus <michael.mandrus@grafana.com>
Co-authored-by: PoorlyDefinedBehaviour <brunotj2015@hotmail.com>
2025-07-04 09:22:10 +01:00
20f30462ad DataSource: Support updating configs using UID (#107486) 2025-07-03 10:18:19 -07: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
185ce90a4b Jaeger: Enable jaegerBackendMigration feature toggle by default (#107526)
* Jaeger: Enable jaegerBackendMigration feature toggle by default

* fix test

* update old-arch test
2025-07-03 14:45:22 +01:00