* pkg/build: Add nocgo option (#112834)
Add nocgo option
(cherry picked from commit 2a0f149a63)
* CI: release windows no cgo (#112870)
* fix nocgo option
* set nocgo for windows and darwin
(cherry picked from commit 6b2b9bd7c2)
Alerting: Fix unmarshalling of GettableStatus to include time intervals (#112602)
* move test files into test-data
* add test for the bug
* populate time-intervals of gettableStatus config
(cherry picked from commit 5f9a51418c)
Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
* Auth: Fix render user OAuth passthrough (#111636)
* devenv: fix volumes section when sources don't contain one
* wip
* Working correctly with improvedExternalSessionHandling on
* Remove not needed lines
* Working with the old flow, tests
* Handle compatibility with the feature toggle, tests wip
* Tests
* Cleanup
* Address feedback
* Align tests
* Add comment
* Fix issue with session removal after the invalidation of tokens
* Remove commented out code
* clean up
(cherry picked from commit 53f4803e98)
* Skip gocyclo for TestIntegration_GetCurrentOAuthToken
Plugins: Dependencies do not inherit parent URL for preinstall (#111762)
dependencies dont inehrit parent url for preinstall
(cherry picked from commit 073338ec29)
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
Annotations: avoid IN on getAccessControlFilter if dashboardUID is present (#111213)
Annotations: avoid IN on getAccessControlFilter
(cherry picked from commit 975ba0bf8b)
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
Co-authored-by: maicon <maiconscosta@gmail.com>
Add index IDX_folder_org_id_parent_uid_uid (#110131)
* Add index IDX_folder_org_id_parent_uid
* Force index on Dashboard Permission Filter (MYSQL)
---------
(cherry picked from commit cfe73925cd)
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
Co-authored-by: maicon <maiconscosta@gmail.com>
Add permission role_id action index (#110125)
* Add permission role_id action index
* Drop permission role_id index
---------
(cherry picked from commit 99fc606e17)
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
Co-authored-by: maicon <maiconscosta@gmail.com>
CloudWatch: Use default region when query region is unset (#109089)
CloudWatch: use default region when region is unset
(cherry picked from commit 5f4097a159)
Co-authored-by: Isabella Siu <Isabella.siu@grafana.com>
Alerting: Fix bug where rules with identical mute/active intervals produced conflicting routes (#110935)
Alerting: Fix hash collision in NotificationSettings fingerprint
(cherry picked from commit fc3636acf2)
Co-authored-by: Alexander Akhmetov <me@alx.cx>
Recording rule fields were not being copied correctly when duplicating an alert rule. This manifests as missing `TargetDataSourceUID` fields from the `Record` part of the rule when rules in a group are re-ordered.
Added some additional tests to ensure we cover the generation of recording rules in tests and fixed the copying logic to ensure all fields are copied correctly.
(cherry picked from commit c73b3ccf6e)
Alerting: Add rule group name validation to the Prometheus conversion API (#108740)
Alerting: Add rule group name validation to the conversion API
(cherry picked from commit f969eb0277)
Co-authored-by: Alexander Akhmetov <me@alx.cx>
* 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>
* 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.
* 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>
* 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.
* 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>
* 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
* 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>