Commit Graph
62534 Commits
Author SHA1 Message Date
Yuri Tseretyan 943b73a682 Alerting: Add scheduled clean-up of deleted rules (#101963)
* add scheduled clean up of deleted rules


---------

Signed-off-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
2025-03-11 22:58:26 +02:00
Tom Ratcliffe 9870718c3a Alerting: Enable jsx-no-useless-fragment rule (#101884)
* Add no-useless-fragment rule for alerting code

* Auto-fix most no-useless-fragment cases

* Manually fix remaining no-useless-fragment cases

* Fix `invalid` passing to Field component

* Allow AlertingPageWrapper to have optional children
2025-03-11 22:31:47 +02:00
Isabella SiuandLarissa Wandzura 700f1225df AWS Datasources: Update grafana assume role docs to remove unnecessary flags (#101086)
Co-authored-by: Larissa Wandzura <126723338+lwandz13@users.noreply.github.com>
2025-03-11 16:09:22 -04:00
Alexander Akhmetov 85b0b47efd Alerting: Allow disabling provenance in the Prometheus conversion API (#101573)
When creating Grafana-managed alerts from Prometheus rule definitions with mimirtool or cortextool, the rules are marked as "provisioned" and are not editable in the Grafana UI. This PR allows changing this by providing an extra header: --extra-header="X-Disable-Provenance=true".

When provenance is disabled, we do not keep the original rule definition in YAML, so it is impossible to read it back using the Prometheus conversion API (mimirtool/cortextool). This is intentional because if we did keep it and the rule was later changed in the UI, its Prometheus YAML definition would no longer reflect the latest version of the alert rule, as it would be unchanged.
2025-03-11 19:53:28 +01:00
Ashley Harrison 4dbd1846c7 Chore: bump codeql versions used in pr checks (#101957)
* bump codeql versions used in pr checks

* update supported versions

* use glob syntax

* wider glob
2025-03-11 17:28:36 +00:00
Denis Vodopianov e645a7d8ff Chore: update golang version in .drone.yaml (#101894) 2025-03-11 18:25:52 +01:00
Sam Jewell 7a3415148e SQL Expressions: Add cell-limit for input dataframes (#101700)
* expr: Add row limit to SQL expressions

Adds a configurable row limit to SQL expressions to prevent memory issues with large
result sets. The limit is configured via the `sql_expression_row_limit` setting in
the `[expressions]` section of grafana.ini, with a default of 100,000 rows.

The limit is enforced by checking the total number of rows across all input tables
before executing the SQL query. If the total exceeds the limit, the query fails
with an error message indicating the limit was exceeded.

* revert addition of newline

* Switch to table-driven tests

* Remove single-frame test-cases.

We only need to test for the multi frame case. Single frame is a subset
of the multi-frame case

* Add helper function

Simplify the way tests are set up and written

* Support convention, that limit: 0 is no limit

* Set the row-limit in one place only

* Update default limit to 20k rows

As per some discussion here:
https://raintank-corp.slack.com/archives/C071A5XCFST/p1741611647001369?thread_ts=1740047619.804869&cid=C071A5XCFST

* Test row-limit is applied from config

Make sure we protect this from regressions

This is perhaps a brittle test, somewhat coupled to the code here. But
it's good enough to prevent regressions at least.

* Add public documentation for the limit

* Limit total number of cells instead of rows

* Use named-return for totalRows

As @kylebrandt requested during review of #101700

* Leave DF cells as zero values during limits tests

When testing the cell limit we don't interact with the cell values at
all, so we leave them at their zero values both to speed up tests, and
to simplify and clarify that their values aren't used.

* Set SQLCmd limit at object creation - don't mutate

* Test that SQL node receives limit when built

And that it receives it from the Grafana config

* Improve TODO message for new Expression Parser

* Fix failing test by always creating config on the Service
2025-03-11 17:14:33 +00:00
Will Assis 42ae2fb026 fix(unified-storage): add missing dashboard legacy_id when in legacy read mode (#101944)
* add missing dashboard legacy_id when in modes 0-2
2025-03-11 12:56:34 -04:00
Yuri Tseretyan 7e4beb2074 Alerting: API to return deleted rules (#101429) 2025-03-11 12:40:44 -04:00
owensmallwood 59d87fe3f1 Unified Storage: Use match all query instead of wildcard for not-in requirement query (#101953)
use match all query insteaed of wildcard
2025-03-11 10:15:58 -06:00
Esteban Beltran 13d1f02597 Frontend Sandbox: Do not perform authenticated queries for non authenticated users (#101946)
* Do not perform authenticated queries for non authenticated users

* Empty commit
2025-03-11 09:40:15 -06:00
Alexander Zobnin f6f6ae4496 Zanzana: Update docs with subresources description (#101948)
* Zanzana: Update docs with subresources description

* clarify resource name
2025-03-11 16:27:17 +01:00
Pepe Cano 5bfe046da9 docs(alerting): clarify behaviour when provisioning the policy tree (#101937) 2025-03-11 15:58:25 +01:00
Laura Fernández 911c99f325 Field: Use Combobox instead of Select in test (#101928) 2025-03-11 16:58:09 +02:00
Will Browne 510c76df49 Chore: Update to latest go plugin SDK (#101939)
* update to latest go plugin SDK

* add missing changes
2025-03-11 14:57:19 +00:00
Laura Fernández c8c17683ed ThemeDemo: Use Combobox instead of Select (#101947) 2025-03-11 16:55:30 +02:00
Yulia Shanyrova 82610288b1 Plugins: Move raiseanissueurl from plugin object to plugin details (#101428)
* move raiseanissueurl from plugin object to plugin details

* updated the test for PluginDetailsPane;
2025-03-11 15:51:25 +01:00
Matthew Thorning d9cb6e632d Navigation: Add the IsNew badge to the IRM menu item (#101926)
add the `IsNew` badge to the IRM menu item
2025-03-11 14:31:43 +00:00
Will Browne c74a5fcbed Chore: Avoid simplejson usage in xorm module (#101943)
avoid simplejson usage
2025-03-11 14:24:20 +00:00
Tom Ratcliffe 6b2c73141d Alerting: Improve clarity of recording rule creation (#100700)
* Add description below group and namespace fields to make creation clearer

* Make DS managed recording rules clearer

* Change link for recording rule on empty state to Grafana managed

* Tweak empty state

* Tidy up logic for display of recording rule buttons

* Update .betterer.results
2025-03-11 13:13:00 +00:00
Ed Poole 0519cfa66d Fix/theme gradients (#101934)
* Brighten the DesertBloom gradient

* Adjust gradient values so they're consistently rgba
2025-03-11 13:09:08 +00:00
Alex BikfalviandAndré Pereira 2712686a36 feat(datasource/Tempo): Instrument Tempo query latency measurements (#101285)
* feat: Instrument Tempo query latency measurements

Add comprehensive latency tracking and reporting for Tempo
queries using reportInteraction:
- Add latency measurements for TraceQL metrics queries
- Add latency measurements for TraceID queries
- Add latency measurements for TraceQL search queries
- Track both streaming and non-streaming query performance
- Include success/error states and relevant metadata in reports
- Measure latency in milliseconds for more precise tracking

This instrumentation will help monitor query performance and
identify potential bottlenecks in trace queries.

Signed-off-by: Alex Bikfalvi <alex.bikfalvi@grafana.com>

* fixup! feat: Instrument Tempo query latency measurements

Signed-off-by: Alex Bikfalvi <alex.bikfalvi@grafana.com>

* prettier fix

---------

Signed-off-by: Alex Bikfalvi <alex.bikfalvi@grafana.com>
Co-authored-by: André Pereira <adrapereira@gmail.com>
2025-03-11 12:45:26 +00:00
Steve Simpson bbab62ce39 Alerting: Select remote write path dependent on metrics backend type. (#101891)
The remote write path differs based on whether the data source is actually
Prometheus, Mimir, Cortex, or an older version of Cortex. We do not want
users to have to specify the path, so this change determines the path as
best it can.

It may be in the future we have to make this configurable per-datasource
to cater for setups where it's impossible to determine the correct path.
2025-03-11 13:45:16 +01:00
Joey 062a0e7212 Tempo: fallback for intrinsic tags (#101677)
* Add intrinsics fallback

* Add test

* Update tests

* Prettier

* Remove extra uniq
2025-03-11 12:43:02 +00:00
Gilles De Mey adbc5b2b88 Alerting: Hide "unauthorized" warning for anonymous users (#101811)
* remove nav analytics

* revert

* Remove new user check for alerting navigation tracking

* Delete Analytics.test.ts
2025-03-11 12:51:48 +01:00
maicon 927f7befd6 Unistore: Create default permissions through Folder APIServer (#101420)
* Unistore: Declare a new storage to set default folder permissions

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

* Remove the setting of default permissions from folder legacy storage

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

* Disable setting of folder permissions when Api Server is enabled

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

* Reverts grafana/grafana#100019

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

* Add unit test

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

* check error on unit test

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

* Add unit test

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

* Remove unused fields

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

* Add unit tests for folder_storage

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

* Remove duplicated import

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

* Fix unit test

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

---------

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
2025-03-11 11:33:08 +00:00
Mike Nolta 79d079b638 Docs: fix missing @ in GF_PLUGINS_PREINSTALL example (#101908)
Docs: fix missing `@` in `GF_PLUGINS_PREINSTALL`
2025-03-11 11:24:33 +00:00
Victor Marin 3adb12fb56 Dashboards: Fix timezone change issue in dashboards (#101880)
* fix timezone change issue in dashboards

* update dashboard initial state after saving
2025-03-11 13:19:46 +02:00
Gabriel MABILLE c8f810b422 Authz: Check namespace is set in the context (#101723)
* Authz: Test List

* Anonymous case

* Cover rendering

* Authz: Check namespace is set in the context

* Explicitly request a namespace check in the storage functions

* Revert logic
2025-03-11 12:04:33 +01:00
Torkel Ödegaard b4366db1f1 ThemeDrawer: Change theme from anywhere and preview them (#100405)
* ThemeDrawer: Change theme from anywhere and preview them

* Update

* added subtitle

* Use new component

* Fixes

* Fix runtime ony wrong prop

* Fixed saving issue

* update lang file

* Fixed circular dep

* fix import
2025-03-11 12:03:10 +01:00
Igor SuleymanovandRyan McKinley ea89a68028 K8s/Dashboards: Generate Dashboards k8s APIs using Grafana App SDK (#99966)
* Generate Dashboard kinds with `grafana-app-sdk`

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

* Hack together a fix for invalid TS codegen for v0 & v1

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

* Address Go linter issues

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

* Address TS linter issues

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

* Add new app to CODEOWNERS

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

* Fix a couple of issues detected by tests

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

* Update OpenAPI definitions and test files

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

* Remove title from Dashboard v1alpha1 spec

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

* Remove unused CUE schemas

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

* remove unrelated files

* allow any in the generated betterer

* Add a comment explaining why we don't use deepcopy-gen

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

* Default to v2alpha1 if dashboards v2 FF is enabled

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

---------

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2025-03-11 13:00:37 +02:00
Laura Fernández 3fffb2872e InlineField: Use Combobox instead of Select (#101923)
Use Combobox instead of Select
2025-03-11 11:47:59 +01:00
Victor Marin 3e7626cc96 Dashboards: Fix missing v/e/i keybindings to return back to dashboard (#101876)
readd keybindings to return from edit/view/inspect modes
2025-03-11 12:40:37 +02:00
312d80e0e1 Scopes: Refactor scopes to plain React and move it to runtime (#97176)
* Scopes: Refactor scopes

* Scopes: Refactor scopes

* Scopes: Refactor scopes

* Revert data changes

* Refactorings

* Refactorings

* Refactorings

* Remove unused

* Refactorings

* Refactors

* Fixes

* Update scenes

* Rebase

* Update .betterer.results

* Fix tests

* Move scopes selector to appchrome

* More fixes

* Fix tests

* Remove ScopesFacade

* use latest canary scenes version to pass tests

* Make fields private

* Update scenes version

---------

Co-authored-by: Tobias Skarhed <tobias.skarhed@gmail.com>
Co-authored-by: Victor Marin <victor.marin@grafana.com>
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2025-03-11 11:34:33 +01:00
Josh Hunt 210c886bb7 I18n: Add new language options (#101899)
* Add newLanguages feature toggle

* add additional languages behind feature toggle

* be more forgiving of what config looks like in tests

* tweak regex

* put pt-br back

* restore order of pt-BR and cn-Hans, rename EXTRA_LANGUAGES to NEW_LANGUAGES

* stricter test regex
2025-03-11 12:07:16 +02:00
Laura Fernández da25d97ffd AutoSaveField: Change the story to use Combobox instead of Select (#101922) 2025-03-11 11:59:55 +02:00
Sam Jewell dd5db23123 SQL Expressions: Update comment for flag definition (#101919)
Update comment for SQL Expressions flag definition
2025-03-11 09:59:23 +00:00
Carl Bergquist 14ad1dec38 conf: hides scope feature toggles from docs (#101913)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
2025-03-11 10:12:58 +01:00
Torkel Ödegaard 7ecad55bff Tabs: Reduce active border from 4 px to 2px (#101888)
* Tabs: Reduce active border from 4 to 2px

* css fixes
2025-03-11 09:16:29 +01:00
Peter Štibraný fa809ac417 Fix more LastInsertId calls (#101892)
* Fix more places where LastInsertId is used without proper directive for Spanner.

* Fix tests.
2025-03-11 09:03:03 +01:00
renovate[bot] 11a95a0b80 Update dependency prismjs to v1.30.0 [SECURITY] (#101915)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-11 09:07:58 +03:00
Isabel Matwawana 1e6aa27313 Docs: Add enterprise availability notes (#101909)
* Added enterprise only note

* Fixed wording

* Added availability to share panel internally and removed invite new member

* Fixed wording for consistency

* Removed link to invite new members section

* Discarded change
2025-03-10 16:06:59 -04:00
Jacob Valdez e191a35234 Adding note about upgrading plugins prior to migration (#100235)
* Adding note about upgradfing plugins prior to migration

* adding admonition vis-a-vis enterprise plugin add-on

* Update cloud-migration-assistant.md
2025-03-10 14:55:14 -05:00
grafana-pr-automation[bot]andgithub-actions[bot] b810696add I18n: Download translations from Crowdin (#101896)
New Crowdin translations by GitHub Action

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-03-10 19:33:25 +02:00
Ryan McKinley 64f1df69d5 Search: Rename managed object index (#101856) 2025-03-10 19:48:53 +03:00
Peter Štibraný 9858e40a02 Spanner: Add trivial sequence number generator. (#101777)
* Add trivial sequence number generator.
2025-03-10 17:37:44 +01:00
Andres Martinez Gotor 8142aef64d Advisor: Avoid evaluating a check for another namespace (#101885) 2025-03-10 17:09:11 +01:00
Tito Lins 8c51af49e5 Alertmanager: upgrade alerting (#101870) 2025-03-10 16:59:21 +01:00
Peter Štibraný 0ce67dad74 Spanner: support for lastInsertId (#101770)
* Support for returning inserted ID in Spanner.
* Convert bytes to string when storing them into text column.
2025-03-10 15:59:06 +01:00
Ieva d5451f2e13 Docs: Remove reference to a non-existent action (#101874)
remove reference to a non-existent action
2025-03-10 15:58:31 +01:00