* Alerting: Fix and stabilize saved searches E2E tests
Stabilizes the saved searches E2E tests by ensuring correct feature
toggles are enabled and improving the data cleanup logic.
Previously, `clearSavedSearches` relied on clearing localStorage, which
was insufficient as saved searches are persisted server-side via the
UserStorage API. The cleanup now correctly invokes the UserStorage API.
Changes:
- Add `alerting` project to Playwright configuration with authentication
- Enable `alertingListViewV2`, `alertingFilterV2`, and `alertingSavedSearches` toggles in tests
- Update `clearSavedSearches` helper to use UserStorage API for reliable cleanup
- Improve test selectors to use more robust `getByRole` and `getByText` queries
- Update `SavedSearchItem` to merge `aria-label` into `tooltip` for consistency
* Fix saved searchers unit tests
* Show different badge for converted prometheus provisioned resource
* Update contact points and templates to populate provenance
* Update notification policies
* Handle non k8s contact point in ContactPointHeader
* Fix provenance check in enhanceContactPointsWithMetadata
* Update translations
* Fix unused import
* Refactor provenance enum
* Derive provisioned status from provenance in Route type
* Remove unused imports
* Treat PROVENANCE_NONE as no provenance in isRouteProvisione
* Rename KnownProvenance.None to .Empty to avoid confusion
* Change copy text for resources with converted_prometheus provenance
* Derive provisioned status from provenance in GrafanaManagedContactPoint
* Fix linter errors
* Extract helper method to check if contact point is provisioned
* Replace string literal with constant
* Refactor KnownProvenance enum values
Refactored the KnownProvenance enum to better reflect the known provenances defined by the backend.
Also refactored the methods where we assert if a resource is provisioned to better reflect the cases for which a provenance value reflects no provisioning.
A resource is considered not provisioned when the provenance is equal to '', 'none' or undefined.
* Use provenance to infer provenance status for Templates
Refactored useNotificationTemplateMetadata to use only provenance value, and extracted method used to assert if resource is provisioned or not to k8s/utils in order to be more resource agnostic.
* Replace empty string with 'none' for KnownProvenance enum
The empty string valye for provenance gets mapped to the string literal 'none' before being passed down in the api response, therefore we can use only 'none'
* Replace PROVENANCE_NONE with KnownProvenance.None
Replaced the constant PROVENANCE_NONE with the KnownProvenance.None enum value since the values where duplicated
* Fix JSDoc
* Change copy text for ProvisioningBadge
* Add missing tooltip in notification policy badge
* Add missing tooltip in TemplatesTable badge
* fix conflicts
---------
Co-authored-by: Sonia Aguilar <33540275+soniaAguilarPeiron@users.noreply.github.com>
Co-authored-by: Sonia Aguilar <soniaaguilarpeiron@gmail.com>
* feat(cloud-monitoring): add support for Google Cloud universe_domain (#110083)
This change introduces support for Google Cloud's `universe_domain`, enabling connections to sovereign cloud environments with custom API endpoints.
- Adds an optional "Universe Domain" field in the Google Cloud Monitoring data source configuration (frontend and backend).
- Allows specifying a custom API domain (e.g., `s3nsapis.fr`) for use in sovereign environments.
- Defaults to `googleapis.com` to ensure backward compatibility for existing configurations.
Signed-off-by: Andreas Christou <andreas.christou@grafana.com>
* Minor docs update
* Doc updates
* Update editor
* Update docs/sources/datasources/google-cloud-monitoring/_index.md
Co-authored-by: Larissa Wandzura <126723338+lwandz13@users.noreply.github.com>
* Lint
* Review
---------
Signed-off-by: Andreas Christou <andreas.christou@grafana.com>
Co-authored-by: Larissa Wandzura <126723338+lwandz13@users.noreply.github.com>
* fix(grafana-data): copy theme schema json to types so declaration resolves
* refactor(grafana-data): move node scripts out of source code
* feat(grafana-data): generate types for theme schema
* chore(codeowners): update for grafana-data/scripts file move
* feat(grafana-data): put back copy plugin for theme json files
* revert(grafana-data): remove definition output
* feat(grafana-data): make builds great again
* minor tidy up
---------
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* feat(unified): add bm25 index scoring model
We want try BM25 scoring model since they have global scoring which we can probably re-use for fan-in/fan-out logic
32d98823c4/docs/scoring.md (global-scoring)
* fix(plugins): update plugin test data
* Extensons: Make links use openInNewTab API
* Use openInNewTab api correctly in the UI
* Bump scenes
* Fx circular dep
* test
* Revert "test"
This reverts commit 8784a7992c.
- add new feature flag to support enabling the dispatcher sync timer on the alertmanager
- this attempts to synchronize the flushes across HA nodes to decrease amount of duplicate notifications
---------
Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
* Alerting: Support backend filtering for folder search
Updates the Grafana managed rules API and filter logic to support
server-side filtering by folder (namespace).
Changes:
- Add `searchFolder` parameter to `getGrafanaGroups` API endpoint
- Map filter state `namespace` to `searchFolder` in backend filter
- Disable client-side namespace filtering when backend filtering is enabled
- Update tests to verify correct behavior for folder search with backend filters
* Add missing property in filter options
* Update tests
* POC ssingle AM
* wip
* add query param ?version=2
* wip2
* wip3
* Update logic
* update badges and tests
* remove unsused import
* fix: update NewReceiverView snapshots to include version field
* update translations
* fix: delegate version determination to backend for new integrations
- Remove hardcoded version: 'v1' from defaultChannelValues
- Reset version to undefined when integration type changes
- Backend uses GetCurrentVersion() when no version is provided
- Update snapshots to reflect version handling changes
- Remove unused getDefaultVersionForNotifier function
* update snapshot
* fix(alerting): fix contact point form issues
- Fix empty info alert showing when notifier.dto.info is undefined
- Fix options not loading for new contact points by using default creatable version
* fix(alerting): only show version badge for legacy integrations
* update tests for version badge and getOptionsForVersion changes
* docs: add comment explaining currentVersion field in NotifierDTO
* Show user-friendly 'Legacy' label for legacy integrations
- Replace technical version strings (v0mimir1, v0mimir2) with user-friendly labels
- v0mimir1 -> 'Legacy', v0mimir2 -> 'Legacy v2', etc.
- Technical version is still shown in tooltip for reference
- Add getLegacyVersionLabel() utility function
- Update tests for badge display and utility function
* Add v0mimir2 to test mock for Legacy v2 badge test
* hasLegacyIntegrations now uses isLegacyVersion
- Accept notifiers array to properly check canCreate: false
- No longer relies on version string comparison (v1 check)
- Uses isLegacyVersion for consistent legacy detection
- Update tests to pass notifiers and test correct behavior
* update translations
* GrafanaBootData: decouple `config.apps` from boot data IV
* chore: changed to openfeature flags eval
* chore: updates after PR feedback
* chore: updates after PR feedback
* chore: copy types to runtime package
* chore: add code ownership
* chore: deprecate in interface too
* chore: add important notice to comments
* chore: deprecate the whole interface
* Chore: set -e line in packaging/docker/run.sh
* Chore: fix ShellCheck SC2188 in packaging/docker/run.sh
* Chore: fix ShellCheck SC2166 in packaging/docker/run.sh
* docs: improve RBAC and role creation documentation
- Clarify that file-based RBAC provisioning is for self-managed instances only
- Distinguish between Grafana Admin (Server Admin) and Org Admin
- Remove incorrect UI instructions for custom role creation
- Add Terraform example for creating custom roles and assignments
* Apply suggestions from code review
Co-authored-by: Anna Urbiztondo <anna.urbiztondo@grafana.com>
---------
Co-authored-by: Anna Urbiztondo <anna.urbiztondo@grafana.com>
* descritpion and transformations
* add fieldMinMax to schema
* add nullValueMode to schema
* convert actions
* disabled prop in transformations
* update
* fix
* gauge
* remove index (deprecated) and decimals as strings
* gofmt
* codegen
* lint
* open api
* convert all theme files to json
* automatically discover extra themes in go backend
* use zod
* error tidy up
* error tidy up p2
* generate theme json schema from zod
* generate theme list at build time, don't do it at runtime
* make name and id required in the theme schema
Fixes the issue where typing in the label value dropdown would display
all values instead of filtering them based on the search input.
The bug was in `createAsyncValuesLoader` which was ignoring the
`valueQuery` parameter and returning all combined values instead of
the filtered subset.
Changes:
- Rename `_inputValue` parameter to `valueQuery` to indicate it should be used
- Filter combined values based on case-insensitive search query
- Return only filtered values instead of all values
Tests:
- Add test to verify correct values are shown for each label key
- Add test to verify search filtering works correctly
- Improve test infrastructure with proper portal container and element mocking
for virtualized dropdown rendering
chore: remove unifiedStorageSearchSprinkles feature flag
The feature flag is no longer needed because:
- OSS: usageinsights code doesn't exist in OSS builds
- Enterprise On-Prem: uses local SQL storage when enable_search=true
- Cloud: explicitly configures sprinkles_api_server URL
The sprinkles functionality now works automatically based on:
- enable_search config (enforced true for unified storage mode 5)
- sprinkles_api_server config (empty = local storage, set = remote API)
fix: handle resource version conflicts in connection CRUDL test
After updating a connection resource, the controller may update the
resource status, changing the resource version. This causes the delete
operation to fail with a resource version conflict.
Add retry logic to handle conflicts gracefully by retrying the delete
operation when encountering resource version conflicts.
Dashboard Outline: Fix navigation to repeated panels and lazy-loaded repeats
- Remove cursor: not-allowed styling from repeated panels in outline
- Add RepeatsUpdatedEvent to notify when panel repeats are populated
- Subscribe to RepeatsUpdatedEvent in DashboardEditPane to refresh outline
- Remove memoization from visibleChildren to ensure outline updates on re-render
* initial commit
* add support of integerts
* finialise the static provider
* minor refactoring
* the rest
* revert: the rest
* add new thiongs
* more tests added
* add ff parsing tests to check if types are handled correctly
* update tests according to recent changes
* address golint issues
* Update pkg/setting/setting_feature_toggles.go
Co-authored-by: Dave Henderson <dave.henderson@grafana.com>
* fix rebase issues
* addressing review comments
* add test cases for enterprise
* handle enterprise cases
* minor refactoring to make api a bit easier to debug
* make test names a bit more precise
* fix linter
* add openfeature sdk to goleak ignore in testutil
* Remove only boolean check in ff gen tests
* add non-boolean types top the doc in default.ini and doc string in FeatureFlag type
* apply remarks, add docs to sample.ini
* reflect changes in feature flags in the public grafana configuration doc
* fix doc formatting
* apply suggestions to the doc file
---------
Co-authored-by: Dave Henderson <dave.henderson@grafana.com>
* WIP: mutator added, start working on validator
* first validator iteration
* second validator iteration
* wip: working on integration tests
* re-working mutation and validation, using Connection interface
* fixing some rebase things
* fixing integration tests
* formatting
* fixing unit tests
* k8s codegen
* linting
* moving tests which are available only for enterprise
* addressing comments: using repo config for connections, updating tests
* addressing comments: adding some more info in the app and installation
* fixing app data
* addressing comments: updating connection implementation
* addressing comments
* formatting
* fixing tests
* added troubleshooting guide
* cleaned up the intro doc
* cleaned up the before you begin section in the configure doc
* changed a note to a tip
* changed to troubleshooting for cohesion
* final edits
* minor clean up item
* added note about Kerberos not being supported in Cloud
* punctuation fixes
* Provisioning: Add fieldSelector for Repository by spec.connection.name
This change adds the ability to filter repositories by their connection
name using Kubernetes field selectors, enabling queries like:
kubectl get repositories --field-selector spec.connection.name=my-connection
Implementation:
- Add RepositoryGetAttrs and RepositoryToSelectableFields functions
- Register field label conversion for spec.connection.name in InstallSchema
- Extend generic storage to support custom selectable fields via
NewRegistryStoreWithSelectableFields
- Add unit tests for repository field functions
- Add integration tests for field selector functionality
* Simplify predicateFunc handling with custom attrFunc
Remove unnecessary custom predicateFunc wrapper when using a custom
GetAttrs function. When attrFunc is provided via StoreOptions, passing
nil for predicateFunc allows the default behavior to create the
appropriate SelectionPredicate automatically.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
* Implement hierarchical error handling for folder creation failures
This commit implements hierarchical error handling to improve sync robustness
when folder creation fails. Instead of failing the entire sync, the system now:
1. Tracks failed folder creations and automatically skips nested resources
2. Records skipped resources with FileActionIgnored (doesn't count toward error limits)
3. Allows other folder hierarchies to continue processing
4. Prevents folder deletion when child resource deletions fail
Key Changes:
- Add PathCreationError type to track which folder path failed
- Modify progress recorder to automatically detect and track failures via Record()
- Add IsNestedUnderFailedCreation() and HasFailedDeletionsUnder() checks
- Update full and incremental sync to skip nested resources after folder failures
- Deletions proceed even if parent folder creation failed (resource may exist from previous sync)
- FileActionIgnored results don't count toward error limits
Example behavior improvement:
Before: /monitoring folder creation fails → all nested resources fail → other folders never processed
After: /monitoring folder creation fails → nested resources ignored → /applications folder succeeds
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* provisioning: refactor hierarchical errors in folder management.
* Move test to the corresponding package
* Refactor timeout handling in applyChanges functions
- Introduced wrapWithTimeout function to streamline timeout context management for applyChange calls.
- Updated applyFoldersSerially and applyIncrementalChanges to utilize the new timeout wrapper.
- Removed redundant logging and error handling code related to timeout in favor of centralized handling in wrapWithTimeout.
- Adjusted test expectations to reflect changes in error reporting for context deadlines.
---------
Co-authored-by: Roberto Jimenez Sanchez <roberto.jimenez@grafana.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
* chore(gdev-dashboard): reproduce CSS layout bug in a panel
* fix(table-legend): tweak CSS for right oriented table legend in piechart
* chore(gdev-dashboard): update migrated dashboard file to match
* refactor: change GetReceiver to get by UID
to avoid conversions of name to uid back an forth
* refactor: consolidate all encrypt\decrypt functions
* move error from temporary location
Implements support for the defaultPath field in Scope specifications
* Faster performance: Batch API call (fetchMultipleScopeNodes) replaces N sequential calls
* Instant selector opening: Pre-fetches all path nodes when applying scopes
* Consistent resolution: Single source of truth for scopeNodeId and parentNodeId across UI and URLs
* Correct URL syncing: scope_node parameter always reflects the canonical defaultPath
* Backwards compatible: Gracefully falls back when defaultPath is unavailable
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Tobias Skarhed <tobias.skarhed@gmail.com>
* Add awareness of a parent when toggletip is rendered to work inside other modals
* switch modal + drawer to use floating-ui's focus trapping
* remove outdated docs
* fix some unit tests
* fix scopes tests
* remove duplicate aria-label
* kick CI
* fix e2e tests
---------
Co-authored-by: tdbishop <thomas.bishop@grafana.com>
* fix(unified): default index path to ephemeral storage mount path
Signed-off-by: Rafael Paulovic <rafael.paulovic@grafana.com>
* Revert "fix: use memory index if index file already open (#115720)"
This reverts commit dc4c106e91.
* fix(unified): set index_path for tests
* chore(unified): re-add bolt open timeout and test for error handling
* chore(unified): return err on timeout
* chore(unified): revert changes to default, use DataPath if index_path not set
* chore(unified): add defaults.ini entry for unified_storage
This is needed to override using env. vars
* chore: revert unrelated diff
* chore: address code review comments
- reduce bolt timeout to 1s
- remove errIndexLocked err type
- add more information about index_path in defaults.ini
---------
Signed-off-by: Rafael Paulovic <rafael.paulovic@grafana.com>
* Add connection operator with health check updates
- Add ConnectionController to watch and reconcile Connection resources
- Add ConnectionStatusPatcher for updating connection status
- Add connection_operator.go entry point for standalone operator
- Register connection operator in pkg/operators/register.go
- Add connection controller to in-process setup in register.go
- Add unit tests for connection controller
- Add integration tests for health check updates
* Fix integration test: get latest version before update to avoid conflicts
* refactor: move repoFactory to operator-specific configs
- Remove repoFactory from shared provisioningControllerConfig
- Add repoFactory to repoControllerConfig and jobsControllerConfig
- This allows connection operator to run without repository setup
* Remove unneccesary comments
- Add containsTabsLayout helper function to check if child layouts contain tabs
- Update DashboardLayoutSelector to disable tabs option when children contain tabs
- Show different tooltip message for parent vs child tabs nesting scenarios
- Add tests for the new functionality
* feat(provisioning): add /connections/{name}/repositories endpoint
Add a new subresource endpoint to list external repositories from git
providers (GitHub, GitLab, Bitbucket) accessible through a connection.
Changes:
- Add ExternalRepositoryList and ExternalRepository types with Name, Owner, and URL fields
- Create connection_repositories.go connector (returns 'not implemented' for now)
- Register storage and authorization for the repositories subresource
- Update OpenAPI documentation
- Regenerate code (deepcopy, openapi, client)
The endpoint is accessible at /apis/provisioning.grafana.app/v0alpha1/namespaces/{namespace}/connections/{name}/repositories
and requires admin read access.
Related: #TBD
* test(provisioning): add unit and integration tests for connection repositories endpoint
- Add unit tests for connection_repositories connector
- Add integration tests for authorization and endpoint behavior
- Tests verify not implemented response and proper authorization
* Fix generation
* fix(tests): fix test compilation and assertions
- Remove unused import in unit test
- Fix integration test Raw() usage
- Fix ExternalRepositoryList type verification test
* Format code
* fix(provisioning): fix ineffectual assignment in connection_repositories connector
- Add debug log statement to use logger variable
- Fixes linter error about ineffectual assignment to ctx
Removes Bootstrap v2.3.2 files that are not used in the codebase
but are flagged by security vulnerability scanners.
Changes:
- Removed public/vendor/bootstrap/ directory
- Removed public/vendor/tagsinput/bootstrap-tagsinput.js
- Removed .bootstrap-tagsinput CSS block from public/sass/_angular.scss
These files were replaced by modern React components during the
Angular to React migration. The TagsInput functionality is now
provided by packages/grafana-ui/src/components/TagsInput/TagsInput.tsx.
Bootstrap v2.3.2 (from 2013) has known CVEs but poses no actual risk
since the files are not loaded or executed. This change eliminates
false-positive security scan alerts.
Evidence:
- No import statements found for these files
- No script tags loading bootstrap.js
- No webpack bundling of vendor files
- Modern React TagsInput component in use
- Last modified: June 2022 (security patch only)
* feat(unified): migration at startup based on resource count
-- draft
* feat: introduce auto migration enablement for dashboards & folders
* feat: enable auto migration based on threshold
* fix: improve
* fix: pass in the auto migrate per migration definition
* fix: minor
* fix: only use one options
* fix: test
* fix: test
* fix: tests
* fix: simplify configs
* chore: rename
* fix: add integration test
* fix: add integration test
* fix: integration tests
* chore: add comments
* fix: address comment
* fix: address comments
* fix: test and auto migration flow
* fix: test
---------
Co-authored-by: Rafael Paulovic <rafael.paulovic@grafana.com>
* hide data source managed options in the more menu in the list view
* Hide type selector in the new alert form when no data source has mangeAlerts enabled
* extra data source read methods
* update tests
* more tests
* fix more tests; actually initialize retriever instead of sending nil
* moving GetAllDataSources isn't strictly required, so keep to minimal changes
* better name for retriever logger
Co-authored-by: Dafydd <72009875+dafydd-t@users.noreply.github.com>
* add compile-time check for DS retriever impl
---------
Co-authored-by: Dafydd <72009875+dafydd-t@users.noreply.github.com>
Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
* Alerting: Display change message next to the rule version when exists
* Alerting: Update version history tests for message field
Updates test mocks and assertions to include message fields in version
history data. Adds three message examples to the mock handler and updates
test expectations to verify the Notes column displays correctly when
messages are present or absent.
---------
Co-authored-by: Konrad Lalik <konradlalik@gmail.com>
* feat(pyroscope): Exemplar support for series queries
use enum flag, add exemplar flag to explore
disable exemplars on explore as well
tests
feature toggle
fixing tests
* resolve conflicts
* lint
* Split best practices section
* Write Examples and Guides docs
* Move recording rule recommendations
* docs(alerting): new best practices guide
* fix vale errors
* Detail meaning of alert `escalation`
* Include the recovery threshold option
* Include lower severity channels for infrastructure alerts
* Remove timing options
* minor intro edits
* Rename heading to avoid gerunds
* Sparkline: Restore to a function component
* fix whitespace lint issue
* swap from clipPath to mask to help Safari
* Gauge: Fix SVG issues in Safari
* more steps in the right direction
* don't set filters which don't exist
* fix a couple other text and baseline stuff
* fix tests after changes
* clean up effects as follow-up to other PR
* fix issue with threshold bars, and also simplify non-gradient case
* Alerting: Update RuleGroupConfig definitions with missing fields
This update adds previously missing fields to the `RuleGroupConfig` structs to
ensure compatibility with external Prometheus-like rulers.
Includes:
- `labels`: per https://github.com/prometheus/prometheus/pull/11474
- `remote_write`: per https://github
.com/grafana/mimir/blob/56f33fed6254fee5a53bde1eab36c604863e3d5f/pkg/mimirtool/rules/rwrulefmt/rulefmt.go#L16
Note: This does not add full support in Grafana; it only allows these fields to
pass through the alerting proxy without causing unmarshal errors when using
external rulers.
* Update OpenAPI spec
* Secrets: changes to allow a 3rd party keeper / secret references
* fix test
* make gofmt
* lint
* fix tests
* assign aws secrets manager to @grafana/grafana-operator-experience-squad
* rename Keeper.Reference to Keeper.RetrieveReference
* rename ModelSecretsManager to ModelAWSSecretsManager
* validator: ensure that only one of keeper.Spec.Aws.AccessKey or keeper.Spec.Aws.AssumeRole are set
* move secrets manager dep / go mod tidy
* move secrets manager dep
* keeper validator: move 3rd party secret stores validation to their own functions
* add github.com/aws/aws-sdk-go-v2/service/secretsmanager pkg/extensions/enterprise_imports
* make update-workspace
* undo go.mod changes in /apps
* make update-workspace
* fix test
* add github.com/aws/aws-sdk-go-v2/service/secretsmanager to enterprise_imports
* make update-workspace
* gcworker: handle refs
* make update-workspace
* create toggle: FeatureStageExperimental
* allow features.IsEnabled for now
* format
* Plugins: Implement bug fix for loki label selectors w/ variable interpolation
* Chore: Add test to ensure result is interpolated
---------
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
* dashboard library check added
* community dashboard section tests in progress
* tests added
* translations added
* pagination removed
* total pages removed
* test updated. pagination removed
* filters applied
* tracking event removed to be created in another pr
* slug added so url is correclty generated
* ui fix
* improvements after review
* improvements after review
* more tests added. new logic created
* fix
* changes applied
* tests removed. pattern updated
* preset of 6 elements applied
* Improve code comments and adjust variable name based on PR feedback
* Fix unit test and add extra case for regex pattern
* Fix interaction event, we were missing contentKind on BasicProvisioned flow and datasources types were not being send
---------
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
Co-authored-by: alexandra vargas <alexa1866@gmail.com>
* Transformers: Add smoothing transformer
Added a smoothing transformer to help clean up noisy time series data.
It uses the ASAP algorithm to pick the most important data points while
keeping the overall shape and trends intact.
The transformer always keeps the first and last points so you get the
complete time range. I also added a test for it.
* Change category
Change category from Reformat to CalculateNewFields
* Remove first/last point preservation
* Fix operator recreation
* Simplify ASAP code
Include performance optimization as well
* Refactor interpolateFromSmoothedCurve
Break function into smaller focused functions and lift functions to the
top level
* Add isApplicable Check
Make sure the transformer is applicable for timeseries data
* Add tests for isApplicable check
* UI/UX improvements: Display effective resolution when limited by data points
Show "Effective: X" indicator when resolution is capped by the 2x data
points multiplier. Includes tooltip explaining the limit.
Memoizes calculation to prevent unnecessary recalculation on re-renders.
Example: With 72 data points and resolution set to 150, displays
"Effective: 144" since the limit is 72 x 2 = 144.
Plus added tests
* Improve discoverability by adding tags
* Preserve Original Data
Let's preserve original data as well, makes the UX so much better.
Changed from appending (smoothed) to frame names to use Smoothed frame name. This should match the pattern used by other transformers (e.g,. regression)
Updated tests accordingly
Updated tooltip note
* Add asap tests
Basic functionality:
* returns valid DataPoint objects
* Maintain x-axis ordering
Edge cases:
* Empty array
* single data point
* filter NaN values
* all NaN values
* sort unsorted data
* negative values
* Update dark and light images
* Clear state cache
* Add feature toggle
* Conditionally add new transformation to the registry
* chore: update and regenerate feature toggles
* chore: update yarn.lock
* chore: fix transformers and imports
* add support for skip TLS verify
* extract constructor for ExternalAMcfg and tests
* extract constructor for AlertmanagerConfig and tests
* add support for client cert auth
* chore(gdev-dashboard): minimal repro of escalation #19939 bug report
* fix(canvas): add branching logic to handle field mapping to icons case
* test(canvas): validate integration of canvas icon mappings
* refactor(resource-dimension): defensive against JS `undefined` in paths
* set panel level ds when converting from v2 to v1
* remove comment
* lint
* always set ds in sqr
* improve
* Apply suggestions from code review
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
---------
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
* Prometheus Dashboards: Use __rate_interval #110370 fix(prometheus): use in stats dashboard
* Added required changes to F:\grafana\public\app\plugins\datasource\prometheus\dashboards\prometheus_2_stats.json file
* removed empty line
* removed all steps
* OpenTSDB: Migrate metadata queries to data source backend
* OpenTSDB: Migrate annotations to the data source backend
* return errors for failed unmarshal
* remove trailing / from metadata requests
* remove console logs
* feat: add lock structure into bleve index files
* fix: another approach
* fix: new check
* fix: build in memory if index file already open
* fix: update workspace
* fix: add test
* refactor: update func signature
* fix: address comments
* fix: make const
* Suggestions: Add intermediate state to avoid unexpected saved states
* cleanup
* update and add e2es to confirm behavior
* fix some of the change dispatch
* codeowners
* fix js error that this exposed
* Apply suggestion from @fastfrwrd
* fix warning for VizRepeater styles
* Gauge: Update test dashboard to round two of the segment panels to whole numbers
* Gauge: E2E tests
* add test for sparklines
* Gauge: Change inner glow to be friendlier to our a11y tests
* remove unused CODEOWNER declaration
* expose text mode so that old displayName usage is somewhat preserved
* update migrations to use the value_and_text mode if displayName has a non-empty value
* more test cases
* update unit tests for fixture updates
* The builder query no longer runs if code mode query is empty. Remove checks for query being empty to run raw query.
* missed save
* prettier?
* Update public/app/plugins/datasource/elasticsearch/components/QueryEditor/BucketAggregationsEditor/state/reducer.ts
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
---------
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
* Clear selection on entering edit mode. Added test to verify selection is cleared when editing a panel.
* Update comment
---------
Co-authored-by: Haris Rozajac <58232930+harisrozajac@users.noreply.github.com>
* Add helper function to format numeric values in alert rule history
* Use formatting function in LogRecordViewer
* Refactor numerical formatting logic
* Handle edge cases when counting decimal places
* Cleanup tests and numberFormatter code
* V2: Panel datasource is defined only for mixed ds
* if getDatasourceFromQueryRunner only returns ds.type, resolve to full ds ref throgh ds service
---------
Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com>
* Dashboard: Add test case for BOM characters in link URLs
This test demonstrates the issue where BOM (Byte Order Mark) characters
in dashboard link URLs cause CUE validation errors during v1 to v2
conversion ('illegal byte order mark').
The test input contains BOMs in various URL locations:
- Dashboard links
- Panel data links
- Field config override links
- Options dataLinks
- Field config default links
* Dashboard: Strip BOM characters from URLs during v1 to v2 conversion
BOM (Byte Order Mark) characters in dashboard link URLs cause CUE
validation errors ('illegal byte order mark') when opening v2 dashboards.
This fix strips BOMs from all URL fields during conversion:
- Dashboard links
- Panel data links
- Field config override links
- Options dataLinks
- Field config default links
The stripBOM helper recursively processes nested structures to ensure
all string values have BOMs removed.
* Dashboard: Strip BOM characters in frontend v2 conversion
Add stripBOMs parameter to sortedDeepCloneWithoutNulls utility to remove
Byte Order Mark (U+FEFF) characters from all strings when serializing
dashboards to v2 format.
This prevents CUE validation errors ('illegal byte order mark') that occur
when BOMs are present in any string field. BOMs can be introduced through
copy/paste from certain editors or text sources.
Applied at the final serialization step so it catches BOMs from:
- Existing v1 dashboards being converted
- New data entered during dashboard editing
* add function to convert StateTransition to LokiEntry
* add QueryResultBuilder
* update backtesting to produce result similar to historian
* make shouldRecord public
* filter out noop transitions
* add experimental front-end
* add new fields
* move conversion of api model to AlertRule to validation
* add extra labels
* calculate tick timestamp using the same logic as in scheduler
* implement correct logic of calculating first evaluation timestamp
* add uid, group and folder uid they are needed for jitter strategy
* add JitterOffsetInDuration and JitterStrategy.String()
* add config `backtesting_max_evaluations` to [unified_alerting] (not documented for now)
* remove obsolete tests
* elevate permisisons for backtesting endpoint
* move backtesting to separate dir
What is this feature?
Add a config option to set data source to imported rules when X-Grafana-Alerting-Datasource-UID is not present.
Why do we need this feature?
Currently mimirtool requires passing --extra-headers 'X-Grafana-Alerting-Datasource-UID: {uid}' when used with Grafana. This config option allows to specify a default, which is used when the header is missing, making it easier to use and more similar to the case when it's used with Mimir.
* Gauge: Fit-and-finish tweaks to glows, text position, and sparkline size
* adjust text height and positions a little more
* cohesive no data handling
* more tweaks
* fix migration test
* Fix JSON formatting by adding missing newline
* remove new line
* Gauge: Add guide dots for rounded bars to help with accuracy
* 30% width
* remove spotlight, starting to make gradients a bit more predictable
* fix segmented
* update rotation of gauge color
* update i18n and migration tests
* fix spacing
* more fixture updates
* wip: using clip-path and CSS for drawing the gauge
* wip: overhaul color in gauge
* wip: progress on everything
* refactoring defs into utils
* its all working
* fixme comment
* fix backend migration tests
* remove any other mentions of spotlights
* one more tweak
* update gdev
* add lots of tests and reorganize the code a bit
* fix dev dashboard fixture
* more cleanup, optimization
* fix a couple of bugs
* fix bad import
* disable storybook test due to false positive
* a more sweeping disable of the color-contrast
* update backend tests
* update gradient for fixed color
* test all dark/light theme variants
* set opacity to 0.5 for dots
* move min degrees for start dot render to a const
* change endpoint marks to be configurable
* update gdev and fixtures
* i18n
* shore up testing a bit
* remove period for consistency
* hide glow at small angles
* more testing and cleanup
* addressing PR comments
* Update packages/grafana-ui/src/components/RadialGauge/colors.ts
Co-authored-by: Jesse David Peterson <jesdavpet@users.noreply.github.com>
* Update packages/grafana-ui/src/components/RadialGauge/colors.ts
Co-authored-by: Jesse David Peterson <jesdavpet@users.noreply.github.com>
* break out binary search stuff and write tests
* fix lint issues
---------
Co-authored-by: Jesse David Peterson <jesdavpet@users.noreply.github.com>
* error handling
* retry fetching suggestions
* add translation
* useAsyncRetry
* hasError test
* update error handling
* clean up the text panel stuff for the current version
* cleanup for loop
* some more tests for some failure cases
* fix lint issue
---------
Co-authored-by: Paul Marbach <paul.marbach@grafana.com>
* fix(legend-table): remove arbitrary 600px max width for full width cells
* test(legend-table): backfill test coverage for viz legend table
* test(legend-table): backfill test coverage for viz legend table item
* refactor(legend-table): use derived theme spacing, not hard-coded values
* update selected suggestion style
* update highlight styles for light theme, add inert to div
* remove commented-out original idea
---------
Co-authored-by: Paul Marbach <paul.marbach@grafana.com>
* Provisioning: Enable save for json model changes
* Do not pass props
* Simplify logic and fix warnings
* add tests
* Show diff for json changes
* Add try/catch
* Alerting: Add saved searches feature for alert rules page
Add ability to save, rename, delete, and apply search queries on the
Alert Rules page. Includes auto-apply default search on navigation
and UserStorage persistence.
Behind feature toggle `alertingSavedSearches` (disabled by default).
* Alerting: Add i18n translations for saved searches
* Alerting: Remove unused imports in saved searches
* Alerting: Add CODEOWNERS for e2e-playwright/alerting-suite
* Alerting: Add useSavedSearches mock to RulesFilter.v2 tests
* Alerting: Fix failing unit tests for saved searches
- Fix Jest mock hoisting issue in useSavedSearches.test.ts by configuring
UserStorage mock implementation after imports instead of inline
- Update SavedSearches.test.tsx to use findBy* queries for async popup content
- Fix tests to click apply button instead of text for applying searches
- Update maxLength test to verify attribute instead of trying to exceed it
* Alerting: Fix saved searches test mocking and assertions
- Fix UserStorage mock in useSavedSearches.test.ts by creating mock with
default Promise-returning functions inside jest.mock() factory, then
accessing the instance via getMockUserStorageInstance() helper
- Fix SavedSearches.test.tsx apply button tests to use correct accessible
name "Apply this search" (from tooltip) instead of dynamic aria-label
- Fix disabled button assertion to check native disabled attribute instead
of relying on aria-disabled which is set inconsistently by Button component
- Use findAllByRole for async popup content queries
* Alerting: Fix test query for disabled save button
Use findByText + closest instead of findByRole to find the disabled
"Save current search" button. The Grafana Button component renders
with conflicting accessibility attributes (disabled="" + aria-disabled="false")
which breaks role-based queries in React Testing Library.
* fix(alerting): preserve UserStorage mock reference before clearAllMocks
* fix(alerting): add missing test mocks for crypto and console
- Mock crypto.randomUUID for Node.js test environment
- Add console.error spy to tests expecting storage/parse errors
- Add console.warn spy to test expecting validation warnings
Fixes jest-fail-on-console failures and crypto.randomUUID TypeError.
* fix(alerting): add console.error spy to save failure test
* fix(alerting): address PR review feedback for saved searches
- Register alertingSavedSearches feature toggle in backend
- Extract shared types to SavedSearches.types.ts to fix circular dependencies
- Extract sub-components: InlineSaveInput, InlineRenameInput, SavedSearchItem
- Remove unused imports (IconButton, Input) and styles from SavedSearches.tsx
- Add try/catch for auto-apply default search error handling
- Remove maxLength validation and corresponding test
* fix(alerting): fix validation error display in saved searches
- Fix useEffect dependency array that was immediately clearing validation errors
- Remove error from deps so errors only clear when user types, not when set
- Run i18n-extract to remove unused error-name-too-long translation key
* fix(alerting): address PR review feedback for saved searches
- Replace toHaveBeenCalled assertions with UI verification using AppNotificationList
- Rename useSavedSearches.test.ts to .tsx for JSX support
- Update README documentation to reflect current test patterns
- Add test cleanup between E2E tests to prevent data leakage
* fix(alerting): remove unused import and fix test wrapper
- Remove unused locationService import from RulesFilter.v2.tsx
- Add missing bootData spread in useSavedSearches.test.tsx mock
- Add createWrapper to renderHook call for user-specific storage key test
* fix(alerting): add Redux wrapper to all useSavedSearches hook tests
All renderHook calls for useSavedSearches now include the createWrapper()
which provides the Redux Provider context required by useAppNotification.
* fix(alerting): use regex patterns in MSW handlers for UserStorage tests
MSW handlers now use regex patterns to match any namespace and user UID,
since UserStorage reads config values from internal imports that aren't
affected by jest.mock of @grafana/runtime.
* fix(alerting): mock UserStorage directly instead of using MSW
Replace MSW HTTP handlers with a direct mock of the UserStorage class.
The MSW approach failed because UserStorage evaluates config.namespace
at module load time, before jest.mock takes effect, causing the regex
patterns to not match the actual request URLs.
This follows the same pattern used in useFavoriteDatasources.test.ts.
* refactor(alerting): use react-hook-form and Dropdown for saved searches
- Migrate InlineRenameInput and InlineSaveInput to react-hook-form
- Replace custom PopupCard with Grafana Dropdown component
- Use useReducer for centralized dropdown state management
- Add stopPropagation handlers to prevent dropdown closing during form interactions
- Update tests to use real useSavedSearches hook with mocked UserStorage
- Consolidate and simplify saved searches test suite
* fix: resolve CI failures in SavedSearches component
- Fix TypeScript TS2540 errors by using MutableRefObject type for refs
- Fix form submission by using onClick instead of type="submit" on IconButton
(IconButton doesn't forward the type prop to the underlying button)
- Fix action menu tests by stopping click propagation on ActionMenu wrapper
- Fix Escape key handling by focusing the dialog element instead of the
potentially-disabled save button
* fix(alerting): add navTree to runtime mock in useSavedSearches tests
Add empty navTree array to the @grafana/runtime config mock to prevent
store initialization crash when buildInitialState() calls .find() on
undefined navTree.
* fix(alerting): add error handling for auto-apply default search
Wrap handleApplySearch call in try-catch to prevent unhandled exceptions
when auto-applying the default saved search on navigation.
* fix(alerting): prevent saved searches dropdown from closing when clicking action menu
The nested Dropdown components caused the outer SavedSearches dropdown to close
when clicking on action menu items (Set as default, Rename, Delete). This happened
because @floating-ui/react's useDismiss hook detected clicks on the inner Menu
(rendered via Portal) as "outside" clicks.
Fix: Replace the outer Dropdown with PopupCard and add custom click-outside
handling that explicitly excludes portal elements ([role="menu"] and
[data-popper-placement]). This matches the pattern used before the Dropdown
refactor.
Changes:
- SavedSearches.tsx: Use PopupCard instead of Dropdown, add click-outside handler
- SavedSearchItem.tsx: Add menuPortalRoot prop for action menu positioning
- RulesFilter.v2.tsx: Fix double analytics tracking on auto-apply
* fix(alerting): auto-apply default saved search on page navigation
The default saved search was not being applied when navigating to the
Alert rules page. This was caused by a race condition where `isLoading`
was `false` on initial render (status was 'not-executed'), causing the
auto-apply effect to run before saved searches were loaded.
Fix: Include the uninitialized state in the loading check so the effect
waits until data is actually loaded before attempting to auto-apply.
Also adds tests for the auto-apply functionality.
* fix(alerting): align action menu icon and improve saved search tests
- Fix vertical alignment of three-dot menu icon in saved search items
by adding flex centering to the wrapper div
- Add feature toggle setup/teardown in saved searches test suite
- Fix location mocking in test for URL search parameter handling
* refactor(alerting): improve saved searches validation and organization
- Rename SavedSearches.types.ts to savedSearchesSchema.ts
- Use react-hook-form's built-in validation instead of manual setError
- Change error handling to throw ValidationError instead of returning it
- Add type guard isValidationError for safe error checking
- Add alphabetical sorting for saved searches (default first)
- Replace console.warn/error with logWarning/logError for analytics
- Extract helper functions: sortSavedSearches, loadSavedSearchesFromStorage, hasUrlSearchQuery
* refactor(alerting): address PR review comments for saved searches (steps 9-12)
- Add comprehensive comment explaining useEffect double-render limitation
and potential future improvements for default search auto-apply (step 9)
- Add test documenting expected behavior when navigating back to alert list
after leaving the page - default filter is re-applied (step 10)
- Update RulesFilter.v2.test.tsx to use testWithFeatureToggles helper and
add MSW UserStorage handlers for future use (step 11)
- Update SavedSearches.test.tsx to use render from test/test-utils and
byRole selectors for menu items (step 12)
* test(alerting): update saved searches tests for refactored API
- Update mockSavedSearches order to match sorted output (default first, then alphabetically)
- Change validation error tests to use rejects pattern (saveSearch/renameSearch now throw)
- Add hasPermission mock to contextSrv for module-level permission check
* fix(alerting): fix CI failures for saved searches
- Update onRenameComplete type to match throw-based API (Promise<void>)
- Run i18n-extract to add missing translation keys
* fix(alerting): salvage valid entries when saved searches validation fails
Instead of returning an empty array when array validation fails,
iterate through each item and keep only the valid entries.
This prevents losing all saved searches if a single entry is corrupted.
* test(alerting): update test to expect valid entries to be preserved
Update the test assertion to match the new behavior where valid saved
search entries are preserved when some entries fail validation, rather
than discarding all entries.
* fix(alerting): eliminate double API request on saved search auto-apply
Move saved searches loading and auto-apply logic from RulesFilterV2 to
RuleListPage. This ensures the default search filter is applied BEFORE
FilterView mounts, preventing double API requests on initial page load.
- Load saved searches at RuleListPage level
- Gate RuleList rendering until saved searches are loaded
- Pass savedSearchesResult as prop to avoid duplicate hook calls
- Remove auto-apply tests from RulesFilter.v2.test.tsx (behavior moved)
* fix(alerting): mock useSavedSearches in RuleList.v2 tests
The useSavedSearches hook triggers async state updates that complete
after tests finish, causing React act() warnings. Mock the hook to
prevent async operations during tests.
* refactor(alerting): migrate saved searches tests to use MSW
Address code review feedback by migrating UserStorage tests from
jest.mock to MSW-based mocking:
- Add MSW helper functions (setAlertingStorageItem, getAlertingStorageItem)
to simplify test setup for UserStorage
- Migrate useSavedSearches.test.tsx to use MSW handlers instead of
jest.mock('@grafana/runtime/internal')
- Migrate RulesFilter.v2.test.tsx to use MSW handlers
- Update README documentation to accurately reflect how tests use MSW
- Add tests for default search auto-apply behavior in RuleListPage
- Simplify comments to be concise and accurate
* fix(alerting): mock UserStorage directly in useSavedSearches tests
The UserStorage class caches its storage spec at the instance level,
and the useSavedSearches hook creates the instance at module level.
This caused test isolation issues where cached state leaked between
tests, making all tests that depended on loading data fail.
Fix by mocking UserStorage class directly instead of relying on MSW
handlers. This gives each test explicit control over what getItem
and setItem return, ensuring proper isolation.
Also update persistence assertions to verify mock.setItem calls
instead of reading from MSW storage (which the mock bypasses).
* refactor(alerting): remove setup helper in SavedSearches tests
Replace the `setup()` helper function with direct `render()` calls
as suggested in PR review. This makes tests more explicit about
what component is being rendered and with what props.
* refactor(alerting): extract default search auto-apply into dedicated hook
Moves the default saved search auto-apply logic from useSavedSearches into
a new useApplyDefaultSearch hook. This improves separation of concerns by
keeping useSavedSearches focused on CRUD operations while the new hook
handles the page-level auto-apply behavior.
Key changes:
- Created useApplyDefaultSearch hook with session-based visit tracking
- Removed getAutoApplySearch method and user-specific session keys from useSavedSearches
- Exported loadDefaultSavedSearch utility for independent default search loading
- Simplified test mocks to use loadDefaultSavedSearch instead of full hook mocking
- Removed unused savedSearchesResult prop passing through component tree
* fix(alerting): improve default search auto-apply timing and test reliability
Replace react-use's auto-executing useAsync with internal useAsync hook
for better control over when default search is loaded. This prevents
race conditions and ensures the async operation only executes when needed.
Test improvements:
- Add proper session storage cleanup in beforeEach
- Use waitFor to handle async operations correctly
- Prevent visited flag from affecting subsequent tests
- Clear mock call history between tests
The internal useAsync hook doesn't auto-execute on mount, allowing us to
control exactly when the default search loads based on conditions rather
than relying on dependency array triggers.
---------
Co-authored-by: Konrad Lalik <konradlalik@gmail.com>
* feat(auth): add ExtraAudience option to RoundTripper
Add ExtraAudience option to RoundTripper to allow operators to include
additional audiences (e.g., provisioning group) when connecting to the
multitenant aggregator. This ensures tokens include both the target API
server's audience and the provisioning group audience, which is required
to pass the enforceManagerProperties check.
- Add ExtraAudience RoundTripperOption
- Improve documentation and comments
- Add comprehensive test coverage
* fix(operators): add ExtraAudience for dashboards/folders API servers
Operators connecting to dashboards and folders API servers need to include
the provisioning group audience in addition to the target API server's
audience to pass the enforceManagerProperties check.
* provisioning: fix settings/stats authorization for AccessPolicy identities
The settings and stats endpoints were returning 403 for users accessing via
ST->MT because the AccessPolicy identity was routed to the access checker,
which doesn't know about these resources.
This fix handles 'settings' and 'stats' resources before the access checker
path, routing them to the role-based authorization that allows:
- settings: Viewer role (read-only, needed by frontend)
- stats: Admin role (can leak information)
* fix: update BootstrapStep component to remove legacy storage handling and adjust resource counting logic
- Removed legacy storage flag from useResourceStats hook in BootstrapStep.
- Updated BootstrapStepResourceCounting to simplify rendering logic and removed target prop.
- Adjusted tests to reflect changes in resource counting and rendering behavior.
* Revert "fix: update BootstrapStep component to remove legacy storage handling and adjust resource counting logic"
This reverts commit 148802cbb5.
* provisioning: allow any authenticated user for settings/stats endpoints
These are read-only endpoints needed by the frontend:
- settings: returns available repository types and configuration for the wizard
- stats: returns resource counts
Authentication is verified before reaching authorization, so any user who
reaches these endpoints is already authenticated. Requiring specific org
roles failed for AccessPolicy tokens which don't carry traditional roles.
* provisioning: remove redundant admin role check from listFolderFiles
The admin role check in listFolderFiles was redundant (route-level auth already
handles access) and broken for AccessPolicy identities which don't have org roles.
File access is controlled by the AccessClient as documented in the route-level
authorization comment.
* provisioning: add isAdminOrAccessPolicy helper for auth checks
Consolidates authorization logic for provisioning endpoints:
- Adds isAdminOrAccessPolicy() helper that allows admin users OR AccessPolicy identities
- AccessPolicy identities (ST->MT flow) are trusted internal callers without org roles
- Regular users must have admin role (matching frontend navtree restriction)
Used in: authorizeSettings, authorizeStats, authorizeJobs, listFolderFiles
* provisioning: consolidate auth helpers into allowForAdminsOrAccessPolicy
Simplifies authorization by:
- Adding isAccessPolicy() helper for AccessPolicy identity check
- Adding allowForAdminsOrAccessPolicy() that returns Decision directly
- Consolidating stats/settings/jobs into single switch case
- Using consistent pattern in files.go
* provisioning: require admin for files subresource at route level
Aligns route-level authorization with handler-level check in listFolderFiles.
Both now require admin role OR AccessPolicy identity for consistency.
* provisioning: restructure authorization with role-based helpers
Reorganizes authorization code for clarity:
Role-based helpers (all support AccessPolicy for ST->MT flow):
- allowForAdminsOrAccessPolicy: admin role required
- allowForEditorsOrAccessPolicy: editor role required
- allowForViewersOrAccessPolicy: viewer role required
Repository subresources by role:
- Admin: repository CRUD, test, files
- Editor: jobs, resources, sync, history
- Viewer: refs, status (GET only)
Connection subresources by role:
- Admin: connection CRUD
- Viewer: status (GET only)
* provisioning: move refs to admin-only
refs subresource now requires admin role (or AccessPolicy).
Updated documentation comments to reflect current permissions.
* provisioning: add fine-grained permissions for connections
Adds connection permissions following the same pattern as repositories:
- provisioning.connections:create
- provisioning.connections:read
- provisioning.connections:write
- provisioning.connections:delete
Roles:
- fixed:provisioning.connections:reader (granted to Admin)
- fixed:provisioning.connections:writer (granted to Admin)
* provisioning: remove non-existent sync subresource from auth
The sync subresource doesn't exist - syncing is done via the jobs endpoint.
Removed dead code from authorization switch case.
* provisioning: use access checker for fine-grained permissions
Refactors authorization to use b.access.Check() with verb-based checks:
Repository subresources:
- CRUD: uses actual verb (get/create/update/delete)
- test: uses 'update' (write permission)
- files/refs/resources/history/status: uses 'get' (read permission)
- jobs: uses actual verb for jobs resource
Connection subresources:
- CRUD: uses actual verb
- status: uses 'get' (read permission)
The access checker maps verbs to actions defined in accesscontrol.go.
Falls back to admin role for backwards compatibility.
Also removes redundant admin check from listFolderFiles since
authorization is now properly handled at route level.
* provisioning: use verb constants instead of string literals
Uses apiutils.VerbGet, apiutils.VerbUpdate instead of "get", "update".
* provisioning: use access checker for jobs and historicjobs resources
Jobs resource: uses actual verb (create/read/write/delete)
HistoricJobs resource: read-only (historicjobs:read)
* provisioning: allow viewers to access settings endpoint
Settings is read-only and needed by multiple UI pages (not just admin pages).
Stats remains admin-only.
* provisioning: consolidate role-based resource authorization
Extract isRoleBasedResource() and authorizeRoleBasedResource() helpers
to avoid duplicating settings/stats resource checks in multiple places.
* provisioning: use resource name constants instead of hardcoded strings
Replace 'repositories', 'connections', 'jobs', 'historicjobs' with
their corresponding ResourceInfo.GetName() constants.
* provisioning: delegate file authorization to connector
Route level: allow any authenticated user for files subresource
Connector: check repositories:read only for directory listing
Individual file CRUD: handled by DualReadWriter based on actual resource
* provisioning: enhance authorization for files and jobs resources
Updated file authorization to fall back to admin role for listing files. Introduced checkAccessForJobs function to manage job permissions, allowing editors to create and manage jobs while maintaining admin-only access for historic jobs. Improved error messaging for permission denials.
* provisioning: refactor authorization with fine-grained permissions
Authorization changes:
- Use access checker with role-based fallback for backwards compatibility
- Repositories/Connections: admin role fallback
- Jobs: editor role fallback (editors can manage jobs)
- HistoricJobs: admin role fallback (read-only)
- Settings: viewer role (needed by multiple UI pages)
- Stats: admin role
Files subresource:
- Route level allows any authenticated user
- Directory listing checks repositories:read in connector
- Individual file CRUD delegated to DualReadWriter
Refactored checkAccessWithFallback to accept fallback role parameter.
* provisioning: refactor access checker integration for improved authorization
Updated the authorization logic to utilize the new access checker across various resources, including files and jobs. This change simplifies the permission checks by removing redundant identity retrieval and enhances error handling. The access checker now supports role-based fallbacks for admin and editor roles, ensuring backward compatibility while streamlining the authorization process for repository and connection subresources.
* provisioning: remove legacy access checker tests and refactor access checker implementation
Deleted the access_checker_test.go file to streamline the codebase and focus on the updated access checker implementation. Refactored the access checker to enhance clarity and maintainability, ensuring it supports role-based fallback behavior. Updated the access checker integration in the API builder to utilize the new fallback role configuration, improving authorization logic across resources.
* refactor: split AccessChecker into TokenAccessChecker and SessionAccessChecker
- Renamed NewMultiTenantAccessChecker -> NewTokenAccessChecker (uses AuthInfoFrom)
- Renamed NewSingleTenantAccessChecker -> NewSessionAccessChecker (uses GetRequester)
- Split into separate files with their own tests
- Added mockery-generated mock for AccessChecker interface
- Names now reflect identity source rather than deployment mode
* fix: correct error message case and use accessWithAdmin for filesConnector
- Fixed error message to use lowercase 'admin role is required'
- Fixed filesConnector to use accessWithAdmin for proper role fallback
- Formatted code
* refactor: reduce cyclomatic complexity in filesConnector.Connect
Split the Connect handler into smaller focused functions:
- handleRequest: main request processing
- createDualReadWriter: setup dependencies
- parseRequestOptions: extract request options
- handleDirectoryListing: GET directory requests
- handleMethodRequest: route to method handlers
- handleGet/handlePost/handlePut/handleDelete: method-specific logic
- handleMove: move operation logic
* security: remove blind TypeAccessPolicy bypass from access checkers
Removed the code that bypassed authorization for TypeAccessPolicy identities.
All identities now go through proper permission verification via the inner
access checker, which will validate permissions from ServiceIdentityClaims.
This addresses the security concern where TypeAccessPolicy was being trusted
blindly without verifying whether the identity came from the wire or in-process.
* feat: allow editors to access repository refs subresource
Change refs authorization from admin to editor fallback so editors can
view repository branches when pushing changes to dashboards/folders.
- Split refs from other read-only subresources (resources, history, status)
- refs now uses accessWithEditor instead of accessWithAdmin
- Updated documentation comment to reflect authorization levels
- Added integration test TestIntegrationProvisioning_RefsPermissions
verifying editor access and viewer denial
* tests: add authorization tests for missing provisioning API endpoints
Add comprehensive authorization tests for:
- Repository subresources (test, resources, history, status)
- Connection status subresource
- HistoricJobs resource
- Settings and Stats resources
All authorization paths are now covered by integration tests.
* test: fix RefsPermissions test to use GitHub repository
Use github-readonly.json.tmpl template instead of local folder,
since refs endpoint requires a versioned repository that supports
git operations.
* chore: format test files
* fix: make settings/stats authorization work in MT mode
Update authorizeRoleBasedResource to check authlib.AuthInfoFrom(ctx)
for AccessPolicy identity type in addition to identity.GetRequester(ctx).
This ensures AccessPolicy identities are recognized in MT mode where
identity.GetRequester may not set the identity type correctly.
* fix: remove unused authorization helper functions
Remove allowForAdminsOrAccessPolicy and allowForViewersOrAccessPolicy
as they are no longer used after refactoring to use authorizeRoleBasedResource.
* Fix AccessPolicy identity detection in ST authorizer
- Add check for AccessPolicy identities via GetAuthID() in authorizeRoleBasedResource
- Extended JWT may set identity type to TypeUser but AuthID is 'access-policy:...'
- Forward user ID token in X-Grafana-Id header in RoundTripper for aggregator forwarding
* Revert "Fix AccessPolicy identity detection in ST authorizer"
This reverts commit 0f4885e503.
* Add fine-grained permissions for settings and stats endpoints
- Add provisioning.settings:read action (granted to Viewer role)
- Add provisioning.stats:read action (granted to Admin role)
- Add accessWithViewer to APIBuilder for Viewer role fallback
- Use access checker for settings/stats authorization
- Remove role-based authorization functions (isRoleBasedResource, authorizeRoleBasedResource)
This makes settings and stats consistent with other provisioning resources
and works properly in both ST and MT modes via the access checker.
* Remove AUTHORIZATION_COVERAGE.md
* Add provisioning resources to RBAC mapper
- Add connections, settings, stats to provisioning.grafana.app mappings
- Required for authz service to translate K8s verbs to legacy actions
- Fixes 403 errors for settings/stats in MT mode
* refactor: merge access checkers with original fallthrough behavior
Merge tokenAccessChecker and sessionAccessChecker into a unified
access checker that implements the original fallthrough behavior:
1. First try to get identity from access token (authlib.AuthInfoFrom)
2. If token exists AND (is TypeAccessPolicy OR useExclusivelyAccessCheckerForAuthz),
use the access checker with token identity
3. If no token or conditions not met, fall back to session identity
(identity.GetRequester) with optional role-based fallback
This fixes the issue where settings/stats/connections endpoints were
failing in MT mode because the tokenAccessChecker was returning an error
when there was no auth info in context, instead of falling through to
session-based authorization.
The unified checker now properly handles:
- MT mode: tries token first, falls back to session if no token
- ST mode: only uses token for AccessPolicy identities, otherwise session
- Role fallback: applies when configured and access checker denies
* Revert "refactor: merge access checkers with original fallthrough behavior"
This reverts commit 96451f948b.
* Grant settings view role to all
* fix: use actual request verb for settings/stats authorization
Use a.GetVerb() instead of hardcoded VerbGet for settings and stats
authorization. When listing resources (hitting collection endpoint),
the verb is 'list' not 'get', and this mismatch could cause issues
with the RBAC service.
* debug: add logging to access checkers for authorization debugging
Add klog debug logs (V4 level) to token and session access checkers
to help diagnose why settings/stats authorization is failing while
connections works.
* debug: improve access checker logging with grafana-app-sdk logger
- Use grafana-app-sdk logging.FromContext instead of klog
- Add error wrapping with resource.group format for better context
- Log more details including folder, group, and allowed status
- Log error.Error() for better error message visibility
* chore: use generic log messages in access checkers
* Revert "Grant settings view role to all"
This reverts commit 3f5758cf36.
* fix: use request verb for historicjobs authorization
The original role-based check allowed any verb for admins. To preserve
this behavior with the access checker, we should pass the actual verb
from the request instead of hardcoding VerbGet.
---------
Co-authored-by: Charandas Batra <charandas.batra@grafana.com>
* Default to folder sync only and block new instance sync repositories
- Change default allowed_targets to folder-only in backend configuration
- Modify validation to only enforce allowedTargets on CREATE operations
- Add deprecation warning for existing instance sync repositories
- Update frontend defaults and tests to reflect new behavior
Fixes#619
* Update warning message: change 'deprecated' to 'not fully supported'
* Fix health check: don't validate allowedTargets for existing repositories
Health checks for existing repositories should treat them as UPDATE operations,
not CREATE operations, so they don't fail validation for instance sync target.
* Fix tests and update i18n translations
- Update BootstrapStep tests to reflect folder-only default behavior
- Run i18n-extract to update translation file structure
* Fix integration tests
* Fix tests
* Fix provisioning test wizard
* Fix fronted test
* feat: add Grafana logo to embedded panels
- Add Grafana logo watermark to solo panel view (embedded panels)
- Logo appears in top-right corner with subtle background container
- Logo hides on hover to avoid interfering with panel content
- Uses React state to track hover for reliable behavior across nested elements
* minor formatting
* update changes to match public dashboards styling
* match styles of public dashboards
* feat: add responsive Grafana branding to embedded panels
- Add 'Powered by Grafana' branding with text logo to solo panel view
- Implement responsive scaling based on panel dimensions (0.6x to 1.0x)
- Logo and text scale proportionally with panel size
- Branding hides on hover to avoid interfering with panel content
- Matches public dashboard branding pattern for consistency
- Uses ResizeObserver for efficient responsive updates
* feat: add Grafana branding to embedded solo panels
- Add 'Powered by Grafana' branding with text logo to embedded panels
- Create SoloPanelPageLogo component for reusable branding
- Implement responsive scaling based on panel dimensions
- Add hover-to-hide functionality to avoid content overlap
- Logo scales between 0.6x and 1.0x based on panel size
* refactor: move scale calculation into SoloPanelPageLogo component
- Move responsive scale calculation logic from SoloPanelRenderer to SoloPanelPageLogo
- Logo component now manages its own scaling based on container dimensions
- Improves separation of concerns and component encapsulation
* feat: add hideLogo query parameter to disable embedded panel branding
- Add hideLogo query parameter support to SoloPanelPage
- Logo can be hidden via ?hideLogo, ?hideLogo=true, or ?hideLogo=1
- Useful for customers who want to disable branding and for image rendering scenarios
- Update Props interface to include hideLogo in queryParams type
* feat: hide logo in panel image renderer URLs
- Add hideLogo=true parameter to image renderer URLs in ShareLinkTab
- Ensures logo is hidden when generating panel images through share feature
- Update test to expect hideLogo=true in render URL
* feat: hide logo in old dashboard sharing panel image URLs
- Add hideLogo=true parameter to buildImageUrl in ShareModal utils
- Ensures logo is hidden when generating panel images through old share modal
- Update all ShareLink tests to expect hideLogo=true in render URLs
* test: add comprehensive tests for SoloPanelPage and SoloPanelPageLogo
- Add SoloPanelPageLogo tests covering rendering, hover behavior, theme selection, and scaling
- Add SoloPanelPage tests covering logo visibility based on hideLogo prop
- Test logo hiding functionality (most important behavior)
- Test responsive scaling based on container dimensions
- Test ResizeObserver integration
- All 14 tests passing
* refactor: centralize hideLogo handling in SoloPanelPageLogo
Move hideLogo parsing and decision-making into SoloPanelPageLogo so SoloPanelPage/SoloPanelRenderer only pass through the raw query param value.
* chore: clean up solo logo test and share link params
Remove a duplicate SVG mock in SoloPanelPageLogo.test, and simplify ShareLinkTab image URL building without changing behavior.
* chore: revert ShareLinkTab image query refactor
Restore the previous image URL query-param mutation logic in ShareLinkTab to reduce risk.
* chore: set hideLogo once for ShareLinkTab image URLs
Avoid passing hideLogo twice when building the rendered image URL.
* fix: handle boolean hideLogo query param in SoloPanelPageLogo
Handle query params that are represented as booleans (e.g., ?hideLogo) and arrays, and avoid calling trim() on non-strings.
* fix i18n
* fix(dashboard-scene): address SoloPanelPageLogo review feedback
Avoid double-scaling logo margin, clarify scaling comments, and extend tests for null/array values and ResizeObserver cleanup.
* update margin left on logo to better match text spacing
* wip
* boop
* Base factor on data
* Add some basic option control
* Remove old comments
* Add feature flag
* Apply feature flag to axis options
* Turn factor calculation into exported function
* Simplify bucket factor function
* Clarify comments
* Fix cell sizing of pre-bucketed heatmaps with log
* Remove unnecessary category change
* Consolidate editor for calculate from data no
* Update bucket function sanity checks
* Wire up scale config from yBucketScale
* Hide bucket controls for heatmap cells
* Fix splits
* Add test coverage
* Fix failing test
* Add basic util test coverage
* Fix tooltip for legacy in linear
* Fix y bucket option width to be consistent
* Hide tick alignment for explicit scale modes
* Clarify comment
* Make sure units are passed properly for linear
* Remove null assertion operator
* Clean up nested ternary
* Add type protection to scaleLog
* Remove repeated code for ySize calcs
* Remove ternary for scaleDistribution
* Add test coverage for YBucketScaleEditor
* Add isHeatmapSparse function to tooltip utils
* Create calculateYSizeDivisor util function
* Fix y axis min and max options and extend to log
* Add toLogBase test coverage
* Create applyExplicitMinMax function
* Add additional test coverage for scale editor
* Run i18n-extract
* Update eslint suppressions
---------
Co-authored-by: Drew Slobodnjak <60050885+drew08t@users.noreply.github.com>
* Dashboard migration: preserve legacy string datasource references
Fix v1beta1 → v2alpha1 conversion to handle legacy string datasource
references in QueryVariable, AdhocVariable, and GroupByVariable.
Previously, string datasource references (both template variables like
"$datasource" and direct names/UIDs like "prometheus") were being
dropped during conversion, causing variable chaining to break.
The frontend's DatasourceSrv.getInstanceSettings() already handles
string references by trying uid → name → id lookup at runtime, so we
preserve the string in the uid field and let the frontend resolve it.
* trigger frontend ci tests when dashboard migration code changes
* v1: if string convert to DS ref
* Update migration testdata to fix template variable datasource references
* update
* wip; DrilldownControls
* use wrapper so that drilldown controls wrap inline
* keep labels on top when input expands vertically
* add clear all button
* add collapsible prop
* i18n
* Increase maxWidth for adhoc
* bump scenes for testing
* fix
* remove clear all button
* use new feature toggle; pass collapsible in v2
* update variable controls to use new feature flag
* cleanup
* wip (#115441)
* wip
* fix
* update wrapping on smaller screens
---------
Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com>
* Filter out variables that are not in inControlsMenu
* filter out inControlsMenu vars, not hidden ones
* canary scenes
* fix
* cleanup
* canary scenes
* pass wideInput to groupby based on ff
* update var name and bump scenes
* bump scenes
* yarn lock
---------
Co-authored-by: Victor Marin <victor.marin@grafana.com>
* Fix Grafana App SDK logger log level
What
This commit fixes the hardcoded value of the app SDK logger log level
by properly setting it during the log manager initialization.
Why
To prevent app SDK logging from always logging at DEBUG.
Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
* Add missing argument to the logging test
Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
---------
Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
* move content and mode properties to options level
* move to angular section
* Update comments
* handle missing angular text panel
* re-generate test files
* angualr panels tests
* fixing test
* Update output files
* Update output for dev dashboard
* Spread options at the top panel level for migration
* linting issue
---------
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
* Remove the default alpine & ubuntu versions so that the ones in Dockerfile are used
* set default to just 'alpine' or 'ubuntu'
* use defaults instead
* Provisioning: Add Git Sync limitations warning and migrate resources checkbox
- Update SynchronizeStep alert to use warning severity with comprehensive Git Sync limitations
- Add conditional warnings for instance sync (permissions loss, alerts/library panels loss)
- Add conditional warnings for folder sync (folder structure changes, manual cleanup needed)
- Add "Migrate existing resources" checkbox for folder sync mode
- Update useCreateSyncJob hook to handle migrateResources option for folder sync
- Extract i18n translations for new strings
* Simplify createSyncJob: calculate requiresMigration in caller
- Remove syncTarget and migrateResources parameters from useCreateSyncJob hook
- Calculate requiresMigration in SynchronizeStep based on sync target and checkbox value
- Pass requiresMigration as parameter to createSyncJob function
* Revert: Pass requiresMigration as hook parameter
- Calculate requiresMigration in SynchronizeStep using useMemo
- Pass requiresMigration to useCreateSyncJob hook
- Remove parameter from createSyncJob function call
* Revert "Revert: Pass requiresMigration as hook parameter"
This reverts commit 97e3b7107d.
* Fix TypeScript errors in ProvisioningWizard
- Remove requiresMigration from useCreateSyncJob call
- Pass requiresMigration parameter to createSyncJob call
- Remove unused Target import from SynchronizeStep
* Show migrate resources checkbox for instance sync (checked and disabled)
- Display checkbox for both instance and folder sync
- For instance sync: checkbox is checked and disabled with explanation
- For instance sync: automatically set migrateResources to true via useEffect
- Update description to explain instance sync requires all resources to be managed
* Extract i18n translations for instance-migrate-resources-description
* Rename 'Synchronization options' to 'Options'
* Update i18n translations: rename synchronization-options to options
* Remove unnecessary conditional check for sync target
* Add bodySmall variant to announcement banner TextLink
* Move requiresMigration calculation logic into useResourceStats hook
- Add migrateResources parameter to useResourceStats hook
- Calculate final requiresMigration in hook based on sync target and checkbox value
- Use watch instead of getValues to reactively get migrateResources value
- Simplify startSynchronization to use requiresMigration from hook
* build(frontend): enable custom condition for resolving source files during dev and build
* feat(packages): apply conditional name to export properties
* chore(packages): add standard exports to flamegraph and prometheus
* chore(packages): resolve main, module, types to built files
* build(packages): clean up prepare-npm-package for custom condition changes
* refactor(packages): reduce repetition in conditional exports
* build(storybook): add @grafana-app/source to conditionNames
* test(frontend): add grafana-app/source customCondition for jest tests
* refactor(frontend): remove nested package import paths
* chore(jest): use customExportConditions for source files and browser
* chore(i18n): use src for ./eslint-plugin export
* chore(packages): set packages tsconfigs to moduleResolution bundler
* chore(packages): fix rollup builds
* build(packages): build cjs as multiple files
* chore(sql): reference MonitoringLogger for moduleresolution bundler to pass typecheck
* chore(ui): add type refs for moduleresolution bundler to pass typecheck
* feat(schema): add exports for cleaner import paths
* refactor(frontend): clean up schema paths to point to exports instead of nested file paths
* build(storybook): hack the builder-manager for custom conditions to resolve
* build(decoupled-plugins): fix broken builds due to missing conditionNames
* chore(e2e): pass condition to playwright to resolve local packages
* build(frontend): fix failing build
* chore(select): fix typings
* style(frontend): clean up eslint suppressions
* chore(packages): fix type errors due to incorrect tsconfig settings
* build(generate-apis): use swc with ts-node and moduleResolution bundler
* chore(cypress): add conditionNames to resolve monorepo packages
* build(npm): update prepare to work with latest exports changes
* build(packages): fix prepare-npm-package script
* fix(e2e-selectors): update debugoverlay for data-testid change
* build(packages): stop editing package.json at pack n publish time
* rerun ci
* chore(api-clients): use moduleResolution: bundler for customConditions support
* chore(api-clients): fix generation
* build(packages): remove aliasing exports, remove exports with only customConditions
* Revert "refactor(frontend): clean up schema paths to point to exports instead of nested file paths"
This reverts commit 7949b6ea0e60e51989d2a8149b7a24647cd68916.
* revert(schema): remove exports from package so builds work
* build(api-clients): fix up api-clients exports and rollup config
* build(api-clients): Update generated package exports for api clients
* build(schema): add overrides to cjsOutput and esmOutput so built directory structure is correct
* fix(packages): use rootDirs to prevent types/src directories in built d.ts file paths
* build(packages): prevent empty exports added to package.json during pack
* docs(packages): update readme with custom conditions information
---------
Co-authored-by: Tom Ratcliffe <tom.ratcliffe@grafana.com>
* `grafana-iam`: Add basic roles to the apis
* Fix validation
* chore: trigger CI
* Leave the hooks intact for now, moving them later
* Remove Role mention from the interface
* Refactor to use a NoopRest backend and Deny access
* fix(transformation): gray out transformation card on transformation tab
* fix(transformations): make data prop required in EmptyTransformationsMessage
This ensures TypeScript enforces that all call sites pass the data prop,
which is required for graying out inapplicable transformation cards.
- Changed data prop from optional to required in EmptyTransformationsProps
- Fixed TransformationsEditor.tsx to pass data (was missing in legacy code)
- Updated tests to pass the required data prop
---------
Co-authored-by: Sam Jewell <sam.jewell@grafana.com>
* refactor template service to contstruct notification template in one place, get provenance before creating and calculate resource version after.
* refactor get by UID and name
* introduce template kind in NotificationTemplate
* introduce includeImported flag and use in the k8s api
* support imported templates
* add kind to template uid
* tests for imported templates
* update API model
* set kind to default templates
* unified-storage: add `Keys` support to the sqlkv implementation
* add validation for sort option
* Revert sort order validation, assume desc when invalid
* adjust conversion file to include empty properties array in overrides
* fix lint error
* add test case for empty properties and fix incorrect regex to v1 conversion
* Deprecate Legacy Storage Migration in Backend
* Change the messaging around legacy storage
* Disable cards to connect
* Commit import changes
* Block repository creation if resources are in legacy storage
* Update error message
* Prettify
* chore: uncomment unified migration
* chore: adapt and fix tests
* Remove legacy storage migration from frontend
* Refactor provisioning job options by removing legacy storage and history fields
- Removed the `History` field from `MigrateJobOptions` and related references in the codebase.
- Eliminated the `LegacyStorage` field from `RepositoryViewList` and its associated comments.
- Updated tests and generated OpenAPI schema to reflect these changes.
- Simplified the `MigrationWorker` by removing dependencies on legacy storage checks.
* Refactor OpenAPI schema and tests to remove deprecated fields
- Removed the `history` field from `MigrateJobOptions` and updated the OpenAPI schema accordingly.
- Eliminated the `legacyStorage` field from `RepositoryViewList` and its associated comments in the schema.
- Updated integration tests to reflect the removal of these fields.
* Fix typescript errors
* Refactor provisioning code to remove legacy storage dependencies
- Eliminated references to `dualwrite.Service` and related legacy storage checks across multiple files.
- Updated `APIBuilder`, `RepositoryController`, and `SyncWorker` to streamline resource handling without legacy storage considerations.
- Adjusted tests to reflect the removal of legacy storage mocks and dependencies, ensuring cleaner and more maintainable code.
* Fix unit tests
* Remove more references to legacy
* Enhance provisioning wizard with migration options
- Added a checkbox for migrating existing resources in the BootstrapStep component.
- Updated the form context to track the new migration option.
- Adjusted the SynchronizeStep and useCreateSyncJob hook to incorporate the migration logic.
- Enhanced localization with new descriptions and labels for migration features.
* Remove unused variable and dualwrite reference in provisioning code
- Eliminated an unused variable declaration in `provisioning_manifest.go`.
- Removed the `nil` reference for dualwrite in `repo_operator.go`, aligning with the standalone operator's assumption of unified storage.
* Update go.mod and go.sum to include new dependencies
- Added `github.com/grafana/grafana-app-sdk` version `0.48.5` and several indirect dependencies including `github.com/getkin/kin-openapi`, `github.com/hashicorp/errwrap`, and others.
- Updated `go.sum` to reflect the new dependencies and their respective versions.
* Refactor provisioning components for improved readability
- Simplified the import statement in HomePage.tsx by removing unnecessary line breaks.
- Consolidated props in the SynchronizeStep component for cleaner code.
- Enhanced the layout of the ProvisioningWizard component by streamlining the rendering of the SynchronizeStep.
* Deprecate MigrationWorker and clean up related comments
- Removed the deprecated MigrationWorker implementation and its associated comments from the provisioning code.
- This change reflects the ongoing effort to eliminate legacy components and improve code maintainability.
* Fix linting issues
* Add explicit comment
* Update useResourceStats hook in BootstrapStep component to accept selected target
- Modified the BootstrapStep component to pass the selected target to the useResourceStats hook.
- Updated related tests to reflect the change in expected arguments for the useResourceStats hook.
* fix(provisioning): Update migrate tests to match export-then-sync behavior for all repository types
Updates test expectations for folder-type repositories to match the
implementation changes where both folder and instance repository types
now run export followed by sync. Only the namespace cleaner is skipped
for folder-type repositories.
Changes:
- Update "should run export and sync for folder-type repositories" test to include export mocks
- Update "should fail when sync job fails for folder-type repositories" test to include export mocks
- Rename test to clarify that both export and sync run for folder types
- Add proper mock expectations for SetMessage, StrictMaxErrors, Process, and ResetResults
All migrate package tests now pass.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Update provisioning wizard text and improve resource counting display
- Enhanced descriptions for migrating existing resources to clarify that unmanaged resources will also be included.
- Refactored BootstrapStepResourceCounting component to simplify the rendering logic and ensure both external storage and unmanaged resources are displayed correctly.
- Updated alert messages in SynchronizeStep to reflect accurate information regarding resource management during migration.
- Adjusted localization strings for consistency with the new descriptions.
* Update provisioning wizard alert messages for clarity and accuracy
- Revised alert points to indicate that resources can still be modified during migration, with a note on potential export issues.
- Clarified that resources will be marked as managed post-provisioning and that dashboards remain accessible throughout the process.
* Fix issue with trigger wrong type of job
* Fix export failure when folder already exists in repository
When exporting resources to a repository, if a folder already exists,
the Read() method would fail with "path component is empty" error.
This occurred because:
1. Folders are identified by trailing slash (e.g., "Legacy Folder/")
2. The Read() method passes this path directly to GetTreeByPath()
3. GetTreeByPath() splits the path by "/" creating empty components
4. This causes the "path component is empty" error
The fix strips the trailing slash before calling GetTreeByPath() to
avoid empty path components, while still using the trailing slash
convention to identify directories.
The Create() method already handles this correctly by appending
".keep" to directory paths, which is why the first export succeeded
but subsequent exports failed.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Fix folder tree not updated when folder already exists in repository
When exporting resources and a folder already exists in the repository,
the folder was not being added to the FolderManager's tree. This caused
subsequent dashboard exports to fail with "folder NOT found in tree".
The fix adds the folder to fm.tree even when it already exists in the
repository, ensuring all folders are available for resource lookups.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Revert "Merge remote-tracking branch 'origin/uncomment-unified-migration-code' into cleanup/deprecate-legacy-storage-migration-in-provisioning"
This reverts commit 6440fae342, reversing
changes made to ec39fb04f2.
* fix: handle empty folder titles in path construction
- Skip folders with empty titles in dirPath to avoid empty path components
- Skip folders with empty paths before checking if they exist in repository
- Fix unit tests to properly check useResourceStats hook calls with type annotations
* Update workspace
* Fix BootstrapStep tests after reverting unified migration merge
Updated test expectations to match the current component behavior where
resource counts are displayed for both instance and folder sync options.
- Changed 'Empty' count expectation from 3 to 4 (2 cards × 2 counts each)
- Changed '7 resources' test to use findAllByText instead of findByText
since the count appears in multiple cards
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Remove bubbletee deps
* Fix workspace
* provisioning: update error message to reference enableMigration config
Update the error message when provisioning cannot be used due to
incompatible data format to instruct users to enable data migration
for folders and dashboards using the enableMigration configuration
introduced in PR #114857.
Also update the test helper to include EnableMigration: true for both
dashboards and folders to match the new configuration pattern.
* provisioning: add comment explaining Mode5 and EnableMigration requirement
Add a comment in the integration test helper explaining that Provisioning
requires Mode5 (unified storage) and EnableMigration (data migration) as
it expects resources to be fully migrated to unified storage.
* Remove migrate resources checkbox from folder type provisioning wizard
- Remove checkbox UI for migrating existing resources in folder type
- Remove migrateExistingResources from migration logic
- Simplify migration to only use requiresMigration flag
- Remove unused translation keys
- Update i18n strings
* Fix linting
* Remove unnecessary React Fragment wrapper in BootstrapStep
* Address comments
---------
Co-authored-by: Rafael Paulovic <rafael.paulovic@grafana.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
* Added method for adding migrations for convering unique to primary key.
Based on existing migration for `file` table (in `db_file_storage.go`) migrations.
* Added better default migration names. Added ability to override migration name.
* Use ConvertUniqueKeyToPrimaryKey for cloud_migration_snapshot_partition table.
* Convert resource_version UQE to PK.
* Convert secret_encrypted_value UQE to PK.
* Removed extra test.
* Removed testdata.
* Remove support for renaming migrations for now. We can bring it in later, when we want to convert existing migrations for file, file_meta and setting tables.
* Revert removal of ColumnName to ease backporting, since this field is referenced from enterprise code.
* Use quoted identifiers in Postgres statement.
* Auth: Google OAuth consent prompt takes precedence when use_refresh_token is true
* Auth: Disable login prompt option for Google OAuth when use_refresh_token is true
* yarn run prettier:check --write
* feedback: validate login prompt when use_refresh_token is true
* Explore: Add custom text highlighting to logs panel
Add ability to select text in log lines and highlight all occurrences
with persistent colors. Highlights are stored in URL state and cycle
through the theme's visualization palette.
- Add CustomHighlight type to ExploreLogsPanelState
- Implement LogListHighlightContext for state management
- Generate custom highlight grammar using Prism.js tokens
- Add "Highlight occurrences" option to popover menu
- Add "Reset highlights" control when highlights exist
- Fix pruneObject to preserve colorIndex: 0 in URL state
* Fix CI failures: formatting and i18n extraction
- Run prettier on LogLine.tsx
- Run i18n-extract to update translation strings
* Fix lint errors
- Use theme.shape.radius.default instead of literal '2px' in LogLine.tsx
- Remove unnecessary type assertion in grammar.ts
* Fix TypeScript error in grammar.ts
Use Record<string, GrammarValue> type for dynamic grammar object to allow string indexing without type assertions.
* Replace hardcoded HIGHLIGHT_COLOR_COUNT with actual theme palette length
Use useTheme2() hook to dynamically get the palette length instead of
hardcoding it to 50. This ensures the color cycling works correctly
regardless of the actual theme palette size.
* Backtrack to a stable point and revert changes
* Implement using search
* New translations
* LogListSearch: refactor search state
* PopoverMenu: add divider
* LogLine: remove padding and update border radius
* LogListSearch: add missing tooltips
* Refactor keybindings
* More cleanup
* LogListSearch: don't autoscroll with filterLogs
---------
Co-authored-by: Matias Chomicki <matyax@gmail.com>
* deps(go): bump the k8s-io group across 2 directories with 2 updates
Bumps the k8s-io group with 1 update in the / directory: [k8s.io/kube-aggregator](https://github.com/kubernetes/kube-aggregator).
Bumps the k8s-io group with 1 update in the /hack directory: [k8s.io/code-generator](https://github.com/kubernetes/code-generator).
Updates `k8s.io/kube-aggregator` from 0.34.2 to 0.34.3
- [Commits](https://github.com/kubernetes/kube-aggregator/compare/v0.34.2...v0.34.3)
Updates `k8s.io/code-generator` from 0.34.2 to 0.34.3
- [Commits](https://github.com/kubernetes/code-generator/compare/v0.34.2...v0.34.3)
---
updated-dependencies:
- dependency-name: k8s.io/kube-aggregator
dependency-version: 0.34.3
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: k8s-io
- dependency-name: k8s.io/code-generator
dependency-version: 0.34.3
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: k8s-io
...
Signed-off-by: dependabot[bot] <support@github.com>
* update all
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* Alerting: Protect sensitive fields of contact points from
unauthorized modification
- Introduce a new permission alert.notifications.receivers.protected:write. The permission is granted to contact point administrators.
- Introduce field Protected to NotifierOption
- Introduce DiffReport for models.Integrations with focus on Settings. The diff report is extended with methods that return all keys that are different between two settings.
- Add new annotation 'grafana.com/access/CanModifyProtected' to Receiver model
- Update receiver service to enforce the permission and return status 403 if unauthorized user modifies protected field
- Update receiver testing API to enforce permission and return status 403 if unauthorized user modifies protected field.
- Update UI to disable protected fields if user cannot modify them
update rudderstack init logic
to rely on existence of old or new sdk config option being set and only defer to feature toggle if both or neither is set
* Alerting: Improve ASH Loki query efficiency by including folderUID
Previously, the folderUID label was only included when ruleUID was not specified
and the user did not have full alert rule read permissions.
To improve ASH Loki query efficiency, this PR includes the folderUID in the ASH
Loki query when ruleUID is specified, even if the user has full alert rule read
permissions.
Some non-obvious considerations:
- The naive implementation of just including the current folder UID would have
the unintended side-effect of no longer returning history after a rule is moved
between folders.
- The previous implementation made the trade-off of only checking RBAC on the
current folder, including any history from old folders that may exist.
To solve both of the above, we make an extra query to the database to check the
alert rule's previous versions so we can include any old folderUIDs, checking
RBAC at the same time.
The querying and inclusion of history from old folders is done best-effort, any
issues that might arise are logged and ignored so as not to prevent the current
folder history.
* Fix merge conflicts
* Reduce scanning on GetAlertRuleVersionFolders by grouping in query
* refactor: delegate authorization to access checker in dualwriter
- Remove role-based authorization checks (editor/admin role checks)
- Delegate all authorization to access checker which checks resource-level permissions
- Update authorizeCreateFolder to use access checker instead of role-based checks
- Add comprehensive authorization tests for viewer, editor, and admin roles
- Tests cover GET, POST, PUT, DELETE operations and folder creation
This change ensures that authorization is consistently handled through
the access checker, which checks resource-level permissions rather than
just organization roles.
* fix: format files_test.go
* fix: check error return value of resp.Body.Close()
* fix: grant permissions to all dashboards for editor role in authorization test
Use SetPermissions with wildcard to grant permissions to Editor user
for all dashboards, not just the initial one. This ensures that dashboards
created during tests (like in DELETE operations) have the necessary
permissions for the editor role.
* maybe better way to attach meta?
* chore(plugin-extensions): remove todo comment
---------
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
**What is this feature?**
Add `rule_matcher` filter to the Prometheus-compatible list rules API: `/api/prometheus/grafana/api/v1/rules`. It allows to filter rules by static labels (not by alert instance labels).
**Special notes:**
- Equality (`=`) and inequality (`!=`) matchers are pushed down to the database. Regex matchers (`=~`, `!~`) are applied in-memory at the API layer.
- SQLite: Uses GLOB pattern matching
- MySQL / PostgreSQL: Use JSON functions to compare label values
---------
Co-authored-by: Konrad Lalik <konradlalik@gmail.com>
Enhancement: Introduce optimized folder permission relations and new permission definitions
- Added `can_get_permissions` and `can_set_permissions` relations to enhance permission management.
- Implemented `FolderPermissionRelation` function to optimize permission checks for folder resources.
- Updated `checkTyped` and `listTyped` methods to utilize optimized relations for permission management.
- Introduced a new benchmark test file for performance evaluation of permission checks and listings.
* hide alerts tab for git synced folders
* add tests for alert tab visibility
* hide managed folders from folder picker
* update UI so managed folders are disabled in dropdown not hidden
* add folder d to folder tree
* include folder d in useFolderQuery hook tests
* update provisioned folders from disabled to hidden in the folder selector
* remove disabled logic from NestedFolderList
* init
* it works! but what a mess
* nil ptr bug
* split up client.go
* split up search_request.go
* split up data_query.go
* split up response_parser
* fix merge
* update handling request
* raw dsl agg parser
* change rawQuery to rawDSLQuery
* agg parser works but needs work
* clean up agg parser
* fix bugs with raw dsl parsers
* feature toggle
* fix tests
* editor type selector
* editor type added
* add fix builder vs code by not using same query field
* clean up
* fix lint
* pretty
* editor type selection should be behind ft
* adam's feedback
* prettier
* rows with hidden header should never be collapsed
* fix test
* shouldn't need to normalize this
* fix frontend conversion
* fix lint
* Update public/app/features/dashboard-scene/serialization/transformSaveModelToScene.ts
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
---------
Co-authored-by: oscarkilhed <oscar.kilhed@grafana.com>
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
fix: allow editors to POST jobs in provisioning API
Editors should be able to post jobs in the 'jobs' endpoint for syncing
repositories. This aligns with the requirement that syncing a repository
requires editor privileges.
- Separated 'jobs' subresource authorization from repository/test
- Allow both admins and editors to POST jobs
- Added integration tests to verify permissions
Fixes authorization bug where editors were incorrectly denied access.
* Provisioning: Deprecate single file/folder move and delete on configured branch
Reject individual file and folder move/delete operations on the configured
branch via the single files endpoints (HTTP 405 MethodNotAllowed). Users
must use the bulk operations API (jobs API) instead.
Motivation:
- Reconciliation for these operations is not reliable as it must be
recursive and cannot run synchronously since it could take a long time
- Simplifies authorization logic - fewer operations to secure and validate
- Reduces complexity and surface area for potential bugs
- Bulk operations via jobs API provide better control and observability
Operations on non-configured branches (e.g., creating PRs) continue to work
as before since they don't update the Grafana database.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* fix: remove trailing whitespace in test file
* Fix behaviour to match current behavior
* Revert changes for individual files
---------
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
* continued edits
* authentication updates
* added more info to configure doc
* started work on query editor
* reviewed the configure doc, consolidated sections
* fixed issue with headings
* fixed errors
* updates to the template variables doc
* created initial troubleshooting doc
* removed gerunds and fixed heading issues
* new annotations doc added
* more updates to query editor
* fixed spelling
* fixed some linter issues
* fixed flow for the intro doc
* updates to the intro doc
* fixed transformation links
* added review date to front matter
* ran prettier
* added a new alerting doc
* linter updates
* some final edits
* ran prettier again
* Update docs/sources/datasources/azure-monitor/configure/index.md
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
* Update docs/sources/datasources/azure-monitor/configure/index.md
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
* Update docs/sources/datasources/azure-monitor/troubleshooting/index.md
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
* edits based on feedback
* removed all relative reference links
* ran prettier
---------
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
* Gauge: Fit-and-finish tweaks to glows, text position, and sparkline size
* adjust text height and positions a little more
* cohesive no data handling
* more tweaks
* fix migration test
* Fix JSON formatting by adding missing newline
* remove new line
* FieldSelector: rename functions to be more explicit
* LogDetailsContext: calculate width based on field selector visibility
* LogLineDetails: Fix sidebar max width calculation
* Update functions usage
* Add regression and fix context calculation
Previous attempt to land this required this PR and a grafana-enterprise
PR to land at the ~same time.
This PR guards the use of `dsConfigHandlerRequestsDuration` with a nil
check, and doesn't change any existing APIs, so we can land it without
any timing issues with grafana-enterprise.
Once this has landed, we'll make a follow-up PR for grafana-enterprise.
## Summary
Fixes a regression where the `loaded` analytics event was not being tracked for the `BasicProvisionedDashboardsEmptyPage` component, which is the component shown in production when the `suggestedDashboards` feature toggle is disabled (i.e. community dashboards disabled but v1 of feature enabled)
## Problem
Regression introduced by https://github.com/grafana/grafana/pull/112808/changes#diff-3a19d2e887a3344cb0bcd2449b570bd50a7d78d1d473f4a3cf623f9fe40f35fc adding community dashboard support to `SuggestedDashboards`, the `BasicProvisionedDashboardsEmptyPage` component was missing the `loaded` event tracking. Component is mounted here: https://github.com/grafana/grafana/pull/112808/changes#diff-fba79ed6f8bfb5f712bdd529155158977a3e081d1d6a5932a5fa90fb57a243e6R82. This caused analytics discrepancies where in the past 7 days (note: issue has been present for last several weeks but here is sample of data from previous week):
- 106 provisioned dashboard items were clicked
- Only 1 `loaded` event was received (from `SuggestedDashboards` when the feature toggle is enabled)
- The `loaded` events are missing for the production v1 flow (when `suggestedDashboards` feature toggle is off)
## Root Cause
The `BasicProvisionedDashboardsEmptyPage` component (used in v1 flow in production) was never updated with the `loaded` event tracking that was added to `SuggestedDashboards` in PR #113417. Since the `suggestedDashboards` feature toggle is not enabled in production, users were seeing `BasicProvisionedDashboardsEmptyPage` which had no tracking, resulting in missing analytics events.
## Solution
Added the `loaded` event tracking to `BasicProvisionedDashboardsEmptyPage` using the same approach that was previously used (tracking inside the async callback when dashboards are loaded). This ensures consistency with the existing pattern and restores analytics tracking for the production flow.
## Changes
- Added `DashboardLibraryInteractions.loaded()` call in `BasicProvisionedDashboardsEmptyPage` when dashboards are successfully loaded
- Uses the same tracking pattern as the original implementation (tracking inside async callback)
- Matches the event structure used in `SuggestedDashboards` for consistency
## Testing
- Verified that `loaded` events are now tracked when `BasicProvisionedDashboardsEmptyPage` loads dashboards
- Confirmed the event includes correct `contentKinds`, `datasourceTypes`, and `eventLocation` values
- No duplicate events are sent (tracking only occurs once per load)
## Related
- Original analytics implementation: #113417
- Related PR: #112808
- Component: [`BasicProvisionedDashboardsEmptyPage.tsx`](https://github.com/grafana/grafana/blob/main/public/app/features/dashboard/dashgrid/DashboardLibrary/BasicProvisionedDashboardsEmptyPage.tsx)
* Fix race condition causing unhealthy repository message to be lost
This commit fixes a race condition in the provisioning repository controller
where the "Repository is unhealthy" message in the sync status could be lost
due to status updates being based on stale repository objects.
## Problem
The issue occurred in the `process` function when:
1. Repository object was fetched from cache with old status
2. `RefreshHealth` immediately patched the health status to "unhealthy"
3. `determineSyncStatusOps` used the stale object to check if unhealthy
message was already set
4. A second patch operation based on stale data would overwrite the
health status update
## Solution
Introduced `RefreshHealthWithPatchOps` method that returns patch operations
instead of immediately applying them. This allows batching all status updates
(health + sync) into a single atomic patch operation, eliminating the race
condition.
## Changes
- Added `HealthCheckerInterface` for better testability
- Added `RefreshHealthWithPatchOps` method to return patch ops without applying
- Updated `process` function to batch health and sync status updates
- Added comprehensive unit tests for the fix
Fixes the issue where unhealthy repositories don't show the "Repository is
unhealthy" message in their sync status.
* Fix staticcheck lint error: remove unnecessary nil check for slice
* `grafana-iam`: Fetch target parent folder
* WIP add different ParentProviders
* Add version
* Move code to a different file
* Instantiate resourceParentProvider
* same import name
* imports
* Add tests
* Remove unecessary test
* forgot wire
* WIP integration tests
* Add test to cover list
* Fix caching problem in integration tests
* comments
* Logger and comments
* Add lazy creation and caching
* Instantiate clients only once
* Rerun wire gen
* docs: add docs for displaying links in the dashboard-controls menu
* Update docs/sources/as-code/observability-as-code/schema-v2/links-schema.md
Co-authored-by: Anna Urbiztondo <anna.urbiztondo@grafana.com>
---------
Co-authored-by: Anna Urbiztondo <anna.urbiztondo@grafana.com>
* Suggestions: hashes on suggestions, update logic to select first suggestion
* fix types
* Suggestions: New UI style updates
* update some styles
* getting styles just right
* remove grouping when not on flag
* adjust minimum width for sidebar
* CI cleanups
* updates from ad hoc review
* add loading and error states to suggestions
* remove unused import
* update header ui for panel editor
* restore back button to vizpicker
* fix e2e test
* fix e2e
* add i18n update
* use new util for setVisualization operation
* Apply suggestions from code review
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* comments from review
* updates from review
* Suggestions: Add keyboard support
* fix selector for PluginVisualization.item
---------
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* Docs: Add grafanactl term to glossary
* Edit to adapt to Glossary def length
* Fix
* Real fix
* Fix link
---------
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Sync nav_scope_path with url
* Let the current active scope remain if it is a child of the selected subscope
* Remove location updates based on nav_scope_path to maintain expanded folders
* Fix folder tests
* Remove console logs
* Better mock for changeScopes
* Update test to support the new calls
* Update test with function inputs
* Fix failinging test
* Add tests and add isEqual check for fetching new subscopes
* fix(table): add HTML title attribute to make truncated headings legible
* fix(table): avoid redundant display name calculation
Co-authored-by: Paul Marbach <paul.marbach@grafana.com>
---------
Co-authored-by: Paul Marbach <paul.marbach@grafana.com>
Docs: Update provisioning docs to reflect kubernetesDashboards defaults to true
The kubernetesDashboards feature toggle now defaults to true, so users
don't need to explicitly enable it in their configuration. Updated
documentation and UI to reflect this:
- Removed kubernetesDashboards from configuration examples
- Added notes explaining it's enabled by default
- Clarified that users only need to take action if they've explicitly
disabled it
- Kept validation checks to catch explicit disables
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
* Dashboard: Make variables selectable in controls menu and improve spacing
- Add selection support for variables in controls menu (onPointerDown handler and selection classes)
- Add padding to variables and annotations in controls menu (theme.spacing(1))
- Reduce menu container padding from 1.5 to 1
- Remove margins between menu items
* fix: remove unused imports in DashboardControlsMenu
fix: update variable set state when variable hide property changes
When changing a variable's positioning to show in controls menu using the edit side pane, the state of dashboardControls does not immediately update. This makes it seem to the user that nothing was changed.
The issue was that when a variable's hide property changes, only the variable's state was updated, but not the parent SceneVariableSet state. Components that subscribe to the variable set state (like useDashboardControls) didn't detect the change because the variables array reference remained the same.
This fix updates the parent SceneVariableSet state when a variable's hide property changes, ensuring components that subscribe to the variable set will re-render immediately.
Co-authored-by: grafakus <marc.mignonsin@grafana.com>
* Fix the conversion shallowed error and normalize the conversion status
* Add unit tests to ensure all permutations data loss detection
* Fix counting issue
* Sparkline: Prevent infinite loop when rendering a sparkline with a single value
* some tests for this case
* refactor out utils, experiment with getting highlightIndex working
* add comments throughout for #112977
* remove unused import
* Update Sparkline.test.tsx
* fix points mode rendering
* Sparkline: Improve min/max logic to avoid issues for very narrow deltas
* spread all config
* defaults deep
* delete unused import
* remove go.work.sum delta
* line break at end of file
* Sparkline: Prevent infinite loop when rendering a sparkline with a single value
* some tests for this case
* refactor out utils, experiment with getting highlightIndex working
* add comments throughout for #112977
* remove unused import
* Update Sparkline.test.tsx
* fix points mode rendering
* feat: legacy ListIterator with batches
* chore: address code review
* chore: remove nil check in nextBatch
* chore: move close before count check
* chore: add err field to batchingIterator for its own errors
* chore: remove unused import
* fix: use dsIndexProvider cache on migrations
* chore: use same comment as before
* feat: org-aware TTL cache for schemaversion migration and warmup for single tenant
* chore: use LRU cache
* chore: change DefaultCacheTTL to 1 minute
* chore: address copilot reviews
* chore: use expirable cache
* chore: remove unused import
* Logs: Rename attributes field
* LogLine: emphasize log line body
* LogLine: improve light mode
* Lint
* Update tests
* Only override colors if displayed fields are used
* Fix small font size ignored with displayed fields
* Fix types
* Short Links: Change default expiration to never expire (-1)
Previously, short links defaulted to expiring after 7 days. This change
updates the default to -1 (never expire) to prevent automatic deletion
of shared dashboard links.
Changes:
- conf/defaults.ini: Set expire_time = -1 and update comment
- conf/sample.ini: Set expire_time = -1 and update comment
- pkg/setting/setting.go: Update MustInt default from 7 to -1
The cleanup logic already handles -1 correctly (only runs when > 0),
so no changes needed there.
This unblocks progress on short URL feature improvements by ensuring
shared links remain accessible indefinitely by default.
* fix go
* update docs / comments
* update missed comment in sample.ini
* Revert "fix go"
This reverts commit e0d099ae31.
* chore: update workspace dependencies
Run 'make update-workspace' to sync Go workspace dependencies.
This updates go.mod and go.sum files to match the current workspace state.
* chore: add modowner for apps/quotas dependency
Assign @grafana/grafana-search-and-storage as owner for apps/quotas
dependency to satisfy modowners CI check.
* initial generation
* went through doc to add new resource
* added dummy kind so grafana will run
* added dummy handler and custom route
* fix app name
* gets custom route working - still a dummy route
* adds groupOverride to manifest
* adds quotas to grpc client and server
* WIP - trying to get api recognized - not working
* Gets route working
* fixes group and resource vars
* expects group and resource as separate params
* set content-type header on response
* removes Quotas kind and regens
* Update grafana-app-sdk to v0.48.5
* Update codegen
* updates manifest
* formatting
* updates grafana-app-sdk version to 0.48.5
* regen ResourceClient mocks
* adds tests
* remove commented code
* uncomment go mod tidy
* fix tests and make update workspace
* adds quotas app to codeowners
* formatting
* make gen-apps
* deletes temp file
* fix generated folder code
* make gofmt
* make gen-go
* make update-workspace
* add COPY apps/quotas to Dockerfile
* fix test mock
* fixes undefined NewFolderStatus()
* make gen-apps, and add func for NewFolderStatus
* make gen-apps again
* make update-workspace
* regen folder_object_gen.go
* gofmt
* fix linting
* apps/folder make update-workspace
* make gen-apps
* make gen-apps
* fixes enterprise_imports.go
* go get testcontainers
* adds feature toggle
* make update-workspace
* fix go mod
* fix another client mock
---------
Co-authored-by: Steve Simpson <steve@grafana.com>
* Resolve path directly from leaf node
* Add childrenLoaded field
* Add tests and remove parentNodeId from changeScopes
* Move parentNodeId patameter order
* Resotre call order
* Undo superflous change
* Add comments
* Make sure childrenLoaded state is properly set default to false
* Reference parent path
* Look for parent in state and fetch scopeNode if it is not avilable
* Check for undefined
* Add mock to test
* Set scopeNodeId with recent scopes
* Improve test selector
* Add scope node endpoint to mocks
* Never set childrenLoaded to true when inserting
* Remove unused import
* Pass on the already set childrenLoaded value
* Fix test
* Reapply "K8s: read resource configs from API Enablement for API Builders" (#114475)
This reverts commit 4130bd9cd3.
* revert part that broke things
* FF service changes are gonna come later
* MTFF: allow viewers access to MTFF by enforcing runtime_config for custom routes
* unused var
* removed now
* pass the test, include defaults
* revert sample.ini change
* add legacy search (wip)
* fix search field name
* implement team search endpoint
* generate openapi spec
* generate endpoints for frontend
* minor fixes
* fix issues found while testing
* add more fields to search result
* add basic unit tests
* add more unit tests
* improve getColumns() func in legacy search
* configure search endpoint in team.cue
* add team search handler
* add the searchTeams endpoint to manifest.cue
* make gofmt
* update openapi spec
* generate frontend endpoints
* remove unused field
* move fields defiitions to separate builder
* fix legacy search
* fix unit tests
* fix unit test
* address feedback
* fix unit test
* update openapi specs
* yarn generate-apis
* add missing unit tests
* Reapply "K8s: read resource configs from API Enablement for API Builders" (#114475)
This reverts commit 4130bd9cd3.
* revert part that broke things
* FF service changes are gonna come later
* feat: add options to render under the controls menu
* fix: filter out hidden annotation layers from the dashboard-controls menu
* fix: adjust spacing between annotation controls in the dashboard-controls menu
* fix: e2e test for variables
* feat: move the menu button next to the variables
* fix: remove duplicate link controls
* fix: show dashboard controls when the dashboard is not saved
* fix(dashboard): prevent memory leak in CUE validation by using fresh contexts
Fixes#114344
The CUE validation was reusing a single cue.Context across all
validations, which caused unbounded memory growth due to CUE's internal
caching of intermediate computation results (disjunctions, unifications,
etc.).
Root Cause:
- A single cue.Context was created and reused via getValidator()
- Each validation added entries to the context's internal caches
- These caches grew unboundedly over time
- Memory could not be garbage collected because the context held references
Solution:
- Store the schema source string instead of a compiled cue.Value
- Create a fresh cuecontext.New() for each validation
- This allows the context and its caches to be garbage collected after
each validation completes
Performance Impact:
- ~2x slower due to schema recompilation per validation
- Acceptable trade-off to prevent memory leaks
- Memory usage stays bounded instead of growing unboundedly
* fix(dashboard): use periodic context recreation to prevent CUE memory leaks
Replace fresh context creation with periodic context recreation approach.
The context is reused for up to 100 validations, then recreated to allow
garbage collection of cached values while maintaining good performance.
This balances performance (only 19% slower than leaky approach) with memory
safety (stable at ~5 MB vs ~2 GB leak).
See https://github.com/grafana/grafana/issues/114344#issuecomment-3605562491
* refactor(cuevalidator): simplify to use mutex instead of atomic counter
Since CUE is not thread-safe, we need the mutex for the entire validation
operation anyway. Using a regular int counter protected by the mutex is
simpler and cleaner than using atomic operations.
* Add K8s API redirect for GET resource permissions
* wire
* move restconfig to options
* address comments
* fix helper after adding RestConfigProvider
* Revert K8s redirect changes for service accounts, teams, and receivers
Keep only dashboard and folder redirect functionality for this PR.
Service accounts, teams, and receivers will be handled in a separate PR.
* address comments
* lint
* unified-storage: create resource_events table and add key_path column to resource_history
* Update resource_history_insert template
* update test snapshots
* use latin encoding for key_path and bump size to 2048
Implements the /notification/query endpoint on the historian app. Note that it
does not apply any RBAC right now, that will be a follow up commit.
We have to use a go-kit logger in grafana/alerting, so an adapter is needed.
Going from go-kit to slog is a bit hairy but works well enough.
* Reapply "v1 to v2 conversion: Fix issue when Grafana datasource wouldn't be resolved correctly (#114555)"
This reverts commit db9cff8e2d.
* Update input and fix the failing test
* Update docs
* Remove 406 response since now it is converted
* fix linter
---------
Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
* update documentation to mention protected fields
* alerting docs: add protected field info for grafana cloud
add protected field info for grafana cloud
* prettier
* link fix
---------
Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
* OnGoing
comment
* WIP on the wrapper
* Get before Delete
* WIP: add an unimplemented storage authorizer
* WIP implementing the resource permission authorize
* Implement beforeCreate
* Create, Delete, Update
* List
* Use a resource permissions wrapper
* Switch the main authorizer to service
* Add namespace
* Use compile for list
* Comment
* Remove unecessary comments
* fix bug with folder permissions
* Implement tests for List
* Test get
* List test small refactor
* Delete test
* Reorganize code
* imports
* Start splitting the tests
* test AfterDelete
* actually test beforeWrite
* Implement tests for wrapper create
* Test delete
* Test List and Get
* Fix List
* Remaining tests
* simplify
* Remove comments
* Reorder
* Change authorizer to allow access
[App Platform] Use the app-sdk's apiserver.KubernetesGenericAPIServer in the serverWrapper to ensure that any extra logic for handling WebServices is used.
* Update validation regex for symbol requirement
Fixes#114544
frontend: accept underscore as valid symbol in password validation
* test: add underscore symbol test for strong password policy
* chore(changelog): add changelog for #114571
* Delete changelog/114571.md
* fix: correct indentation in password test
* chore(workflows): skip OIDC steps for fork PRs
* chore(workflows): pass fork status to reusable workflow
* revert: remove workflow changes for fork detection
* revert: remove fork status parameter from workflow caller
* Fix formatting issues in PR patch check workflow
---------
Co-authored-by: Mihaly Gyongyosi <mgyongyosi@users.noreply.github.com>
* Alerting: Add expression type to webhook valueString
- Add Type field to NumberValueCapture struct
- Implement AlertQuery.GetExpressionType() method
- Update valueString format to include type information
* Alerting: Add expression type to webhook valueString
- Fix tests
* Alerting: Add expression type to webhook valueString
- Update default annotations in notifier templates to include type field
* Alerting: Add expression type to webhook valueString
- Add type='math' to webhook and email test expectations
* Suggestions: hashes on suggestions, update logic to select first suggestion
* fix types
* Suggestions: New UI style updates
* update some styles
* getting styles just right
* remove grouping when not on flag
* adjust minimum width for sidebar
* CI cleanups
* updates from ad hoc review
* add loading and error states to suggestions
* remove unused import
* update header ui for panel editor
* restore back button to vizpicker
* fix e2e test
* fix e2e
* add i18n update
* use new util for setVisualization operation
* Apply suggestions from code review
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* comments from review
* updates from review
---------
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* run annotation data migration in batches
* how could i miss it
* run in the background, starting from newest annotations
* update tests
* optionally pass batch size via env
* feat(provisioning): add generic version handling for dashboard export
- Update export job to handle any dashboard version generically (v0, v1, v2, v3, etc.)
- Dynamically construct GroupVersionResource for any stored version
- Cache version-specific clients for efficiency
- Add comprehensive table-driven unit tests for multiple versions
- Add integration test to verify version handling end-to-end
- Remove unnecessary version shim from clean operation (deletion works by name)
* test: add unit test for v2 dashboard version (no suffix)
* fix: add missing transformation for scenes -> save model v2
* fix: link placement transformation on the backend between schemas
* fix: update the openapi spec in the tests
* tes: add tests for `transformSceneToSaveModelSchemaV2`
* tests: extend conversion_test.go to cover link placements
Tests: Fix RuleEditorCloudRules test flakiness in CI
Mock the labels plugin as not installed to ensure consistent test behavior
across OSS and Enterprise environments. The labels plugin detection was
causing different API calls to be made in CI vs local, leading to snapshot
mismatches.
This test is focused on cloud rule creation, not label plugin functionality,
so explicitly disabling the plugin ensures the test remains stable.
* Suggestions: Deprecate previous API, enable external plugin suggestions behind flag
* fix types for deprecated builder
* restore some support for cloud-onboarding
* add support for cloud-onboarding usage, add test to ensure it keeps working
* refactor to not hardcode on 'core:'
* remove unused import
* Alerting: Notification history query API.
First cut at defining a namespace scoped route on the historian.alerting app
to query notification history.
* Address review comments
Change "Service Center" to "Service center" in navigation menu to follow
sentence case capitalization style consistently across the application.
Fixesgrafana/slo#3818🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>
* annotation legacy store with api server, read only
* annotations are not addressable by ID for read operations
* add ownership for an app
* typo, of course
* fix go workspace
* update workspace
* copy annotation app in dockerfile
* experimenting with store interface
* finalising interfaces
* add tags as custom handler
* implement tags handler
* add missing config file
* mute linter
* update generated files
* update workspace
* add viridis and others, allow passing interpolator directly to FieldColorSchemeMode
* fix bug
* be more defensive when getting the fieldcolor
* backend changes
* add d3-scale-chromatic to list of esModules
* have dashboard links on the right side
* Lets try a compromise (#114389)
Try to compromise on white space. Having a lot of links will create unessecary empty space under the time controls, but it is necessary if we want to be able to have the links on the right
---------
Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
Co-authored-by: Sergej-Vlasov <sergej.s.vlasov@gmail.com>
* refactor ColorPicker to functional components
* don't need memo for these components
* convert CustomHeadersSettings to a functional component
* ignore Legacy form components
* ignore legacy forms in some lint rules
* convert JSONFormatter to a functional component
* convert WrapperWithState to a functional component
* convert StatsPicker to a functional component
* convert PopoverController to a functional component
* convert UnitPicker to a functional component
* fix linting
* fix flaky dashboardcontrolsmenu test
We have two historians in alerting - alert state and notification. The intention
of this app is to provide query capabilities for both.
In this initial commit, the existing /history API is simply cloned to the new
app. It is identical except that it will send Kubernetes-style error responses
instead of Grafana-style.
This approach was taken to implement the new app more iteratively - ideally we
would define a new API, but this requires quite a significant overhaul of the
backend code.
* Zanzana: Use team bindings write APIs on the client side
* fix linter
* remove unused code
* Apply suggestions from code review
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
* fix syntax
---------
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
* use exponential backoff in notifier
* Enhance BadgerDB configuration in REST options with memory table size and number of memtables
* Enhance BadgerDB configuration in REST options by adding value threshold for LSM vs value log storage
* first pass of adding quotas service resource server
* passes prom reg as param
init quota service as part of server params
* init quota service as part of server params
* adds config and only creates quota service when overrides file path is defined
* when quota service enabled, check quota on create and log result
* update log message
* adds tests for quota service
* adds tests for config reloading when the file changes
* fix linter errors
* fix comment
* use startAndAwaitRunning
* Simplifies quotas service. Call manager.GetConfig() when getting quota instead of watching for changes.
* adds tracing to quotas service
* adds nsr attributes to traces when getting quotas and resource stats
* update comment
* update comment
remove check for nil overrides since it will (should) never happen
* fix linter error
* refactors naming to overrides service
checks quotas in separate function
* fix quotas naming
* fixes more quotas -> overrides naming
* use logger from ctx
* linter - remove trailing whitespace
* log FromContext() when checking quotas
* adds events to spans instead of create new spans
updates tenant -> namespace naming
few other minor fixes
* SchemaV2: Convertion from v1beta1 to v2beta1
* Compare backend-frontend v1 convertion
* Compare backend-frontend v1 convertion
* Fix fe be diff
* Resolve DS issues
* Fix ds inconsistecnies
* fix legacy string value issues
* fix ds test
* fix layout issue
* update test
* Fix tests and issue with defaultConfig
* Update output
* Fix viz config convertion
* wip
* Fix v1 to v2 dashboard transformation differences
Major fixes implemented:
- Backend function names in conversion.go
- Backend group field logic for queries, annotations, and vizConfig
- Backend datasource resolution with map-based lookup
- Backend timezone handling (empty string vs browser)
- Backend annotation processing (empty array vs default annotation)
- Backend default values (editable, liveNow)
- Backend variable processing (definition, defaultKeys, refresh, refId)
- Backend panel layout (y position calculations)
- Backend VizConfig (Kind and Group fields, default values)
- Frontend snapshot issue (annotations not processing)
- Frontend datasource references (only when original has valid datasource)
Test results:
- annotation-conversions: PASSING (0 differences)
- dashboard-properties: 3 expected architectural differences
- panel-conversions: Multiple expected architectural differences
- variable-conversions: 7 expected architectural differences
All remaining differences are expected architectural choices between
backend persistence optimization and frontend UI consumption optimization.
* fix issues with panel and annotation queries with no datasource
* definition and regex
* Use proper v1beta1 resource when testing
* remove misc file
* fix ds provider test
* fix def ds test in response transformer
* fix remaining ResponseTransformers test
* timesettings, variable refresh, editable, liveNow, definition
* fix transformSceneToSaveModelSchemaV2 test
* revert legacyRow changes
* fix go lint issues
* normalize y coordinates when serializing a row
* clean up
* update tests
* use GetStringValue from schemaversion
* fix go lint - cyclomatic complexity
* update open api snapshot
* add migrated dashboards
* fix default panel type when panel type is not provided
* revert dash link changes for now
* fix
* fix nested panel issue and default ref in v1
* apply defaults to nested panels too
* update snapshots
* fix issues with annotations
* matchers, showLegend, annotations
* when converting also don't process queries that have only a refId
* fix issues with text var
* fix dash links
* default to collapse: false when serializing
* fix: filter refId from variable query specs in backend migration
- Add buildDataQueryKindForVariable function to filter refId for variables
- Remove default refId "A" in transformSingleQuery
- Only include __legacyStringValue for non-empty string queries
- Remove refId addition in transformSaveModelSchemaV2ToScene.getDataQueryForVariable
- Handle undefined queries gracefully in frontend and backend
- Ensure backend matches frontend behavior for query variable serialization
* fix: default variable refresh to 'never' to match frontend behavior
Change backend default for missing refresh field from 'onDashboardLoad'
to 'never' to match frontend defaultVariableRefresh() schema default
* fix: only include iconColor in annotations when it exists
- Frontend: Use defaultAnnotationQuerySpec().iconColor as fallback to match schema defaults
- Backend: Only set iconColor if it exists in v1 input (not using GetStringValue)
- Ensures iconColor is only included when present in original dashboard
* fix: use schema defaults for annotation enable, hide, and iconColor
- Use defaultAnnotationQuerySpec() to get schema defaults instead of hardcoded values
- Default enable to false (schema default) to match frontend behavior
- Use schema default for iconColor and hide fields
- Ensures consistency with frontend which uses defaultAnnotationQuerySpec() defaults
* fix: set collapse for hidden-header rows to match first explicit row
- When panels appear before the first explicit row, the hidden-header row's
collapse should match the first explicit row's collapsed value
- Matches frontend behavior where collapse: panel.collapsed uses the next
row panel's collapsed value
- Ensures consistency between frontend and backend when converting rows layout
* fix: handle constant variables with missing query value
- Frontend: Fix bug where undefined value was converted to string 'undefined'
- Now defaults to empty string when value is undefined: value ? String(value) : ''
- Backend: Match frontend fix - default to empty string for text/value when query is missing
- Ensures consistency when constant variable query is missing from v1 dashboard
* Fix interval variable handling when query is missing
- Extract intervals from options when query is missing/empty (matches backend behavior)
- Handle undefined/null query in getIntervalsFromQueryString
- Handle missing current object/value in getCurrentValueForOldIntervalModel
- Update interval variable refresh to use literal 'onTimeRangeChanged' in schema
- Use defaultIntervalVariableSpec() for interval variable serialization
- Backend: Generate query string from options when query is missing
* Fix corrupted dashboard with systemRef override
* don't resolve types for template variables in datasource refs on the backend
* fix annotation and ds issues
* fix range and special mappings
* fix datasource var pluginId and regex
* add __systemRef to schema
* update v15 migration annotation to have a ds type because v2 keeps track of if type is in the initial save model, and if it's not it removes it, but for frontendOuput we are running transformSaveModelToScene which will then assign the type
* add migration fields since the backend applies automigrations in collapsed rows
* filter out queries in ResponseTransformer that only have refId field
* lint
* v2: add default query if queries are empty to match v1 behavior
* fix single migration test
* tracking test should have a defined spec otherwise datasource is removed and won't be tracked
* initialize default with default ds ref
* wip
* Do not assign DS if ds group is empty
* cleanup
* revert change in setupTests.ts
* clean up TODO
* query with only refId should not expect to have a group
* refactor: extract v0alpha1 to v1beta1 conversion logic into atomic function
- Extract ConvertDashboard_V0_to_V1beta1 into v0alpha1_to_v1beta1.go
- Extract prepareV0ConversionContext and migrateV0Dashboard helper functions
- Standardize v0.go to match v1.go pattern with inline multi-step conversions
- Implement Convert_V0_to_V2alpha1 using atomic functions (v0->v1beta1->v2alpha1)
- Implement Convert_V0_to_V2beta1 using atomic functions (v0->v1beta1->v2alpha1->v2beta1)
- Remove non-atomic v0alpha1_to_v2alpha1.go file
* test: add version-specific test files for conversion error handling
- Extract v0 conversion tests into v0_test.go
- Extract v1 conversion tests into v1_test.go
- Add v2 conversion tests in v2_test.go
- Ensure all error handling paths in conversion functions are covered
- Add tests for Convert_V0_to_V2alpha1 and Convert_V0_to_V2beta1 error paths
- Add tests for Convert_V1beta1_to_V2alpha1 and Convert_V1beta1_to_V2beta1 error paths
- Add tests for Convert_V2alpha1_to_V2beta1 error handling
* Fix tests
* Fix linter
* Clean up
* feat(dashboard): Add automatic data loss detection for dashboard conversions
Implements comprehensive data loss detection for all dashboard API version conversions.
Components Tracked:
• Panels (visualization + library panels)
• Queries (data source queries, excludes row panel queries)
• Annotations
• Links
• Variables (template variables)
Features:
• Automatic detection via withConversionMetrics wrapper (zero code changes)
• Error type: 'conversion_data_loss_error'
• Logs: panelsLost, queriesLost, annotationsLost, linksLost, variablesLost
Bugs Found:
• Fixed critical bug: metrics.go was silently swallowing ALL errors (return nil → return err)
Testing:
• TestDataLossDetectionOnAllInputFiles - runs all conversions with detailed logging
• V2→V0/V1 downgrades write output for debugging then skip (not yet implemented)
• All tests passing
* Run dashboards on schema v2 E2Es
* reveret unintended changes
* cleanup
* Reset active manager correctly according to toggles config
* Fix new dashboard being serialized as v1
* Rename toggle
---------
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
* Provisioning: Unify resources and files view
* Use interactive table
* Add tests
* Show status
* Omit root
* Fix status
* Fix link
* Tab spacing
* Cleanup
* Move funciton outside
* Add source link
* Hide source link for unsynced files
* Show folders sync status
* refactor
* Fix sync folder logic
* refactor
* fix unsynced files type
* Show external source link
* tweaks
* SHow pending for unsynced files
- Remove references to, and related private functions for, `updateNode` and `expandOrFilter`
- Remove obsolete tests
- Update all usages of `updateNode` to `filterNode`
- Integrate `expandOrFilter` functionality into `filterNode`
- Add profiler to `filterNode`
- Add `.claude` to `.gitignore` IDE junk section
- Unit tests for `toggleExpandedNode` and `filterNode`
- Add profiler to `toggleExpandedNode`
Fixes: https://github.com/grafana/grafana-operator-experience-squad/issues/1566
* provisioning: acquire server lock before provisioning dashboards+folders
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
---------
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
* Suggestions: Convert panels to use function supplier
* rework deaggregation
* BarGauge
* cleanup and make consistent the deaggregation in suggestions
* Candlestick
* Implement timeseries and clean up some things that can already be deleted
* spotted some typos in self-review
* restore PanelDataSummary deprecated fields, we wont delete till Grafana 13
* change deprecation message
* remove some unused imports
* run prettier
* update radialbar defaults logic
* update tests and logic to DRY up the reduceOptions a bit and more thoroughly test the output
* Trend: Improve suggestions
* updates from review
* add unique DataFrameType list to PanelDataSummary
* add histogram suggestions
* rework panelDataSummary to be a class, change some things
* further boil down PanelDataSummary
* Improve FlameGgraph suggestions
* geomap and other defaults
* reorder the single frame with string and number test
* Moving things around
* Update frontend to support CUA
* Add CUA support to backend
* Copy parseURL function to where it's used
* Update test
* Remove experimental-strip-types
* Docs
* A bit more of a refactor to reduce complexity
* Revert "Remove experimental-strip-types"
This reverts commit 70fbc1c0cd.
* Review
* Docs updates
* Another docs fix
* Logs: store sort order in the URL
* ToolbarExtensionPoint: pass sort order to extension
* Logs: send sort order in links
* ToolbarExtensionPoint: pass panelState instead of sortOrder
* Update test
* Remove condition
* Logs: initialize sort order and remove unnecessary check
* Set navigationScope if we have a subScope
* Proper URL sync
* Update unit test with dashboards service subscription handling
* Add a bunch of tests
* Update functionality to change scopes when clicking on icon
* Add test for TreeFolderItem
* Udpate test and remove errors
* Fix issues in test
* Use ScopeNavgiations by default in the ScopesDashboardService unit tests
* Remove misplaced test
Fix search for existing provisioned dashboards in modes 3+
The search query was not requesting the dashboard's "legacy ID". As a result,
the provisioning process would not find existing provisioned dashboards, making
copies of these dashboards every time there was a change in the provisioned
dashboard's definition.
* add retries to the setup enterprise action
* add fail pipeline after the last retry
* fix a dyslectic typo
* fix syntax errors in the script
* fix syntax errors in the script and the issue detected by zizmor
* cd to grafana enterprise dir
* update the go ws
Part 2 of adding version messages to the `alert_rule_version` able. This allows
setting the message via a header when using the Prometheus conversion API,
which can be useful for e.g. linking changes back to source control.
* newVizSuggestions feature toggle
* panel empty state
* add data check
* select first suggestion
* update text
* PanelEmptyState component
* add test
* ?
* remove fake translation
* Visualizations -> All visualizations
* updates
* move empty state to UnconfiguredPanel
* default tab to Suggestions; new tabs and content
* select first suggestion; apply button; removed search functionaility from suggestions
* extract hasData
* refactor
* cleanup
* fix default selection
* translation
* hasData test
* update e2e
* fix width of suggestions tabs
* make sure we only show a max of two columns
* useMeasure with a static gridTemplateColumns def
* Suggestions: hashes on suggestions, update logic to select first suggestion
* reorganize comments a little bit
* fix types
* add tests for hashes
---------
Co-authored-by: Paul Marbach <paul.marbach@grafana.com>
* bump i18next-cli to latest
* make it 1.24.22 while we're here
* Update extracted phrases after i18n-extract update
* yarn dedupe
---------
Co-authored-by: joshhunt <josh.hunt@grafana.com>
* fix: collate rule_group column as utf8mb4_bin
This ensures this column is sorted identically by the database and
golang, which should eliminate issues related to a mismatch in sort
order.
* chore: make test stricter
* fix: also add binary collation for postgres
* feat: add plugin extension point to SingleTopBar for setup guide integration
* feat: add plugin extension point for grafana-setupguide-app in MegaMenu
* feat: add TopBarExtensionPoint for grafana-setupguide-app integration
* feat: add MegaMenuExtensionPoint for grafana-setupguide-app integration
* feat: simplify MegaMenu and TopBar extension points by removing unused context checks
* feat: add MegaMenuAction and SingleTopBarAction to PluginExtensionPoints
* refactor: simplify return statement in MegaMenu and TopBar extension points
* feat: update extension point IDs in MegaMenu and TopBar components to use PluginExtensionPoints
* implement alerting for v2 schema
* clean up
* clarify
* add support for library panels
* comment
* include missing library panel when v1 returns v2; cleanup
* Use type union
* remove unneccesary check
* add AlertStatesDataLayer so that alert state is displayed next to panel title
* fix test
* cleanup undefined
To better observe and identify performance bottlenecks in the prometheus rules API.
The following spans were added:
- `api.prometheus.RouteGetRuleStatuses`
- `api.prometheus.PrepareRuleGroupStatusesV2`
The `api.prometheus.PrepareRuleGroupStatusesV2` includes attributes to capture the parameters used in the request to help with debugging and performance analysis.
* Deprecating features.IsEnabled
* add one more nolint
* add one more nolint
* Give better hints to devs in the deprecation message of IsEnabledGlobally
* adding more doc strings
* fix linter after rebase
* Extend deprecation message
* Unified Storage: allow rebuilding indexes for resource from a new grpc endpoint
* remove log line
* fix trace def
* lint
* fix after rebase
* addressing code review changes
* update with one channel per rebuild request
* other review suggestions
* update with review suggestions
* run mockery generate for MockResourceClient
* update tests
* update tests and lint
* fix test
* Secrets manager: create secure value using the active keeper
* SecureValueService.Update: fetch secure value from db to get the keeper
* fix keeper_store_test.go
* SecureValueService: fix bug in update where the current version keeper wasn't being passed to the createNewVersion method
* make gofmt
* remove outdated test
* update TestModel
* undo enterprise_imports changes
* use xkube.Namespace
* migrator: set secret_secure_value.keeper to 'system' when the column is null
* indent cue
* fix tests
* fix enterprise imports
* properly fix enterprise imports
* make update-workspace
* go mod tidy
---------
Co-authored-by: Matheus Macabu <macabu.matheus@gmail.com>
* refactor: extract logic
* directly use the setting.cfg in the middleware
* more granular config handling, per section
* fixed unit test
* refactor code to avoid lint error
* Add library panel repeat options to v2 schema during conversion
* use any instead of interface{}
* change to common.Unstructured instead of byte[] for model field
* Fix the tests and let the library panel behavior fetch repeat options in public and scripted dashboards
* fix library panel differences between backend and frontend conversion
* feat(toggle): new feature toggle for time range zoom keyboard shortcuts
* feat(keyboard-shortcuts): handle `t +` and `t -` key combinations
* test(keyboard-shortcuts): validate time range zoom with `t +`, and `t -`
* chore(i18n): update keyboard shortcut translations
* refactor(time-range): no-op when timespan is zero instead of defaulting
* Timeseries: More nuanced editing of linear threshold to avoid crashes
* remove useEffect import
* remove unused import
* update error and invalid field handling to call out error case
* `grafana-iam`: Use the UniStore as the default store
* Refactor all instantiations
* Remove enableDualWriter
* Nit. dw is clear enough
* Use the correct access control client
* feat: add retry logic for transient errors in Kubernetes client
Add retry wrapper for dynamic.ResourceInterface that automatically retries
transient errors using Kubernetes' wait.ExponentialBackoff utility.
- Implements retry logic with exponential backoff for all Kubernetes API operations
- Detects transient errors: ServiceUnavailable, ServerTimeout, TooManyRequests,
InternalError, Timeout, and network errors
- Uses wait.ExponentialBackoff from k8s.io/apimachinery/pkg/util/wait
- Respects context cancellation
- Includes comprehensive unit tests
Part of https://github.com/grafana/git-ui-sync-project/issues/634
* docs: add detailed documentation for defaultRetryBackoff
Document when retry attempts will happen, what errors trigger retries,
and the retry behavior (attempts, delays, exponential backoff, jitter).
* feat: add logging and increase retry attempts for Kubernetes client
- Add context logger to track retry attempts (Info for retries, Warn for exhaustion)
- Increase retry attempts from 5 to 8 steps (~10 seconds total retry window)
- Document when all retry attempts will fail:
* API server completely unavailable/unreachable
* Network connectivity issues persist beyond retry window
* Consistent transient errors for entire retry duration
* Context cancellation before retries complete
* chore: update retry client documentation
* fix: resolve linting issues in retry client
- Replace type assertions with errors.As for wrapped errors
- Remove deprecated Temporary() check (deprecated since Go 1.18)
- Update tests to remove temporary error test case
* fix: resolve staticcheck S1008 linting issue in retry_client.go
Simplify return statement to use errors.As directly instead of if-return pattern
* chore(deps): update nanogit to v0.3.0 in go.mod and go.sum files
* Add retry logic for nanogit client operations
- Configure retry logic in withGitContext to ensure all Git operations have retry support
- Use nanogit's ExponentialBackoffRetrier with 8 attempts (~10s retry window)
- Retry transient network errors and HTTP-specific server errors (5xx for GET/DELETE, 429 for all)
- Rename logger function to withGitContext to better reflect its responsibilities
* fix: resolve staticcheck S1008 linting issue in retry_client.go
Simplify return statement to use errors.As directly instead of if-return pattern
* Revert "fix: resolve staticcheck S1008 linting issue in retry_client.go"
This reverts commit bd367b5629.
* Prometheus: Hide 'Kick start your query' button for existing queries
* refactor: simplify query check logic in Prometheus editor
Remove unnecessary useMemo and buildVisualQueryFromString logic.
Just check query.expr directly to determine button visibility.
* fix: format code with prettier
* do not create sa with no expiration when day limit is set
* disable No expiration option if day limit is set
* make i18n-extract
* run prettier
* address feedback
* initial wip
* fixes
* Switching to context
* New button design
* Overflow ellipsis
* Changes to button
* initial resize work
* resize progress
* Update
* no reszier in tabs mode
* fixing text truncte, and tabs right position
* Minor story tweaks
* added unit test
* added unit test
* Minor change
* minor story fix
* Fixes
* Moving things around
* Copy parseURL function to where it's used
* Update test
* Remove experimental-strip-types
* Revert "Remove experimental-strip-types"
This reverts commit 70fbc1c0cd.
* Trigger build
This adds a `message` column to the `alert_rule_version` table. This follows the
pattern established for dashboards as closely as possible. A new type is
introduced internally for passing the new `message` field around in a type-safe
manner, but doing the same for the API types becomes very messy. In that case, a
new field is added with omitempty.
Note this PR is only:
- The column addition
- The "read" path; API for listing versions
Subsequent PRs will add code to actually set the message when updating rules.
* Add getDefaultExpressions tests
* Fix expression queries when building form values from a panel
* make query params empty and add some better types
* update snapshots
* fix tests
* Revert devenv changes
* update shapshot
---------
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
* chore: bump authlib/types to v0.0.0-20251119142549-be091cf2f4d4
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
* Update Go Workspace
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
* Stop supporting deprecated namespace format in TestExtendedJWT_Authenticate
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
* Update go mod
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
---------
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
* Chore: Add html_handler_requests metric for tracking requests handled by index.go
* make a member of HttpServer
* make it a histogram instead
* update test
* OAuth: Optionally make refresh tokens required if use_refresh_token is enabled
* make linter happy
* feedback: log missing refresh token during token refresh
* feedback: tweak wording in the message & change level
* Plugins: add card extension to nav-landing-page
* feat(nav-landing-page): update card extension to include category and onClick support
* feat(NavLandingPage): add setPluginLinksHook to test setup
* feat(NavLandingPageCard): refactor className handling using cx for better style management
* feat(NavLandingPage): update card extension targets to use plural form for consistency
* feat(NavLandingPage): add warning for mutually exclusive extension points
* remove feature toggle dataplaneFrontendFallback because GA
* remove feature toggle logic
* fix import
* fix toggle ownership from merging main
* merge main
* fix extra feature toggle
* Rework UI of SQL Transformation card
I made a few changes:
- Green - to indicate that this is DIFFERENT from the other transforms, not similar
- Command prompt, not a preview of the table input and output - to indicate that
- you code this yourself, and
- the output table format is not predictable - it's entirely outside of our control
I updated the card title to "Transform with SQL" because I felt this was more
indicative of what the user will be doing. It's a call to action.
* Reverse the change to the illustration
The changes to the illustration aren't ready yet,
As per PR feedback in comment: https://github.com/grafana/grafana/pull/114093#issuecomment-3547943167
* Update tests and code with new header text
* convert LoginCtrl to a functional component
* convert NumberInput to a functional component
* convert StringArrayEditor to a functional component
* convert TeamPicker to a functional component
* convert AddToOrgModal to a functional component
* don't set noMargin yet
* convert UserProfile to a functional component
* convert AnnotationFieldMapper to a functional component
* convert PanelHeaderCorner to a functional component
* convert ShareExport to a functional component
* convert ShareLink to a functional component
* convert RawPrometheusContainer to a functional component
* Alerting: Fix for fetching evaluation group in new filter
* WIP: Add async evaluation groups dropdown with 500 group limit
* Add text to query param if threshold limit reached
* update translations, remove group info tooltip
* resolve PR comment
* passes nsr to GetResourceStats instead of just namespace
* removes ns check
* fixes failing tests
* make update-workspace
* pass group and resource from rebuild request when getting resource stats
* Suggestions: Update ownership of core files and improve some types
* Suggestions: Proposed PanelPlugin API
* get rid of .useSuggestionsConfig
* update i18n
* iterate on TypeScript types, add example in radialbar
* tweak implementation, add commentary
* actually, suggestions really does not need panel defaults
* split suggestions handler into its own file and add tests for radialbar
* small comment revision
* fix test
* add ds.hasData check back for state-timeline
* restore a handful of comments that got lost in the merge shuffle
* more updated commnets
* remove pluginId from VisualizationSuggestion, whoops
* fix getAllSuggestions test
* update i18n
* might as well restore description here
* move fieldconfig back on radialbar
* call them suppliers, remove boolean return type in favor of internal util
* Update packages/grafana-data/src/panel/PanelPlugin.ts
* Update packages/grafana-data/src/panel/PanelPlugin.ts
* Update packages/grafana-data/src/panel/PanelPlugin.ts
* tweak return type for setSuggestionSupplier to be this
* wip
* wip
* wip
* wip
* wip
* wip
* removed array.from.
* using concat
* added more tests.
* renamed according to feedback.
* Update the getPluginExtensions to use the slice.
* fixed expect statements.
* Reverted the test app from the allow list.
* cleanded up tests.
* added generic tests for base functionality.
* removed unused iport.
* Tags can only be string array.
* Be more lenient when parsing dashboard. Parse what we can, don't error out easily.
* Check element before parsing, log unexpected types.
* Transformations: Add empty state placeholder with SQL expression and transformation cards
- Extract TransformationCard and SqlExpressionCard into separate reusable components
- Add new empty transformations placeholder UI behind transformationsEmptyPlaceholder feature toggle
- Add auto-scroll to SQL expression when navigating from transformations tab
- Add analytics tracking for transformation interactions
- Split EmptyTransformationsMessage into Legacy and New variants for easier toggle removal
* add tests
* Table: Clean up filter popover layout
* Table: Improve filter selection ux text
* remove unused ref
* update snapshot test
* whoops, we don't want to change the global input suffix padding
* Initial nested scope navigation
* Seperate sections for scope navigation vs groups
* Add ungrouped navigation items
* Create tree structure helper for mock scope navigations
* Improve generated folder structure and add link to change scope
* Update mocks
* DevEnv Navigations
* Remove mocks
* Update button position and add border
* Remove subScope from TreeLink
* Do unblocking async update
* Add loading state
* Allow '' for root groups
* Formatting
* Add unit and integration tests
* Update openapi spec
* Update tooltip for IconButton
* Update i18n
* Make code more DRY
* Update public/app/dev-utils.ts
* update folderUpdate type
* Remove isSubScope in facvor of checking subScopeName
* Do an early return
* Use subScopeName
* Remove use of isSubScope
* Prevent nested items with the same subScope
* Extract filder method to function
---------
Co-authored-by: Mariell Hoversholm <mariell@mardroemmar.dev>
* Remove addFieldFromCalculationStatFunctions feature toggle
The addFieldFromCalculationStatFunctions feature toggle was at GA stage
and enabled by default. This commit removes the toggle and makes the
cumulative and window functions permanently available in the add field
from calculation transformation.
Changes:
- Removed feature toggle definition from registry.go
- Updated CalculateFieldTransformerEditor to always include cumulative and window functions
- Removed unused config import
- Removed documentation entry
- Regenerated all generated files (toggles_gen.go, toggles_gen.csv, toggles_gen.json, featureToggles.gen.ts)
* fix merge conflicts
* Timeline: Add timeRangePan
* Add tests for state timeline
* Add tests for status history
* Fix state timeline test and use same dashboard
* Consolidate tests
* Optimize time range pan tests
* Create unit tests for communityDashboardHelper
* Add unit test for autoMapDatasources
* Create unit test for DashboardCard
* --wip-- [skip ci]
* Fix test
* fix linting
* Add unit test to the dashboardLibraryApi
* update codeowners for dashboard library code
* fix: improve test coverage and fix failing tests
- Fix image handling tests in DashboardCard to verify actual behavior
- Fix UID filtering test in autoMapDatasources to use correct mock data
- Add test for dimThumbnail prop
- Add test for undefined inputs edge case
- All 82 tests now passing
* render function modified
* merge with template dashboard modifications. tests modified
---------
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
Co-authored-by: Juan Cabanas <juan.cabanas@grafana.com>
* Refactor rules filter to easily switch between frontend and backend filters
* Refactor getFilter functions to receive filters as an argument
* Move filter normalization to getFilter utils
* Transformers: Remove formatString feature toggle
The formatString feature toggle was in GA stage and enabled by default.
This change removes the feature toggle and makes the format string
transformer always available.
Changes:
- Remove formatString feature toggle definition from registry
- Remove conditional check in standardTransformers.ts
- Update feature toggle git log with deletion timestamp
- Regenerate feature toggle files
* fix lint errors
Remove groupToNestedTableTransformation feature toggle
The group to nested table transformation has reached GA and is now
enabled by default. This commit removes the feature toggle and makes
the transformation always available.
Changes:
- Removed feature toggle definition from registry.go
- Updated standardTransformers.ts to always include the transformation
- Updated feature toggles documentation
- Regenerated feature toggle files
Remove regressionTransformation feature toggle
The regression analysis transformation feature is now GA and no longer needs to be behind a feature toggle.
* Extend interpolate endpoint to support community dashboard json interpolation
Added unit tests
* Implement Frontend Side
- Show tabs
- Fetch Community dashboads
- basic cards for community
- Search bar for community
* Improve card community and show thumbnails
* quick poc with template dashboards
* better cards ui
* entry point conditional added. dashboard card improved
* dev dashboard for testing
* details removed in template dashboard modal
* improvement when loading the templates
* dashboard from template entry points
* interactions added
* tracking event improvements. card improvement
* unused import removed
* 90% Complete MVP community dashboards integraton
- Use DashboardCard component
- Search grafana dashboard in the community tab
- Make Tabs and pagination sticky
- Adjust titles to be scoped by datasource name/type
- Add skeleton loading for community tabs and pagination
- Add dashboard details tooltip
* Use DataSourcePicker for extra configuration page
* Fix suggested dashboard, don't use filter but slug and also add gcomURLink
* Implement badge, for now reuse Badge component
* translations added
* Refactor code, extract to utils function and clean up code
* refactor provisioned dashboards images
* add missing file
* Extract API functions
* standarize event handlers
* Auto select tab when provisioned or community are not present, also add empty state for provisioned tab
* use SecondaryAction iconButton for Details, and also use Tooltip
* For suggested dashboards change Grid for Stack to fix issue with less than 3 dashboards, also add the details next to
the main action
* Fix styling issue with description miss-aligment
* Change "use template" to use dashboard
* update i18n
* fix broken unit test
* FF added
* uid changed to make it work for both scenarios
* Apply PR feedback
- add eventLocation
- Fix description placeholder
- Fix issue with suggested dashboards card aligment, change to Grid
* use datasource type instead of name, extract i18n and fix linting
* Improve View on Grafana.com link
* remove console.log
* Fix issue with cards styling
* improvements
* Apply suggestion from @juanicabanas
Co-authored-by: Juan Cabanas <juan.cabanas@grafana.com>
* Use query params for modal state and reorder dashboard empty to keep suggestions in the middle
* extract common interpolate logic in new function
* fix linting
* rename loadTemplateDashboard function to loadSuggestedDashboard
* Improve automapping layout, add dashboard name to title and pipe the mappings
* Apply style guide for callback functions, and refactor constant inputs initialization wiht reduce
* Fix styling issues with focus border and pagination
* fix issue with card aligment
* use attach skeleton instead of custom css
* Adjust all i18n to use dashboard-library key
* Refactor mapping form to use one array to handle unmapped ds
* Update public/app/features/dashboard/dashgrid/DashboardLibrary/CommunityDashboardSection.tsx
Co-authored-by: Juan Cabanas <juan.cabanas@grafana.com>
* Refactor pagination, use api pagination data
* Remove unnecesary trim
* Fix issue with Stack height and justifyContent in modal
* Update public/app/features/dashboard/dashgrid/DashboardLibrary/SuggestedDashboards.tsx
Co-authored-by: Juan Cabanas <juan.cabanas@grafana.com>
* Add missing dependency
* Fix issue with mapping config form, make buttons to be aligned at the bottom
* Fix unit tests
* Add and refactor tracking interactions to support experiment KPIS
* rename unmappedInputs to unmappedDsInputs for clarity
* Update public/app/features/dashboard/dashgrid/DashboardLibrary/CommunityDashboardSection.tsx
Co-authored-by: Juan Cabanas <juan.cabanas@grafana.com>
* rename modal and move modal to section
* Simplify search params, extrack user selected dashboards to helper function, update pagination styles and use url based
pagination
* Move modal logic to the suggested dashboards component
* Fix tracking duplication on first load and revert change on pagination url persistence
* Extrac on preview community dashboard into utils
* Bring old datasource-provisioned box back and rely on new feature toggle for community dashboards
* change logic for showing suggested dashboards, we only need to enable that feature toggle
* update i18n
* Fix unit test for basic provisioned dashboard
* fix css
* Apply feedback
* Add suggested dashboards to endpoint
* Add missing feature toggle check in the backend to expose the interpolate api
* Add extra test case
* update swagger
* Update public/app/features/dashboard/dashgrid/DashboardEmpty/DashboardEmpty.tsx
Co-authored-by: Juan Cabanas <juan.cabanas@grafana.com>
* update swagger
* changes applied to retrieve templates dashboards from raintank
* translations
* Remove duplicated tracking and add gnet id to the save tracking action
* interactions
* improvements applied
* last improvements
* tracking events modified with merge. translations fixed
* tests fixed
* uid property removed from dto. new way of tracking the ds types added
* ds types from gnet dashboard removed
* fixes
* tracking changed
* tracking modified
---------
Co-authored-by: alexandra vargas <alexa1866@gmail.com>
Co-authored-by: Alexa Vargas <239999+axelavargas@users.noreply.github.com>
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
* Start using adhoc filters component in trace view
* Migrate old span filters to adhoc filters
* Add support for duration filter
* Set placeholder in adhoc filters input
* Moved the span graph to the header, above the filters
* Update next and prev buttons, added filter pills, style fixes
* Fix types
* Use canary scenes version
* Remove copyright
* More duration operators
* Added tests for the controller
* More consistent spacing
* Remove unused container style from SpanGraph component
* Update scenes canary
* Update scenes to 6.42.0
* Fix all spans toggle
* Use InlineSwitch instead of Switch
* Fix critical path
* Fix duration filtering
* Add tooltips to filter pills
* Improve duration filter pill
* Improvements to backgrounds of span row. Fixed size of collapsible overview section
* Fix sticky trace view header
* Removed old span filters from panel options
* Migrate old filters to adhocfilters in panel. Use the adhoc filters component in panel options.
* i18n
* Fix tests
* Fix tests
Datasources: Apply default_manage_alerts_ui_toggle config to Loki datasource
- Update AlertingSettings component to use config.defaultDatasourceManageAlertsUiToggle
- Change from options.jsonData.manageAlerts !== false to nullish coalescing operator
- Add comprehensive tests for config behavior
- Ensures consistency with Prometheus datasource implementation from PR #98441
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
* rename canvas class method so it's not falsely marked as a react class component
* also rename scene method
* rename render method in OptionsPaneCategoryDescriptor and OptionsPaneItemDescriptor
* rename render to setup in test scenario class
* Add optimistic concurrency
* add optimistic concurrency
* fix test
* nit
* fix tests for sql
* fix tests for sql
* rebase fix
* add one more check
* Implement GetLatestAndPredecessor method in datastore and add corresponding tests. This new functionality retrieves the latest resource version and its immediate predecessor, handling cases for single and non-existent resources. Update WriteEvent to utilize this method for improved optimistic concurrency control.
* Enhance optimistic concurrency control in WriteEvent method. Added checks for concurrent create operations to ensure only one succeeds, preventing race conditions. Updated tests to validate this behavior with multiple concurrent create attempts.
* lint
* Refactor optimistic concurrency check in WriteEvent method. Simplified the logic by removing unnecessary condition for single version existence, ensuring more robust handling of concurrent modifications.
* Provisioning: Remove image renderer note from PR comment template
Removes the 'NOTE: The image renderer is not configured' message from
the pull request comment template when image renderer is unavailable.
This addresses issue #656 in git-ui-sync-project.
- Updated commentTemplateMissingImageRenderer to be empty
- Updated testdata to reflect the change
- All unit tests pass
* Provisioning: Make image renderer note optional in PR comments
Make the image renderer note in pull request comments optional based on
the allowImageRendering configuration flag. When enabled, the note now
includes a link to the setup documentation.
- Add showImageRendererNote boolean field to commenter struct
- Update NewCommenter to accept showImageRendererNote parameter
- Update template to conditionally show note with documentation link
- Pass allowImageRendering from APIBuilder to commenter in register.go
- Update ProvidePullRequestWorker to use cfg.ProvisioningAllowImageRendering
- Add tests to verify note appears/disappears based on flag
Fixes https://github.com/grafana/git-ui-sync-project/issues/656
* Format code with go fmt
* Remove redundant text from image renderer note
Remove 'The image renderer is not configured.' from the note message.
The note now focuses on actionable guidance with the documentation link.
* Fix compilation error: use cfg.ProvisioningAllowImageRendering directly
Cannot access unexported field allowImageRendering from webhooks package.
Use cfg.ProvisioningAllowImageRendering directly since we have access to cfg.
* provisioning: detect stale sync status and trigger resync
When sync jobs expire and are cleaned up by the expired job cleanup
controller, the Repository sync status remains stuck in Pending or
Working state. This prevents new sync jobs from being queued because
shouldResync() blocks on these states.
This change adds detection logic in shouldResync() to check if a sync
job referenced in the sync status still exists. If the job doesn't exist
(NotFound), we trigger a resync to reconcile the stale state.
Fixesgrafana/git-ui-sync-project#626
* test: remove unused mocks and fix test case
- Remove unused mockRepositoryLister and mockRepositoryNamespaceLister types
- Remove unused imports (labels, listers)
- Remove test case for sync disabled scenario as we don't care about sync enabled state when detecting stale status
* add support for converting Mimir integrations to Integration
* implement imported config revision
* update service to load staged receivers if configured
* make sure non-Grafana origin cannot be mutated
* set access control metadata for imported origin
* set includeImported from feature flag. Disabled for service used by provisioning
* add tests for new functionality
* add snapshot-based integration test
* fix space under time controls by using floats instead of flex
* remove commented out styles
* adjust spacing: use marginBottom and reduce bottom padding
* make Add variable button float inline with variables
* feat(time-range): click and drag interaction to pan x-axis over time
* feat(timeseries): add x-axis interaction area uPlot plugin
* test(timeseries): validate x-axis pan with Playwright browser test
* refactor(uplot-config): simplify state management for x-axis panning
* refactor(uplot-config): plot state union type
* fix(time-range-pan): simplify calcs, mouse handler cleanup function
* Remove custom styles from ExtensionToolbarItemButton
* Use active ToolbarButton variant for ExtensionToolbarItemButton
* Use active ToolbarButton variant for HelpTopBarButton
* Simplify ExtensionToolbarItemButton conditional logic
* Replace nested ternary with iife
* refactor: Move job cleanup to separate controller and fix history write
- Created JobCleanupController in apps/provisioning/pkg/controller
- Separated cleanup logic from ConcurrentJobDriver
- Fixed bug where expired jobs were not written to history
- Added comprehensive tests with 93.8% coverage
- Removed cleanup interval parameter from ConcurrentJobDriver
- Cleanup now properly follows Complete + WriteJob pattern
Fixes expired jobs being lost instead of archived
* refactor: Update lease renewal interval to use jobExpiry variable
- Changed the lease renewal interval in the GetPostStartHooks method to utilize the jobExpiry variable for improved clarity and maintainability.
* Format code
* Fix Unix milliseconds
* fix: correct Unix timestamp assertions and remove duplicate test expectations
- Changed Unix() to UnixMilli() for correct millisecond timestamp validation
- Removed duplicate store.AssertExpectations(t) calls throughout tests
* Remove correlations feature toggle
The correlations feature toggle has been removed from the registry and all
usages throughout the codebase have been cleaned up. Correlations are now
always available.
* Provisioning: Improve logging and tracing in job processing
- Add comprehensive tracing with OpenTelemetry spans across all job operations
- Enhance logging with consistent style: lowercase, concise messages, appropriate log levels
- Use past tense for completed lifecycle events (e.g., 'stopped' vs 'stop')
- Add structured logging with contextual attributes for better searchability
- Handle graceful shutdowns without throwing errors on context cancellation
- Refactor Cleanup method into listExpiredJobs and cleanUpExpiredJob for better code quality
- Avoid double logging by only logging errors when handled locally
- Add tracing and logging to historyjob controller cleanup operations
Files modified:
- pkg/registry/apis/provisioning/jobs/driver.go: Add tracing spans and improve error handling for graceful shutdown
- pkg/registry/apis/provisioning/jobs/concurrent_driver.go: Add tracing and consistent logging
- pkg/registry/apis/provisioning/jobs/persistentstore.go: Add comprehensive tracing and logging to all public methods, refactor cleanup
- apps/provisioning/pkg/controller/historyjob.go: Add tracing and improve logging consistency
* Update pkg/registry/apis/provisioning/jobs/persistentstore.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Refactor logging in persistentstore.go
- Remove debug log statements at the start of job operations for cleaner output
- Maintain structured logging with contextual attributes for improved traceability
Files modified:
- pkg/registry/apis/provisioning/jobs/persistentstore.go: Clean up logging for job operations
* Enhance logging and tracing in provisioning job operations
- Introduce OpenTelemetry spans for better observability in job processing and webhook handling
- Improve structured logging with contextual attributes for key operations
- Remove unnecessary tracing spans in long-running functions to streamline performance
- Update error handling to record errors in spans for better traceability
Files modified:
- pkg/registry/apis/provisioning/controller/repository.go: Add tracing and structured logging to sync job operations
- pkg/registry/apis/provisioning/jobs/concurrent_driver.go: Remove tracing span from long-running function
- pkg/registry/apis/provisioning/jobs/driver.go: Enhance logging and tracing in job processing
- pkg/registry/apis/provisioning/webhooks/webhook.go: Implement tracing and structured logging for webhook connections
* Update pkg/registry/apis/provisioning/jobs/driver.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Improve error handling in ConcurrentJobDriver to differentiate between graceful shutdown and unexpected stops
* Remove unused import in driver.go to clean up code
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
The FlagGrafanaAPIServerWithExperimentalAPIs is only available when
`app_mode=development`. We have a more specific flag that is usable in
production, so use that.
Also, there was some old code constraining these APIs to a static list
of datasources. We don't need that anymore, so this PR removes it.
The FlagQueryServiceWithConnections is left as is, because there are
multiple existing tests that rely on this development-only, experimental
flag. I don't want to understand why that is.
* Explore: Ensure data source is part of query object in internal data links
Fixes#112945
* Fix tests
* Fix tests
* Update tests
* Update tests
* Add a safeguard for misconfigured links
* Update logic to update uid when only type or name is defined
Remove extractFieldsNameDeduplication feature toggle
The extractFieldsNameDeduplication feature has reached GA (General Availability),
so the feature toggle is no longer needed. The name deduplication behavior is
now permanently enabled.
Changes:
- Removed feature toggle definition from registry.go
- Removed feature toggle check in extractFields.ts (always deduplicate now)
- Updated tests to remove feature toggle manipulation
- Regenerated feature toggle files
If an alert rule with an invalid receiver is created it breaks the entire alertmanager configuration rather than preventing the save.
This fixes the issue by erroring on save and apply, and logging invalid receivers only when applying the config after an update.
Introduced in #111838
* Extend interpolate endpoint to support community dashboard json interpolation
Added unit tests
* Implement Frontend Side
- Show tabs
- Fetch Community dashboads
- Use DashboardCard component
- Search grafana dashboard in the community tab
- Make Tabs and pagination sticky
- Adjust titles to be scoped by datasource name/type
- Add skeleton loading for community tabs and pagination
- Add dashboard details tooltip
- Bring old datasource-provisioned box back and rely on new feature toggle for community dashboards
- update i18n
- update swagger
---------
Co-authored-by: Juan Cabanas <juan.cabanas@grafana.com>
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
* UI: Fix Slider component to handle decimal inputs correctly
* format code and run eslint fix
* fix Slider to have:
- "single" source of truth for state
- state synchronization for controlled values
- clamp values to step
- disallow decimal values in input when min+step are integers
- tests for the new functionality
- design decision included in docs
- behavior notes in docs
* allow non-numeric characters all the time
always parse decimal numbers, stripping non-numerics
integer coercion is implicitly handled in clamping
---------
Co-authored-by: Harshada Gawas <harshadagawas95@gmail.com>
* Remove dashboardDsAdHocFiltering feature toggle
The dashboardDsAdHocFiltering feature toggle has been enabled by default
and is now in General Availability stage. This commit removes the feature
toggle and makes the AdHoc filtering functionality for the dashboard
datasource permanently available.
Changes:
- Remove feature toggle from registry.go
- Regenerate feature toggle files
- Remove conditional checks in frontend code
- Update tests to reflect permanent enablement
- Always show AdHoc Filters toggle in dashboard query editor
- Always enable dashboard datasource in DataSourcePicker for variables
* Remove unused imports
* Fix Prettier formatting issues
* Alerting: Fix support for converted Prometheus rules in app-platform apis
Retrieving converted Prometheus retrieval rules was not supported in the app-platform apis and was throwing a 500 error due to the provenance not being handled properly.
Also adds a test to cover converted Prometheus rules when getting rules.
Closes https://github.com/grafana/alerting-squad/issues/1200
* add test to confirm provenance compatibility
* feat(panel-zoom): change mouse cursor when zooming x-axis or y-axis
* test(panel-zoom): browser test mouse cursor change interactions
* fix(mouse-cursor-styles): no need for important
Fix: Include ref field in DELETE endpoint response for branch operations
When deleting a dashboard file via DELETE endpoint with a ref query parameter
(for branch operations), the response was missing the ref field. This caused
the frontend branch workflow success handler to fail silently.
The issue was an inverted boolean condition in the Delete method. The code
was setting file.Ref = opts.Ref when shouldUpdateGrafanaDB returned true
(main branch operations), but it should have been setting it when false
(branch operations), since we read the file with an empty ref.
Fixed by inverting the condition from:
if r.shouldUpdateGrafanaDB(opts, nil)
to:
if !r.shouldUpdateGrafanaDB(opts, nil)
This ensures the ref field is properly included in the ResourceWrapper
response for branch operations.
* API clients: Use open_snapshots for possibleOpenAPISpecs
* Tweak logic to throw error if we can't load openapi specs
---------
Co-authored-by: Tom Ratcliffe <tom.ratcliffe@grafana.com>
* fix some anys in select styles
* remove anys from ModalsContext
* improve some types
* improve ArrayDataFrame
* restore behavior
* use unknown for Parser type
* feat(linter-rule): prevent cross plugin relative path imports
* docs(readme): document new grafana/no-plugin-external-import-paths rule
* chore(test): add an NPM script to run linter rule tests
* test(linter-rule): prevent cross plugin relative path imports
* docs(eslint-config): add a commented out example of new rule usage
2025-11-07 21:18:50 +00:00
5797 changed files with 1153354 additions and 93448 deletions
Since you've added the `Add to what's new` label, consider drafting a [What's new note](https://admin.grafana.com/content-admin/#/collections/whats-new/new) for this feature.
Since you've added the `What's New` or a breaking change label, consider drafting a [What's new note](https://admin.grafana.com/content-admin/#/collections/whats-new/new) for this feature.
If this change introduces user-facing configuration options or modifies existing ones, please remember to update [`docs/sources/setup-grafana/configure-grafana/_index.md`](https://github.com/grafana/grafana/blob/main/docs/sources/setup-grafana/configure-grafana/_index.md).
If this change is internal-only (experimental flags, internal refactoring, etc.), you can ignore this reminder.
Questions? Reach out to the #docs channel on Slack.
echo "Uncomitted changes detected in pkg/server/enterprise_wire_gen.go"
fi
fi
@@ -124,6 +126,14 @@ jobs:
else
if [[ "${{ github.event.pull_request.head.repo.fork }}" == "false" ]]; then
echo "> !!! Please synchronize the grafana OSS and grafana enterprise code bases as defined in the enterprise readme, then run 'make gen-go' in the OSS folder and commit the changes to both repositories."
if [[ "$OSS_WIRE_CHANGED" == "true" ]]; then
echo "OSS changes:"
echo "$OSS_DIFF"
fi
if [[ "$ENTERPRISE_WIRE_CHANGED" == "true" ]]; then
echo "Enterprise changes:"
echo "$ENTERPRISE_DIFF"
fi
else
echo "> !!! Please run 'make gen-go' and commit the changes."
desc:apiserver is not allowed to import grafana core
apps-investigation:
list-mode:lax
files:
- ./apps/investigations/*
- ./apps/investigations/**/*
deny:
- pkg:github.com/grafana/grafana/pkg
desc:apps/investigations is not allowed to import grafana core
apps-playlist:
list-mode:lax
files:
@@ -83,6 +75,16 @@ linters:
deny:
- pkg:github.com/grafana/grafana/pkg
desc:apps/playlist is not allowed to import grafana core
apps-dashboard:
list-mode:lax
files:
- ./apps/dashboard/*
- ./apps/dashboard/**/*
allow:
- github.com/grafana/grafana/pkg/apimachinery
deny:
- pkg:github.com/grafana/grafana/pkg
desc:apps/dashboard is not allowed to import grafana core
apps-secret:
list-mode:lax
files:
@@ -105,6 +107,8 @@ linters:
- '**/pkg/tsdb/graphite/**/*'
- '**/pkg/tsdb/mysql/*'
- '**/pkg/tsdb/mysql/**/*'
- '**/pkg/tsdb/opentsdb/*'
- '**/pkg/tsdb/opentsdb/**/*'
- '**/pkg/tsdb/parca/*'
- '**/pkg/tsdb/parca/**/*'
- '**/pkg/tsdb/tempo/*'
@@ -117,6 +121,8 @@ linters:
- '**/pkg/tsdb/zipkin/**/*'
- '**/pkg/tsdb/jaeger/*'
- '**/pkg/tsdb/jaeger/**/*'
- '**/pkg/tsdb/elasticsearch/*'
- '**/pkg/tsdb/elasticsearch/**/*'
deny:
- pkg:github.com/grafana/grafana/pkg/api
desc:Core plugins are not allowed to depend on Grafana core packages
@@ -179,7 +185,9 @@ linters:
- pkg:io/ioutil
desc: 'Deprecated:As of Go 1.16, the same functionality is now provided by package io or package os, and those implementations should be preferred in new code. See the specific function documentation for details.'
- pkg:gopkg.in/yaml.v2
desc:Grafana packages are not allowed to depend on gopkg.in/yaml.v2 as gopkg.in/yaml.v3 is now available
desc:use go.yaml.in/yaml/v3 instead
- pkg:gopkg.in/yaml.v3
desc:use go.yaml.in/yaml/v3 instead
- pkg:github.com/pkg/errors
desc: 'Deprecated:Go 1.13 supports the functionality provided by pkg/errors in the standard library.'
- **Azure:** Include aggregate columns in logs builder [#114835](https://github.com/grafana/grafana/pull/114835), [@aangelisc](https://github.com/aangelisc)
- **Dependencies:** Bump Go to v1.25.5 [#114751](https://github.com/grafana/grafana/pull/114751), [@macabu](https://github.com/macabu)
- **Docs:** Clarify section title for repeating rows and tabs [#115346](https://github.com/grafana/grafana/pull/115346), [@imatwawana](https://github.com/imatwawana)
- **Plugins:** Add PluginContext to plugins when scenes is disabled [#115064](https://github.com/grafana/grafana/pull/115064), [@hugohaggmark](https://github.com/hugohaggmark)
- **QueryEditorRows:** Clear hideSeriesFrom override on query edit [#114628](https://github.com/grafana/grafana/pull/114628), [@Sergej-Vlasov](https://github.com/Sergej-Vlasov)
- **Dashboards:** Fix empty space under time controls when a dashboard has a lot of variables [#114730](https://github.com/grafana/grafana/pull/114730), [@oscarkilhed](https://github.com/oscarkilhed)
- **Plugins:** Datasource breadcrumb link should link to settings tab [#113910](https://github.com/grafana/grafana/pull/113910), [@wbrowne](https://github.com/wbrowne)
- **Postgresql:** Fix variable interpolation logic when the variable has multiple values [#114876](https://github.com/grafana/grafana/pull/114876), [@itsmylife](https://github.com/itsmylife)
- **Azure:** Include aggregate columns in logs builder [#114834](https://github.com/grafana/grafana/pull/114834), [@aangelisc](https://github.com/aangelisc)
- **Dependencies:** Bump Go to v1.25.5 [#114753](https://github.com/grafana/grafana/pull/114753), [@macabu](https://github.com/macabu)
- **Plugins:** Add PluginContext to plugins when scenes is disabled [#115063](https://github.com/grafana/grafana/pull/115063), [@hugohaggmark](https://github.com/hugohaggmark)
- **QueryEditorRows:** Clear hideSeriesFrom override on query edit [#114629](https://github.com/grafana/grafana/pull/114629), [@Sergej-Vlasov](https://github.com/Sergej-Vlasov)
- **Postgresql:** Fix variable interpolation logic when the variable has multiple values [#114875](https://github.com/grafana/grafana/pull/114875), [@itsmylife](https://github.com/itsmylife)
- **Dependencies:** Bump Go to v1.25.5 [#114755](https://github.com/grafana/grafana/pull/114755), [@macabu](https://github.com/macabu)
- **Docs:** Clarify section title for repeating rows and tabs [#115344](https://github.com/grafana/grafana/pull/115344), [@imatwawana](https://github.com/imatwawana)
- **Plugins:** Add PluginContext to plugins when scenes is disabled [#115062](https://github.com/grafana/grafana/pull/115062), [@hugohaggmark](https://github.com/hugohaggmark)
- **Postgresql:** Fix variable interpolation logic when the variable has multiple values [#114874](https://github.com/grafana/grafana/pull/114874), [@itsmylife](https://github.com/itsmylife)
- **Dependencies:** Bump Go to v1.25.5 [#114756](https://github.com/grafana/grafana/pull/114756), [@macabu](https://github.com/macabu)
- **Docs:** Clarify section title for repeating rows and tabs [#115343](https://github.com/grafana/grafana/pull/115343), [@imatwawana](https://github.com/imatwawana)
- **Plugins:** Add PluginContext to plugins when scenes is disabled [#115061](https://github.com/grafana/grafana/pull/115061), [@hugohaggmark](https://github.com/hugohaggmark)
- **Postgresql:** Fix variable interpolation logic when the variable has multiple values [#114873](https://github.com/grafana/grafana/pull/114873), [@itsmylife](https://github.com/itsmylife)
- **Dependencies:** Bump Go to v1.25.5 [#114757](https://github.com/grafana/grafana/pull/114757), [@macabu](https://github.com/macabu)
- **PDFTables:** Dynamically shrink font to try and fit whole table in pdf page width (Enterprise)
- **Plugins:** Add PluginContext to plugins when scenes is disabled [#115060](https://github.com/grafana/grafana/pull/115060), [@hugohaggmark](https://github.com/hugohaggmark)
### Bug fixes
- **Alerting:** Fix contacts point issues [#115409](https://github.com/grafana/grafana/pull/115409), [@yuri-tceretian](https://github.com/yuri-tceretian)
<!-- 11.6.9 END -->
<!-- 12.3.0 START -->
# 12.3.0 (2025-11-19)
### Features and enhancements
- **API Clients:** Add lazy hooks to clients [#113226](https://github.com/grafana/grafana/pull/113226), [@tomratcliffe](https://github.com/tomratcliffe)
- **API clients:** Automatically set PATCH headers [#111879](https://github.com/grafana/grafana/pull/111879), [@Clarity-89](https://github.com/Clarity-89)
- **API clients:** Extract into a package [#111810](https://github.com/grafana/grafana/pull/111810), [@Clarity-89](https://github.com/Clarity-89)
- **API clients:** Extract into a package (Enterprise)
- **API clients:** Update API clients to include all endpoints & add hooks [#113061](https://github.com/grafana/grafana/pull/113061), [@tomratcliffe](https://github.com/tomratcliffe)
- **AccessControl:** Include hidden roles in service account role display [#112924](https://github.com/grafana/grafana/pull/112924), [@Jguer](https://github.com/Jguer)
- **AccessControl:** Increase limit of LBAC for Datasources rules [#111560](https://github.com/grafana/grafana/pull/111560), [@Jguer](https://github.com/Jguer)
- **Accessibility:** Wrap data source info onto 2 lines at small viewports [#113033](https://github.com/grafana/grafana/pull/113033), [@ashharrison90](https://github.com/ashharrison90)
- **Alert Enrichment:** Add mutator to insert rule UID labels to allow for efficient use of labelSelector (Enterprise)
- **Alerting:** Add enrichment components to rule view page (Enterprise)
- **Alerting:** Add enrichment section to rule view page (Enterprise)
- **Alerting:** Add jitter support for periodic alert state storage to reduce database load spikes [#111357](https://github.com/grafana/grafana/pull/111357), [@softho0n](https://github.com/softho0n)
- **Alerting:** Create alertingAlertRuleFormSchema in restrictedGrafanaApis [#112794](https://github.com/grafana/grafana/pull/112794), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
- **Alerting:** Display error message in central state history view [#111445](https://github.com/grafana/grafana/pull/111445), [@laurenashleigh](https://github.com/laurenashleigh)
- **Alerting:** Enrichment per rule wip-2 (Enterprise)
- **Alerting:** Hide metadata if grouping by folder [#113216](https://github.com/grafana/grafana/pull/113216), [@laurenashleigh](https://github.com/laurenashleigh)
- **Alerting:** Improve template ai helper prompt and add some examples (Enterprise)
- **Alerting:** Move enrichment tab between details and versions [#110886](https://github.com/grafana/grafana/pull/110886), [@laurenashleigh](https://github.com/laurenashleigh)
- **Alerting:** Remove ai feedback button from alert form [#112713](https://github.com/grafana/grafana/pull/112713), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
- **Alerting:** Update prompt examples for template AI Helper (Enterprise)
- **Alerting:** Update width to instance details drawer in Triage page [#113209](https://github.com/grafana/grafana/pull/113209), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
- **Alerting:** Use new enrichment endpoints in FE (Enterprise)
- **Alerting:** Use ruleUid as a prop instead of extracting it from the rule context (Enterprise)
- **Analytics:** Aggregate daily summary in datasources analytics (Enterprise)
- **Analytics:** Apply proper batching to Loki exports and add configurable settings (Enterprise)
- **Annotations:** Exclude internal dashboard id when saved via UID [#111535](https://github.com/grafana/grafana/pull/111535), [@ryantxu](https://github.com/ryantxu)
- **Azure:** Use SSO settings in plugin context [#112058](https://github.com/grafana/grafana/pull/112058), [@aangelisc](https://github.com/aangelisc)
- **Buttons:** Active style for buttons [#111235](https://github.com/grafana/grafana/pull/111235), [@gtk-grafana](https://github.com/gtk-grafana)
- **Caching:** Disable cache if datasource has oauthPassThru=true (Enterprise)
- **Chore:** Add logsdrilldown replace to apps/iam/go.mod [#112581](https://github.com/grafana/grafana/pull/112581), [@njvrzm](https://github.com/njvrzm)
- **CloudWatch Logs:** Don't add console link to every field in the logs response [#112230](https://github.com/grafana/grafana/pull/112230), [@idastambuk](https://github.com/idastambuk)
- **CloudWatch Logs:** Support Log Anomalies query type [#113067](https://github.com/grafana/grafana/pull/113067), [@idastambuk](https://github.com/idastambuk)
- **CloudWatch:** Add syntax highlighting and autocomplete for logs diff command [#111207](https://github.com/grafana/grafana/pull/111207), [@kevinwcyu](https://github.com/kevinwcyu)
- **CloudWatch:** Add tracking for logs anomalies [#113181](https://github.com/grafana/grafana/pull/113181), [@idastambuk](https://github.com/idastambuk)
- **Dashboard Controls:** Add annotations to the dashboard controls menu [#112816](https://github.com/grafana/grafana/pull/112816), [@leventebalogh](https://github.com/leventebalogh)
- **Dashboard Picker:** Update to use correct search + dashboards APIs [#112341](https://github.com/grafana/grafana/pull/112341), [@tomratcliffe](https://github.com/tomratcliffe)
- **Dashboard:** Backend always set `metricEditorMode: 0` regardless `metricQueryType` and `expression` [#111613](https://github.com/grafana/grafana/pull/111613), [@ivanortegaalba](https://github.com/ivanortegaalba)
- **Dashboards:** Add a new variable type called "Switch" [#111366](https://github.com/grafana/grafana/pull/111366), [@leventebalogh](https://github.com/leventebalogh)
- **Dashboards:** Hide error notifications in kiosk mode on dashboards [#112390](https://github.com/grafana/grafana/pull/112390), [@ivanortegaalba](https://github.com/ivanortegaalba)
- **Dynamic Dashboards:** Expand dashboards_init_dashboard_completed tracking info [#111102](https://github.com/grafana/grafana/pull/111102), [@idastambuk](https://github.com/idastambuk)
- **ErrorBoundary:** Report specific boundary type to Faro [#112071](https://github.com/grafana/grafana/pull/112071), [@tskarhed](https://github.com/tskarhed)
- **Explore:** Use compact mode only when targeting Tempo [#113037](https://github.com/grafana/grafana/pull/113037), [@ifrost](https://github.com/ifrost)
- **Fields Selector:** Add component and integrate with Logs and Logs table visualization [#112534](https://github.com/grafana/grafana/pull/112534), [@matyax](https://github.com/matyax)
- **Flame Graph:** Anchor exact match when clicking a table symbol in search [#111101](https://github.com/grafana/grafana/pull/111101), [@samarthbagga-meesho](https://github.com/samarthbagga-meesho)
- **FlameGraph:** Improve prompt for open assistant to analyze flamegraph [#113071](https://github.com/grafana/grafana/pull/113071), [@simonswine](https://github.com/simonswine)
- **FolderPicker:** Don't show expand button for empty folders and move search icon [#111872](https://github.com/grafana/grafana/pull/111872), [@aocenas](https://github.com/aocenas)
- **FolderPicker:** Show parent folder when searching [#111026](https://github.com/grafana/grafana/pull/111026), [@aocenas](https://github.com/aocenas)
- **Geomap:** Add a MapLibre style base layer [#109841](https://github.com/grafana/grafana/pull/109841), [@remogeissbuehler](https://github.com/remogeissbuehler)
- **Geomap:** Move beta layers to GA [#113186](https://github.com/grafana/grafana/pull/113186), [@drew08t](https://github.com/drew08t)
- **Go:** Update to 1.25.3 [#112359](https://github.com/grafana/grafana/pull/112359), [@macabu](https://github.com/macabu)
- **Grafana Advisor:** Prometheus Type Migration check [#110853](https://github.com/grafana/grafana/pull/110853), [@bossinc](https://github.com/bossinc)
- **Grafana Data Source:** Add random walk configuration options [#113009](https://github.com/grafana/grafana/pull/113009), [@nmarrs](https://github.com/nmarrs)
- **IAM:** Add uid column in team_member DB table [#112439](https://github.com/grafana/grafana/pull/112439), [@dmihai](https://github.com/dmihai)
- **Jaeger:** Migrate API calls to gRPC endpoint [#113297](https://github.com/grafana/grafana/pull/113297), [@jcolladokuri](https://github.com/jcolladokuri)
- **LBAC for data sources:** Provide user feedback of potential performance loss from LBAC rules (Enterprise)
- **Library Panels:** Remove direct use of legacy search [#112231](https://github.com/grafana/grafana/pull/112231), [@tomratcliffe](https://github.com/tomratcliffe)
- **Nav:** Render menu items as `p` tags so truncation logic can work [#113248](https://github.com/grafana/grafana/pull/113248), [@tomratcliffe](https://github.com/tomratcliffe)
- **Navigation:** Move Cost management and billing plugin to root [#111739](https://github.com/grafana/grafana/pull/111739), [@gubjanos](https://github.com/gubjanos)
- **PanelTimeCompare:** Support saving time compare window [#113150](https://github.com/grafana/grafana/pull/113150), [@torkelo](https://github.com/torkelo)
- **PanelTimeSettings:** Support panel time range settings changes from dashboard in view mode [#113027](https://github.com/grafana/grafana/pull/113027), [@torkelo](https://github.com/torkelo)
- **Plugins:** Install Grafana Pathfinder behind a feature flag [#109909](https://github.com/grafana/grafana/pull/109909), [@Jayclifford345](https://github.com/Jayclifford345)
- **PostgreSQL:** Support PGPASSFILE by making password optional [#108856](https://github.com/grafana/grafana/pull/108856), [@taraspos](https://github.com/taraspos)
- **Provisioning:** Watch file system for changes [#112184](https://github.com/grafana/grafana/pull/112184), [@ryantxu](https://github.com/ryantxu)
- **Reporting:** Add support for schema v2 dashboards (Enterprise)
- **Reporting:** Wait for streaming to end before exporting CSVs (Enterprise)
- **SQL Expressions:** Add Functions to Allow list [#113291](https://github.com/grafana/grafana/pull/113291), [@kylebrandt](https://github.com/kylebrandt)
- **Snapshots:** Use appSubUrl for View all snapshots [#111652](https://github.com/grafana/grafana/pull/111652), [@Clarity-89](https://github.com/Clarity-89)
- **Span Details:** Bring back span id to span details [#112411](https://github.com/grafana/grafana/pull/112411), [@ifrost](https://github.com/ifrost)
- **Table:** Add some error-case handling to ImageCell [#110461](https://github.com/grafana/grafana/pull/110461), [@fastfrwrd](https://github.com/fastfrwrd)
- **Table:** Allow FieldType.other containing arrays to use Pills [#111205](https://github.com/grafana/grafana/pull/111205), [@fastfrwrd](https://github.com/fastfrwrd)
- **Table:** Disable virtualization, hover overflow, and scrollbar width resizing on Safari 26 [#111834](https://github.com/grafana/grafana/pull/111834), [@fastfrwrd](https://github.com/fastfrwrd)
- **Table:** Pill and JSON Cells should allow formatting [#111951](https://github.com/grafana/grafana/pull/111951), [@fastfrwrd](https://github.com/fastfrwrd)
- **Table:** Support DataLinks and Actions in SparklineCell [#112244](https://github.com/grafana/grafana/pull/112244), [@fastfrwrd](https://github.com/fastfrwrd)
- **Table:** Update ad-hoc filter to use name instead of displayName [#112815](https://github.com/grafana/grafana/pull/112815), [@fastfrwrd](https://github.com/fastfrwrd)
- **Tempo:** Migrates tags and tag values to datasource backend CallResource requests (Enterprise)
- **Theme:** Changes light theme canvas color a more white shade [#111318](https://github.com/grafana/grafana/pull/111318), [@torkelo](https://github.com/torkelo)
- **TimeComparison:** Automatically show/hide menu on hover [#112750](https://github.com/grafana/grafana/pull/112750), [@jesdavpet](https://github.com/jesdavpet)
- **TimeSeries:** Allow custom time units on x-axis [#112913](https://github.com/grafana/grafana/pull/112913), [@leeoniya](https://github.com/leeoniya)
- **Timeseries:** Numeric duration values could render as NaN (#73795) [#112076](https://github.com/grafana/grafana/pull/112076), [@fastfrwrd](https://github.com/fastfrwrd)
- **Transformations:** Hide "Match all/any" conditions for less than two filters [#109754](https://github.com/grafana/grafana/pull/109754), [@sudoice](https://github.com/sudoice)
- **UI Extensions:** Remove path validation from link extensions [#112259](https://github.com/grafana/grafana/pull/112259), [@leventebalogh](https://github.com/leventebalogh)
### Bug fixes
- **Access Control:** Fix the permission checks for saving/updating/deleting annotations [#112953](https://github.com/grafana/grafana/pull/112953), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
- **Accessibility:** Improve no-unreduced-motion rule and fix violations [#110304](https://github.com/grafana/grafana/pull/110304), [@tomratcliffe](https://github.com/tomratcliffe)
- **Alerting Provisioning:** Don't error on recording rules without conditions [#109410](https://github.com/grafana/grafana/pull/109410), [@djpnicholls](https://github.com/djpnicholls)
- **Alerting:** Clear outdated settings when switching contact point type [#111869](https://github.com/grafana/grafana/pull/111869), [@konrad147](https://github.com/konrad147)
- **Alerting:** Fix enrichment tab to be rendered only for grafana alerting rules [#113030](https://github.com/grafana/grafana/pull/113030), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
- **Alerting:** Fix instances matching in notification policies [#112326](https://github.com/grafana/grafana/pull/112326), [@konrad147](https://github.com/konrad147)
- **Alerting:** Fix unmarshalling of GettableStatus to include time intervals [#112602](https://github.com/grafana/grafana/pull/112602), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Migrate `spec.title` and `spec.name` fieldSelectors [#111993](https://github.com/grafana/grafana/pull/111993), [@gillesdemey](https://github.com/gillesdemey)
- **Alerting:** Normalize health when filtering rules [#113087](https://github.com/grafana/grafana/pull/113087), [@gillesdemey](https://github.com/gillesdemey)
- **Alerting:** Prohibit receivers with empty name [#113064](https://github.com/grafana/grafana/pull/113064), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Provisioning to fix contact point type on save [#112246](https://github.com/grafana/grafana/pull/112246), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Remove \_\_grafana_origin when duplicating rule [#112396](https://github.com/grafana/grafana/pull/112396), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
- **AnnoList:** Fix annotations not loading when in a repeated row [#111540](https://github.com/grafana/grafana/pull/111540), [@joshhunt](https://github.com/joshhunt)
- **Annotations:** Fix issue with transformation logic in scenes [#112288](https://github.com/grafana/grafana/pull/112288), [@fastfrwrd](https://github.com/fastfrwrd)
- **Auth:** Fix render user OAuth passthrough [#111636](https://github.com/grafana/grafana/pull/111636), [@charandas](https://github.com/charandas)
- **ComboBox:** Add loading state to dropdown and prefixIcon [#112967](https://github.com/grafana/grafana/pull/112967), [@tomratcliffe](https://github.com/tomratcliffe)
- **Connections:** Fix connections home page on enterprise [#111751](https://github.com/grafana/grafana/pull/111751), [@oshirohugo](https://github.com/oshirohugo)
- **Dashboard:** Fix editor specific permissions in /api [#113292](https://github.com/grafana/grafana/pull/113292), [@stephaniehingtgen](https://github.com/stephaniehingtgen)
- **Dashboards:** Fix bug with anon users with editor permissions creating dashboards [#113260](https://github.com/grafana/grafana/pull/113260), [@stephaniehingtgen](https://github.com/stephaniehingtgen)
- **Dashboards:** Fix moving to root folder [#111515](https://github.com/grafana/grafana/pull/111515), [@stephaniehingtgen](https://github.com/stephaniehingtgen)
- **Dashboards:** Fix preload field not being persisted via /v1beta1 [#112475](https://github.com/grafana/grafana/pull/112475), [@ivanortegaalba](https://github.com/ivanortegaalba)
- **Flame Graph:** Use suffix for values formatted with a short formatter [#110999](https://github.com/grafana/grafana/pull/110999), [@ifrost](https://github.com/ifrost)
- **FlameGraph:** Ensure total is only counted once for recursive function calls [#111548](https://github.com/grafana/grafana/pull/111548), [@simonswine](https://github.com/simonswine)
- **FolderPermissions:** Return 404 error when folder does not exist instead of 500 [#112919](https://github.com/grafana/grafana/pull/112919), [@Jguer](https://github.com/Jguer)
- **FolderPicker:** Fix expand toggle also selecting folder [#111755](https://github.com/grafana/grafana/pull/111755), [@aocenas](https://github.com/aocenas)
- **LDAP Authentication:** Fix URL to propagate username context as parameter [#111723](https://github.com/grafana/grafana/pull/111723), [@bradleypettit](https://github.com/bradleypettit)
- **Node graph:** Fix context menu position after scrolling [#112374](https://github.com/grafana/grafana/pull/112374), [@adrapereira](https://github.com/adrapereira)
- **Playlist:** Fix navigation issues with emoji-titled dashboards during dual-write migration [#111659](https://github.com/grafana/grafana/pull/111659), [@axelavargas](https://github.com/axelavargas)
- **Plugin Details Page:** Fix tabs not loading on hard refresh [#112915](https://github.com/grafana/grafana/pull/112915), [@sunker](https://github.com/sunker)
- **Plugin navigation:** Fix active nav item selection when there are more than 10 items in a group [#112886](https://github.com/grafana/grafana/pull/112886), [@aocenas](https://github.com/aocenas)
- **Plugins:** Dependencies do not inherit parent URL for preinstall [#111762](https://github.com/grafana/grafana/pull/111762), [@wbrowne](https://github.com/wbrowne)
- **Plugins:** Set isProvisioned for local plugins without remote counterpart [#111268](https://github.com/grafana/grafana/pull/111268), [@oshirohugo](https://github.com/oshirohugo)
- **Prometheus:** Fix incremental querying logic for public dashboards [#111642](https://github.com/grafana/grafana/pull/111642), [@jcolladokuri](https://github.com/jcolladokuri)
- **Prometheus:** Fix parsing logic of prometheus expressions to honor the order of binary operations [#112220](https://github.com/grafana/grafana/pull/112220), [@jcolladokuri](https://github.com/jcolladokuri)
- **Security:** fix for CVE-2025-41115 in SCIM (System for Cross-domain Identity Management) (Enterprise)
- **SoloPanel:** Fixes issue with solo route and scopes variable [#112769](https://github.com/grafana/grafana/pull/112769), [@torkelo](https://github.com/torkelo)
- **Stars:** Fix starred state not being updated [#111936](https://github.com/grafana/grafana/pull/111936), [@Clarity-89](https://github.com/Clarity-89)
- **Stat:** Fix math for percent change value heights when sparkline is not rendered [#112599](https://github.com/grafana/grafana/pull/112599), [@fastfrwrd](https://github.com/fastfrwrd)
- **StateTimeline:** Fix color display in tooltip [#112878](https://github.com/grafana/grafana/pull/112878), [@fastfrwrd](https://github.com/fastfrwrd)
- **Table:** Fix cell inspect for Sparkline and inferred JSON cells [#113059](https://github.com/grafana/grafana/pull/113059), [@fastfrwrd](https://github.com/fastfrwrd)
- **TextPanel:** Fix `CodeEditor` not appearing properly [#111937](https://github.com/grafana/grafana/pull/111937), [@ashharrison90](https://github.com/ashharrison90)
- **UnitPicker/Cascader:** Fixes type to search for unit feature [#112614](https://github.com/grafana/grafana/pull/112614), [@torkelo](https://github.com/torkelo)
- **VizTooltip:** Better overflow handling on long series names [#112240](https://github.com/grafana/grafana/pull/112240), [@fastfrwrd](https://github.com/fastfrwrd)
### Breaking changes
- **Faro:** Update configuration with best practices [#112108](https://github.com/grafana/grafana/pull/112108), [@joshhunt](https://github.com/joshhunt)
- **LibraryPanels:** Remove unique name constraints [#113077](https://github.com/grafana/grafana/pull/113077), [@ryantxu](https://github.com/ryantxu)
- **RBAC:** Only write action sets [#112429](https://github.com/grafana/grafana/pull/112429), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
### Plugin development fixes & changes
- **Checkbox:** Improve accessibility of the `indeterminate` state [#112388](https://github.com/grafana/grafana/pull/112388), [@ashharrison90](https://github.com/ashharrison90)
- **Collapse:** Improve layout and deprecate `collapsible` prop [#113164](https://github.com/grafana/grafana/pull/113164), [@ashharrison90](https://github.com/ashharrison90)
- **Docs:** Add storybook links to components [#113102](https://github.com/grafana/grafana/pull/113102), [@samsch](https://github.com/samsch)
- **Modal:** Fix button focus being clipped [#112867](https://github.com/grafana/grafana/pull/112867), [@ashharrison90](https://github.com/ashharrison90)
- **Slider:** Expose prop to control visibility of input [#113084](https://github.com/grafana/grafana/pull/113084), [@ashharrison90](https://github.com/ashharrison90)
- **Slider:** Make `inputId` a required param and fix minor a11y violations [#112006](https://github.com/grafana/grafana/pull/112006), [@ashharrison90](https://github.com/ashharrison90)
<!-- 12.3.0 END -->
<!-- 12.1.4 START -->
# 12.1.4 (2025-11-19)
### Bug fixes
- **Alerting:** Fix unmarshalling of GettableStatus to include time intervals [#112733](https://github.com/grafana/grafana/pull/112733), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **AnalyticsSummaries:** Fix dashboard rollup not resetting "last X days" metrics to zero (Enterprise)
- **Security:** fix for CVE-2025-41115 in SCIM (System for Cross-domain Identity Management) (Enterprise)
<!-- 12.1.4 END -->
<!-- 12.0.7 START -->
# 12.0.7 (2025-11-19)
### Bug fixes
- **Alerting:** Fix unmarshalling of GettableStatus to include time intervals [#112732](https://github.com/grafana/grafana/pull/112732), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **AnalyticsSummaries:** Fix dashboard rollup not resetting "last X days" metrics to zero (Enterprise)
- **Security:** fix for CVE-2025-41115 in SCIM (System for Cross-domain Identity Management) (Enterprise)
<!-- 12.2.2 END -->
<!-- 11.6.8 START -->
# 11.6.8 (2025-11-19)
### Bug fixes
- **Alerting:** Fix unmarshalling of GettableStatus to include time intervals [#112731](https://github.com/grafana/grafana/pull/112731), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **AnalyticsSummaries:** Fix dashboard rollup not resetting "last X days" metrics to zero (Enterprise)
@@ -110,7 +110,7 @@ If you believe you've found a security vulnerability, please read our [security
### Suggest features
If you have an idea of how to improve Grafana, submit a [feature request](https://github.com/grafana/grafana/issues/new?template=1-feature_requests.md).
If you have an idea of how to improve Grafana, submit a [feature request](https://github.com/grafana/grafana/issues/new?template=1-feature_requests.md). To learn how to write an effective feature request, refer to [Create a feature request](contribute/create-feature-request.md).
We want to make Grafana accessible to even more people. Submit an [accessibility issue](https://github.com/grafana/grafana/issues/new?template=2-accessibility.md) to help us understand what we can improve.
If you think you have found a security vulnerability, we have two routes for reporting security issues.
Important: Whichever route you choose, we ask you to not disclose the vulnerability before it has been fixed and announced, unless you received a response from the Grafana Labs security team that you can do so.
[Full guidance on reporting a security issue can be found here](https://grafana.com/legal/report-a-security-issue/).
This product is in scope for our Bug Bounty Program. To submit a vulnerability report, please visit [Grafana Labs Bug Bounty page](https://app.intigriti.com/programs/grafanalabs/grafanaossbbp/detail) and follow the instructions provided. Our security team will review your submission and get back to you as soon as possible.
---
For products and services outside the scope of our bug bounty program, or if you do not wish to receive a bounty, you can report issues directly to us via email at security@grafana.com. This address can be used for all of Grafana Labs’ open source and commercial products (including but not limited to Grafana, Grafana Cloud, Grafana Enterprise, and grafana.com).
Please encrypt your message to us; please use our PGP key. The key fingerprint is:
225E 6A9B BB15 A37E 95EB 6312 C66A 51CC B44C 27E0
The key is available from [keyserver.ubuntu.com](https://keyserver.ubuntu.com/pks/lookup?search=0x225E6A9BBB15A37E95EB6312C66A51CCB44C27E0&fingerprint=on&op=index).
Grafana Labs will send you a response indicating the next steps in handling your report. After the initial reply to your report, the security team will keep you informed of the progress towards a fix and full announcement, and may ask for additional information or guidance.
**Important:** We ask you to not disclose the vulnerability before it have been fixed and announced, unless you received a response from the Grafana Labs security team that you can do so.
## Security announcements
We will post a summary, remediation, and mitigation details for any patch containing security fixes on the Grafana blog. The security announcement blog posts will be tagged with the [security tag](https://grafana.com/tags/security/).
You can also track security announcements via the [RSS feed](https://grafana.com/tags/security/index.xml).
Create tests for your check and its steps to ensure they work as expected. Test both successful and failure scenarios.
## Running the Standalone Mode
To run the standalone mode, you can use the `make run` command. This will start the advisor app in standalone mode, which means it will not be running in a Kubernetes cluster.
```bash
make etcd # Start etcd in a docker container
make run # Start the advisor app in standalone mode
```
This will start the advisor app on port 7445. You can then access the advisor app at `http://localhost:7445`.
To see some sample checks, you can run the following command:
```bash
make create-checks
```
Then you can see list in the URL: `http://localhost:7445/apis/advisor.grafana.app/v0alpha1/namespaces/stacks-1/checks`
To delete all checks, you can run the following command:
@@ -62,9 +62,60 @@ var appManifestData = app.ManifestData{
},
},
Routes:app.ManifestVersionRoutes{
Namespaced:map[string]spec3.PathProps{},
Cluster:map[string]spec3.PathProps{},
Schemas:map[string]spec.Schema{},
Namespaced:map[string]spec3.PathProps{
"/register":{
Post:&spec3.Operation{
OperationProps:spec3.OperationProps{
OperationId:"createRegister",
Responses:&spec3.Responses{
ResponsesProps:spec3.ResponsesProps{
Default:&spec3.Response{
ResponseProps:spec3.ResponseProps{
Description:"Default OK response",
Content:map[string]*spec3.MediaType{
"application/json":{
MediaTypeProps:spec3.MediaTypeProps{
Schema:&spec.Schema{
SchemaProps:spec.SchemaProps{
Type:[]string{"object"},
Properties:map[string]spec.Schema{
"apiVersion":{
SchemaProps:spec.SchemaProps{
Type:[]string{"string"},
Description:"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
},
},
"kind":{
SchemaProps:spec.SchemaProps{
Type:[]string{"string"},
Description:"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
// ManifestCustomRouteResponsesAssociator returns the associated response go type for a given kind, version, custom route path, and method, if one exists.
// kind may be empty for custom routes which are not kind subroutes. Leading slashes are removed from subroute paths.
rawSchemaDummyv0alpha1=[]byte(`{"Dummy":{"properties":{"spec":{"$ref":"#/components/schemas/spec"},"status":{"$ref":"#/components/schemas/status"}},"required":["spec"]},"OperatorState":{"additionalProperties":false,"properties":{"descriptiveState":{"description":"descriptiveState is an optional more descriptive state field which has no requirements on format","type":"string"},"details":{"additionalProperties":{"additionalProperties":{},"type":"object"},"description":"details contains any extra information that is operator-specific","type":"object"},"lastEvaluation":{"description":"lastEvaluation is the ResourceVersion last evaluated","type":"string"},"state":{"description":"state describes the state of the lastEvaluation.\nIt is limited to three possible states for machine evaluation.","enum":["success","in_progress","failed"],"type":"string"}},"required":["lastEvaluation","state"],"type":"object"},"spec":{"additionalProperties":false,"description":"Spec is the schema of our resource. The spec should include all the user-editable information for the kind.","properties":{"dummyField":{"type":"integer"}},"required":["dummyField"],"type":"object"},"status":{"additionalProperties":false,"properties":{"additionalFields":{"additionalProperties":{"additionalProperties":{},"type":"object"},"description":"additionalFields is reserved for future use","type":"object"},"operatorStates":{"additionalProperties":{"$ref":"#/components/schemas/OperatorState"},"description":"operatorStates is a map of operator ID to operator state evaluations.\nAny operator which consumes this kind SHOULD add its state evaluation information to this field.","type":"object"}},"type":"object"}}`)
// ManifestCustomRouteResponsesAssociator returns the associated response go type for a given kind, version, custom route path, and method, if one exists.
// kind may be empty for custom routes which are not kind subroutes. Leading slashes are removed from subroute paths.
// If there is no association for the provided kind, version, custom route path, and method, exists will return false.
// Resource routes (those without a kind) should prefix their route with "<namespace>/" if the route is namespaced (otherwise the route is assumed to be cluster-scope)
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.