57666 Commits

Author SHA1 Message Date
4bd5f29e05 SQL Expressions: Allow more functions (#102011)
I used Cursor and Claude 3.7 thinking to expand the list of functions
we allow. Specifically I needed `abs`.

TODO: Check each of these in the official MySQL docs to ensure they
are all safe:
eg. this doc: https://dev.mysql.com/doc/refman/8.4/en/flow-control-functions.html#operator_case
2025-03-12 11:39:48 +00:00
dacb25ec2a Prometheus: Add labels to all native histogram fields (#101812)
add labels to all histogram fields
2025-03-12 12:34:23 +01:00
8cc352f4ba SQL Expressions: Add syntax highlighting and autocomplete (#102018)
* SQL Expressions: Add syntax highlighting and autocomplete

Here we add syntax highlighting and autocomplete for MySQL dialect of
SQL. We don't yet have the full functionality that other SQL monaco
editors have, namely
- No autocomplete of table or column names
- No autoformatting yet (meaning no formatting of template variables)

But this is a vast improvement already. The above improvements can come
later - they are slightly harder to do.

* Improvements, based on review from LLM
2025-03-12 11:27:31 +00:00
5a2cba7b01 Plugins: Forward HTTP headers to plugin streaming calls (#101960)
* forward HTTP headers to plugin streaming calls

* fixup

* fix test based on feedback

* improve test assertions
2025-03-12 10:37:07 +00:00
8de665cbeb Dynamic dashboards: Persist library panels in responsive grid (#101802)
* persist library panels in responsive grid

* small refactoring of old grid

* remove unused imports
2025-03-12 11:09:42 +01:00
ee23a7a7d9 Disable dashboard and folder synchronization when running on Spanner. (#102007) 2025-03-12 11:02:00 +01:00
2d0b1c6154 Dashboards: Move settings button into edit pane (#101942) 2025-03-12 10:29:07 +01:00
3bf6e3dc37 Dashboards: Fix issues with panel selection and dragging (#102000) 2025-03-12 10:26:59 +01:00
e128c36127 Codegen: Cog and go fixes (#101408)
* Update to latest cog version and update workspaces

* Update generated go files

* Try to avoid concurrency issues

* Update workspaces

* Try to remove the sync...

* Remove grafana dependency from xorm go.mod file
2025-03-12 10:12:56 +01:00
8988274912 Dashboards: update @grafana/llm to v0.13.2 and update usage (#101814)
This version of the package deprecates the `openai` object in
favour of the vendor-agnostic `llm` object, so this PR also
updates the usage of the package to use the new object and
take advantage of the vendor-agnostic APIs.
2025-03-12 10:53:20 +02:00
e6f682bc14 K8s/Dashboards: Fix title extraction (#101990) 2025-03-12 09:46:12 +02:00
e28c993465 DashboardScene: De-select object after they are removed (#101940) 2025-03-12 08:35:44 +01:00
13cd9c3c60 Docs: Fix incorrect label groupings (#101491)
fix incorrect label groupings in alerting documents

Co-authored-by: Matheus Macabu <macabu.matheus@gmail.com>
2025-03-12 07:33:15 +00:00
848d49e70f Chore: Add username option for redis remote cache (#101787)
* Chore: Add username option for redis remote cache

(cherry picked from commit 25e28dc85e646e8cb7ab9ab582de8fb247b58b07)

* Chore: Update docs and config with sample Redis conn with user+pass

---------

Co-authored-by: Thomas Fournier <tfournier@evolves.fr>
2025-03-12 08:26:41 +01:00
cd7b66e2e8 Provisioning: Add RTK client in main (#101991)
add frontend
2025-03-12 10:01:55 +03:00
f02803b027 Openapi: Remove duplicate group (#101933)
Remove duplicate group
2025-03-12 09:00:49 +03:00
2bec167be5 I18n: Download translations from Crowdin (#101984)
New Crowdin translations by GitHub Action

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-03-12 02:30:46 +02:00
9ed864a944 Revert "baldm0mma/ add pr-lint-build-docs.yml"
This reverts commit 1ceab26cb4d23a22dadb9dab7f150648354b91d3.
2025-03-11 17:04:25 -06:00
c5c26cb62f Revert "baldm0mma/ update node version"
This reverts commit 687c06419295d40de29d636f544a28cf5f0eb23b.
2025-03-11 17:04:25 -06:00
a2464f7e39 Revert "baldm0mma/ remove double yarn dip"
This reverts commit 12e1ae0751d15c95c56656c54cd338f77c637fd9.
2025-03-11 17:04:25 -06:00
92cf578dc3 Revert "baldm0mma/ remove cue gen and verification step"
This reverts commit ff74cb954fd307650f9366bd669c6a81afd774c6.
2025-03-11 17:04:25 -06:00
172a4ca43b Revert "baldm0mma/ remove make installation"
This reverts commit 4d6d37d20f087531ee7b0ba4b7142c2c0d320082.
2025-03-11 17:04:25 -06:00
868aabeac2 Revert "baldm0mma/ annotate mem lim"
This reverts commit 10621c40d3729ac4cc7c32b2768f2cf26390f940.
2025-03-11 17:04:25 -06:00
2f893faf03 Update dependency @babel/runtime to v7.26.10 [SECURITY] (#101975)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-11 23:02:02 +00:00
10621c40d3 baldm0mma/ annotate mem lim 2025-03-11 16:59:39 -06:00
4d6d37d20f baldm0mma/ remove make installation 2025-03-11 16:52:14 -06:00
ff74cb954f baldm0mma/ remove cue gen and verification step 2025-03-11 16:46:08 -06:00
12e1ae0751 baldm0mma/ remove double yarn dip 2025-03-11 16:43:27 -06:00
687c064192 baldm0mma/ update node version 2025-03-11 16:43:09 -06:00
1ceab26cb4 baldm0mma/ add pr-lint-build-docs.yml 2025-03-11 16:41:35 -06:00
f296b66b37 Chore: Migrate storybook verification to GHAs (#101968)
* baldm0mma/ add storybook-verification workflow file

* baldm0mma/ build out storybook jobs to drone spec

* baldm0mma/ add node fallback and remove runner id

* baldm0mma/ replace with cypress action

* baldm0mma/ update codeowners

* baldm0mma/ add workflow dispatch for testing

* baldm0mma/ update trigger for testing

* baldm0mma/ update path

* baldm0mma/ update paths

* baldm0mma/ update node file
2025-03-11 15:27:54 -06:00
7dd6f52630 Alerting: Add MissingSeriesEvalsToResolve option to the AlertRule (#101184) 2025-03-11 22:12:06 +01:00
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
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
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
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
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
e645a7d8ff Chore: update golang version in .drone.yaml (#101894) 2025-03-11 18:25:52 +01:00
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
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
7e4beb2074 Alerting: API to return deleted rules (#101429) 2025-03-11 12:40:44 -04:00
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
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
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
5bfe046da9 docs(alerting): clarify behaviour when provisioning the policy tree (#101937) 2025-03-11 15:58:25 +01:00
911c99f325 Field: Use Combobox instead of Select in test (#101928) 2025-03-11 16:58:09 +02:00
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
c8c17683ed ThemeDemo: Use Combobox instead of Select (#101947) 2025-03-11 16:55:30 +02:00
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
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