Commit graph

18860 commits

Author SHA1 Message Date
Tim Mulqueen
e0b2ccb061
Enable K8 Resources Endpoint again for Testing (#117876)
* Add some unit tests and enable sub resource so we can start testing manually on dev

* add test to verify auth headers are stripped when being forwarding requests to client

* add integration tests

* update test packages

* polish

* fix tests

* fix panic

* fmt

* white space

* add feature flag to routing of resources endpoint

* fix missing type

* update integration tests with correct feature flag

* fix test

* update other integration tests to use ff
2026-02-18 15:11:13 +01:00
Tania
c3051a0c67
Annotations: Rename legacyStorage to k8sRESTAdapter and add comments (#118273)
Annotation: Rename legacyStorage to k8sRESTAdapter and add comments
2026-02-18 14:07:05 +01:00
Roberto Jiménez Sánchez
263e0cca58
Provisioning: Add integration tests for empty path repositories (#117525)
test: Add integration tests for empty path repositories

Add comprehensive integration tests to verify empty path repository behavior:
- Single repository with empty path syncs from repository root
- Multiple repositories with empty path can coexist
- Dashboard ownership conflicts are properly detected and reported
- Folders are duplicated per repository (12 total for 2 repos)
- Dashboards remain unique to first repository (3 total)

This validates the feature that allows repositories to use empty paths
for syncing from the root directory, while properly handling resource
ownership conflicts between multiple repositories.

Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-18 12:00:55 +00:00
Ashley Harrison
c83ba68cd2
React 19: Add new feature toggle (#118358)
add new react 19 feature toggle
2026-02-18 11:36:36 +00:00
Georges Chaudy
dd37028512
zanzana: Fix batch check to split requests exceeding OpenFGA max checks limit (#118154)
add support for large batch check size
2026-02-18 12:15:06 +01:00
Ryan McKinley
88e1408a59
Choure: update badger (#118349)
update badger
2026-02-18 11:40:02 +01:00
Misi
e3ffcb21b6
IAM: Add fieldSelector support to ExternalGroupMapping (#118277)
* Add fieldSelector support to ExternalGroupMapping

* can add selectable fields in localstore

---------

Co-authored-by: Owen Smallwood <owen.smallwood@grafana.com>
2026-02-18 11:04:09 +01:00
Ryan McKinley
4fe7fb5b98
Chore: update gocloud.dev to v0.44.0 (#118342) 2026-02-18 09:11:22 +00:00
Mustafa Sencer Özcan
a7fbd486cd
chore: introduce migration status reader (#118077)
* chore: add migration status reader

* fix: ensure table exists

* fix: gen-go

* fix: remove backfill
2026-02-18 09:22:48 +01:00
Summer
c83cc8dc48
Data Sources: Update CODEOWNERS (#118330) 2026-02-17 17:25:11 -07:00
Josh Hunt
734aff632b
FS: Add prometheus metric for settings service fetch failures (#118224)
Track success/failure rates of settings service fetch attempts from the request config middleware with a new counter metric: grafana_frontend_settings_fetch_total{status="success"|"error"}.

Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-17 20:25:49 +00:00
Josh Hunt
8586c5530f
FS: Add per-tenant RudderStack configuration support (#118231)
Extend the frontend service request config to allow per-tenant RudderStack settings from the settings service, following the existing pattern for security settings. This enables each tenant to have independent analytics configuration.

Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-17 19:52:08 +00:00
Yuri Tseretyan
75e243d7a2
Alerting: Alias for structs from Alertmanager config (#118127)
refactor references to "github.com/prometheus/alertmanager/config"
2026-02-17 12:32:21 -05:00
Eric Shields
b49110279b
Secrets Keeper: Add backend routes for keeper pages (#118307)
Register GET routes for /admin/secrets/keepers and /admin/secrets/keepers/*
behind the secretsManagementAppPlatformUI feature flag with keepers-specific
RBAC permissions, so direct page loads serve the SPA instead of returning 404.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 17:54:17 +01:00
Daniele Stefano Ferru
3a98408efc
Provisioning: return warning instead of error when deleting non-existing file (#118296)
* Provisioning: return warning instead of error when deleting non-existing file

* fix integration tests
2026-02-17 16:37:29 +00:00
Gabriel MABILLE
0c82488359
grafana-iam: Restrict the rolebindings api to services for now (#118301) 2026-02-17 16:51:08 +01:00
Tania
aac8061faa
OpenFeature: Remove namespace validation for static provider (#118184)
* Validate namespace only for remote providers

* Add namespace validation test
2026-02-17 16:04:44 +01:00
Costa Alexoglou
c5604d6d64
feat: add explicit tracer header (#117686)
* feat: add explicit tracer header

* update-workspace

* chore: review feedback

* update workspace
2026-02-17 15:08:57 +01:00
Rafael Bortolon Paulovic
1c930cd665
Unified: extract backend creation from server (#117177)
* Simplify unified storage client backend setup

* Gate storage backend creation by storage type

* Allow unified grpc storage without backend

* refactor(unified): ProvideStorageBackend before unified service

* refactor(unified): implement ProvideStorageBackend and provide backend before service

* Fix issues after merge

* simplify changes

* fix missing reference

* fix tests

* fix lint and add comment to NewStorageBackend

* start service in test

* separate module for unified backend

* Stop unified backend after grpc

* Fix tests

* Shutdown backend last

* Do not reply on ishealthy after shutdown started

* Cleanup a bit the code

* Init backend at register time

* Do not change health checks for now

* re-add storage metrics

* check for nil on testinfra sql.NewStorageBackend

* add tracer for backend and set max_open_conn in test

* address claude review

* make distributor an idle server

* ensure server is created in test
2026-02-17 13:59:21 +01:00
Igor Suleymanov
ccaf8685b4
App Platform: Add dry-run support to DualWriter (#118217)
* Add dry-run support to app platform storage operations

What
- Added dry-run check in folder_storage.go to skip permission side effects during dry-run operations
- Added dry-run handling in dualwriter.go for Create, Delete, Update, and DeleteCollection methods
- When dry-run flag is set, operations delegate directly to unified storage which properly handles dry-run via DryRunnableStorage
- Added comprehensive test suite in dualwriter_dryrun_test.go covering all dual-writer modes (1-3) for all operation types
- Added integration test in folders_test.go (TestIntegrationFolderDryRun) validating dry-run behavior across modes

Why
- Dry-run operations must not have side effects (no permissions, no actual writes)
- Unified storage already implements correct dry-run semantics via DryRunnableStorage
- Legacy storage does not properly handle dry-run, so bypassing it ensures correctness
- Aligns dualwriter behavior with Kubernetes API semantics for dry-run requests
- Ensures data consistency and prevents unintended state changes during dry-run validation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* DualWriter: Wrap objInfo in Update dry-run path for Mode1/Mode2

What:
- Apply wrappedUpdateInfo translation in the Update dry-run path when
  readUnified is false (Mode1/Mode2), matching the normal path behavior
- Add tests verifying wrapping behavior per mode

Why:
- In Mode1/Mode2, clients read from legacy storage and send legacy
  UID/resourceVersion. The dry-run path was sending these directly to
  unified storage, which would fail with precondition mismatches. The
  normal path already wraps objInfo to clear UID/RV/preconditions for the
  secondary store — the dry-run path must do the same.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-02-17 14:03:11 +02:00
Sonia Aguilar
156b758ea6
Alerting: Fix 'too many SQL variables' when deleting large rule groups (#118238)
fix Fix 'too many SQL variables' when deleting large rule groups
2026-02-17 11:58:39 +00:00
Andres Martinez Gotor
83c3ea3c89
Plugins: Allow to set multiple plugin directories to load (#117757) 2026-02-17 10:42:53 +01:00
Daniele Stefano Ferru
599d197493
Provisioning: don't allow folders to be created through files (#118255)
* Provisioning: don't allow folders to be created through files

* better message

* adding integration tests
2026-02-17 10:41:52 +01:00
Lauren
fbb7ce75b8
Alerting: Add alertingAlertsActivityBanner FT to backend (#118057)
* add alertingAlertsActivityBanner FT to backend

* revert uneeded changes

* run make gen-feature-toggles

* run make run-apps
2026-02-17 10:22:13 +01:00
Ryan McKinley
3b349e30a6
Testdata: Update query type examples and OpenAPI (#118242) 2026-02-17 11:38:55 +03:00
Matheus Macabu
b0a78233c8
CloudMigrations: Fix flaky test query status with sync (#118236) 2026-02-17 09:18:50 +01:00
Stephanie Hingtgen
faf1c4e8ae
Dashboards: Add tracing to conversions (#118237)
Some checks are pending
Integration Tests / Postgres Enterprise (7/16) (push) Blocked by required conditions
Integration Tests / Postgres Enterprise (8/16) (push) Blocked by required conditions
Integration Tests / Postgres Enterprise (9/16) (push) Blocked by required conditions
Integration Tests / All backend integration tests complete (push) Blocked by required conditions
publish-technical-documentation-next / sync (push) Waiting to run
Reject GitHub secrets / reject-gh-secrets (push) Waiting to run
Build Release Packages / setup (push) Waiting to run
Build Release Packages / Dispatch grafana-enterprise build (push) Blocked by required conditions
Build Release Packages / / darwin-amd64 (push) Blocked by required conditions
Build Release Packages / / darwin-arm64 (push) Blocked by required conditions
Build Release Packages / / linux-amd64 (push) Blocked by required conditions
Build Release Packages / / linux-armv6 (push) Blocked by required conditions
Build Release Packages / / linux-armv7 (push) Blocked by required conditions
Build Release Packages / / linux-arm64 (push) Blocked by required conditions
Build Release Packages / / linux-s390x (push) Blocked by required conditions
Build Release Packages / / windows-amd64 (push) Blocked by required conditions
Build Release Packages / / windows-arm64 (push) Blocked by required conditions
Build Release Packages / Upload artifacts (push) Blocked by required conditions
Build Release Packages / publish-dockerhub (push) Blocked by required conditions
Build Release Packages / Dispatch publish NPM canaries (push) Blocked by required conditions
Build Release Packages / notify-pr (push) Blocked by required conditions
Run dashboard schema v2 e2e / dashboard-schema-v2-e2e (push) Waiting to run
Shellcheck / Shellcheck scripts (push) Waiting to run
Run Storybook a11y tests / Detect whether code changed (push) Waiting to run
Run Storybook a11y tests / Run Storybook a11y tests (light theme) (push) Blocked by required conditions
Run Storybook a11y tests / Run Storybook a11y tests (dark theme) (push) Blocked by required conditions
Swagger generated code / Detect whether code changed (push) Waiting to run
Swagger generated code / Verify committed API specs match (push) Blocked by required conditions
Dispatch sync to mirror / dispatch-job (push) Waiting to run
Trivy Scan / trivy-scan (push) Waiting to run
2026-02-16 20:26:35 +00:00
Alexa Vargas
808cf7e4f1
SuggestedDashboards: dashvalidator app - Add Prometheus Support (#115769)
Dashboard Validator App - Prometheus support

Validates dashboard compatibility with Prometheus datasources. The app analyzes dashboard queries against                             available metrics to produce a compatibility score.                                              

Backend (Go):
- App scaffolding with grafana-app-sdk, custom `/check` endpoint
- Prometheus validator: parses PromQL queries, fetches available metrics, and computes per-query and per-datasource compatibility
- Metric caching, input validation, request timeouts, and structured error handling (not found, unreachable, auth, timeout)
- Custom authorizer with role-based access control
- Datasource-scoped validation and variable interpolation support

Frontend (React/TypeScript):
- API client for the validator backend
- Compatibility badge inline on community dashboards
- Detail modal showing per-datasource and per-query results
- Gated behind dashboardValidatorApp feature flag

Tests:
- Go unit tests for parser, fetcher, validator, and JSON serialization
- Dashboard query extraction tests
2026-02-16 20:06:35 +01:00
Roberto Jiménez Sánchez
2905aa0b63
Provisioning: Ignore git submodules (#118212)
Bump nanogit v0.3.5 with git module fixes
2026-02-16 18:48:56 +00:00
Tobias Skarhed
b612853a19
Reports: Add reportingV2Layouts feature flag to support v2 dashboard layouts (#118216)
Reports: Add reportingV2Layouts feature flag
2026-02-16 18:00:12 +00:00
Ashley Harrison
a6ad04bf0a
Chore: maybe fix integration tests (#118226)
* maybe fix integration tests

* no newline
2026-02-16 17:08:06 +00:00
Steve Simpson
a47ec50f1f
Alerting: Update historian.alerting app openapi+codegen (#118206) 2026-02-16 16:26:24 +01:00
Josh Hunt
544980d240
FS: Add QPS and Burst configuration for settings service (#118187)
Frontend: Add QPS and Burst configuration for settings service client

Make the settings service client's rate limiting configurable via INI/env vars, allowing operators to tune QPS (requests per second) and Burst without code changes.

Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-16 14:35:19 +00:00
Costa Alexoglou
eda64c644f
fix: status n subresource keyfunc (#118196) 2026-02-16 14:28:34 +00:00
Daniele Stefano Ferru
38f415c7d9
Provisioning: add finalizers if not present in repo test endpoint (#118188)
* Provisioning: add finalizers if not present in repo test endpoint

* use set finalizers func
2026-02-16 13:45:24 +01:00
Alex Khomenko
e10ff6b7cc
APIServer: Surface watch errors in the UI (#117983)
* APIServer: Surface watch errors in the UI

When watch API calls fail (e.g., for non-admin users), errors are now propagated through the Observable pipeline and displayed as toast notifications, preventing the UI from appearing stuck during bulk operations.

* pass error status

* Set error status on job when watch fails instead of clearing items

When a WebSocket watch fails, set the job's status to error with the
error message instead of clearing cached items. This keeps the job
in cache so JobContent renders the error naturally via onStatusChange,
rather than falling through to FinishedJobStatus which shows a
misleading "No job found" error.

* Add back admin-only watch restriction for testing

Temporarily limit watch subscriptions to admin users while testing
provisioning repositories. This needs to be removed later.

* Use ErrorPermissionDenied and add clarifying comments

- Map SubscribeStreamStatusPermissionDenied to centrifuge.ErrorPermissionDenied
  (code 103) instead of ErrorUnauthorized for correct semantics
- Document why RxJS retry is not needed on the live channel path
- Document the listJob onError cache mutation logic

* Simplify createOnCacheEntryAdded error handling

Remove notification logic and dispatch from the error handler.
Consumers now own error handling entirely via the onError callback.

* Remove admin-only watch restriction

Remove the temporary admin-only gate on watch subscriptions that was
used for testing.
2026-02-16 14:23:11 +02:00
Ashley Harrison
7f915ecd1e
FS: don't set namespace if "" (#118192)
don't set namespace if ""
2026-02-16 11:57:31 +00:00
Josh Hunt
4e48bed061
Settings: Add more spans to settings service client (#118164) 2026-02-16 11:20:30 +00:00
Misi
bcc238cf78
IAM: Improve authz members endpoint (#118085)
* Improve authz members endpoint

* Change /members check to VerbGetPermissions

* Align rest_members_test

* Remove the unnecessary check
2026-02-16 10:59:58 +01:00
Alyssa Joyner
5b094a6e15
InfluxDB: Mark unauthenticated error as downstream for flightsql (#118137)
* Mark unauthenticated error as downstream for flightsql in influxdb

* Lint
2026-02-16 09:33:28 +00:00
Ryan McKinley
22b24e57f6
Alerting: Update historian client with openapi from k8s 0.5 (#117991) 2026-02-16 12:07:08 +03:00
xavi
9a4ac452e4
IAM: Set userId in context logs from ErrTokenNeedsRotation (#118066) 2026-02-16 08:52:50 +00:00
Daniele Stefano Ferru
3f6518806f
Provisioning: enforce finalizers on resources not marked for deletion (#118078)
* Provisioning: enforce finalizers on resources not marked for deletion

* fixing integration tests

* fixing integration tests

* fixing integration tests

* fixing integration tests once again
2026-02-16 08:36:38 +01:00
Gonzalo Trigueros Manzanas
45f14bc5ab
Provisioning: Return Forbidden if quota is exceeded in files endpoints (#117997)
* provisioning: check quota on files API requests

* provisioning: add integration test for files quota checks

* provisioning: delete AI generated comment that's not adding much
2026-02-16 08:30:22 +01:00
Victor Cinaglia
54c16ea2da
testinfra: Add GlobalUserQuota option to GrafanaOpts (#118128)
testinfra: add GlobalUserQuota option to GrafanaOpts
2026-02-13 19:57:15 -03:00
Steve Simpson
df822ffc3f
Alerting: Prototype global notification history view. (#118074)
Some checks failed
Integration Tests / Postgres Enterprise (9/16) (push) Blocked by required conditions
Integration Tests / All backend integration tests complete (push) Blocked by required conditions
Reject GitHub secrets / reject-gh-secrets (push) Waiting to run
Build Release Packages / setup (push) Waiting to run
Build Release Packages / Dispatch grafana-enterprise build (push) Blocked by required conditions
Build Release Packages / / darwin-amd64 (push) Blocked by required conditions
Build Release Packages / / darwin-arm64 (push) Blocked by required conditions
Build Release Packages / / linux-amd64 (push) Blocked by required conditions
Build Release Packages / / linux-armv6 (push) Blocked by required conditions
Build Release Packages / / linux-armv7 (push) Blocked by required conditions
Build Release Packages / / linux-arm64 (push) Blocked by required conditions
Build Release Packages / / linux-s390x (push) Blocked by required conditions
Build Release Packages / / windows-amd64 (push) Blocked by required conditions
Build Release Packages / / windows-arm64 (push) Blocked by required conditions
Build Release Packages / Upload artifacts (push) Blocked by required conditions
Build Release Packages / publish-dockerhub (push) Blocked by required conditions
Build Release Packages / Dispatch publish NPM canaries (push) Blocked by required conditions
Build Release Packages / notify-pr (push) Blocked by required conditions
Run dashboard schema v2 e2e / dashboard-schema-v2-e2e (push) Waiting to run
Shellcheck / Shellcheck scripts (push) Waiting to run
Run Storybook a11y tests / Detect whether code changed (push) Waiting to run
Run Storybook a11y tests / Run Storybook a11y tests (light theme) (push) Blocked by required conditions
Run Storybook a11y tests / Run Storybook a11y tests (dark theme) (push) Blocked by required conditions
Swagger generated code / Detect whether code changed (push) Waiting to run
Swagger generated code / Verify committed API specs match (push) Blocked by required conditions
Dispatch sync to mirror / dispatch-job (push) Waiting to run
Documentation / Build & Verify Docs (push) Has been cancelled
publish-technical-documentation-next / sync (push) Has been cancelled
Trivy Scan / trivy-scan (push) Has been cancelled
Update Schema Types / bundle-schema-types (push) Has been cancelled
* Alerting: Prototype global notification history view.

Adds a view for notification history in the same style as the "History" page
used to view alert state history.

_Note this is a prototype and subject to change._

* resolve lint errors in notification history components

* add tests

* Deduplicate matcherToAPIFormat and reuse matcherToOperator

* Add missing i18n strings in NotificationsListSceneObject

* use stringifyErrorLike

* fix circular dependency

---------

Co-authored-by: Sonia Aguilar <soniaaguilarpeiron@gmail.com>
2026-02-13 19:30:50 +00:00
Yuri Tseretyan
a496b128c7
Alerting: Remove ReceiverStatus and IntegrationStatus aliases (#118049)
* rename Receiver to ReceiverStatus
* remove alias and update imports
* remove alias for IntegrationStatus
2026-02-13 19:30:32 +00:00
Mihai Turdean
74d146aa37
IAM: Wire RoleBinding storage backend into MT IAM API server (#118032)
Serve rolebindings the MT IAM API Server
2026-02-13 12:25:04 -06:00
Ashley Harrison
aaaeb13d32
FS: Add OpenFeature scaffolding and local setup (#117904)
* add openfeature handling + local env to frontend-service

* remove react18 manifest that was accidentally added

* fix and add some more unit tests

* review changes

* remove comment from frontend_service

* translations...
2026-02-13 18:14:36 +00:00
Gonzalo Trigueros Manzanas
550d8ab565
Tests: update connection max time out (#118098)
tests: set max connection time
2026-02-13 17:51:37 +01:00