Commit Graph

57463 Commits

Author SHA1 Message Date
Yuri Tseretyan 374380d1f6
Alerting: Keep the latest version of deleted rule in version table (#101481)
* add feature toggle alertRuleRestore
* Update delete rule to require UserUID, remove all versions and create "delete" version that holds information about who and when deleted the rule
2025-03-05 09:15:26 -05:00
colin-stuart da2c382d80
Tests: Add SearchOrgUsersFn to FakeOrgService (#101589)
add SearchOrgUsersFn to FakeOrgService
2025-03-05 09:02:01 -05:00
Matheus Macabu 61eb837dd6
Chore: Bump Go to 1.23.7 (#101576) 2025-03-05 14:55:36 +01:00
Matheus Macabu 7426ddff94
Chore: Downgrade go-grpc-middleware to fix build in 32-bit systems (#101615) 2025-03-05 14:04:55 +01:00
Alexander Akhmetov d44728f4e5
Alerting: Metric to count imported from Prometheus rules (#100847) 2025-03-05 14:02:28 +01:00
Matheus Macabu 2638de6aeb
Anonymous: Add 1min leeway in device count + search in tests for MySQL 5.7 (#101608) 2025-03-05 12:32:37 +01:00
Sergej-Vlasov b5be6cd4d6
Dashboard: Redesign row edit panes (#101510)
* add row item changes

* redesign row edit panes and header actions

* clean up after merges

* adjust to sentence casing

* bring back layout selection extra options
2025-03-05 11:18:41 +00:00
Alexander Zobnin 01899d761e
Zanzana: Upgrade to OpenFGA v1.8.6 (#101553)
* Zanzana: Upgrade to OpenFGA v1.8.6

* upgrade openfga
2025-03-05 11:58:31 +01:00
Matheus Macabu 3539764008
Hackaton: Add more unit tests, take 3 (#101525)
* serviceaccounts/secretscan: test Service more thoroughly

* middleware/cookies: add tests for CookieOptions

* anonymous/anonimpl: cover a couple more methods

* components/imguploader: Implement WebDAV integration tests

* components/apikeygen: also check IsValid method

* bus: cover invalid callback signature cases

* cloudmigration/objectstorage: add basic unit tests

* login/social/connectors: add test case for GitHub OAuth fetch emails+orgs

* expr/classic: cover more evaluator types in tests
2025-03-05 08:00:12 +01:00
Ryan McKinley dc2defd84f
K8s/Annotations: Use manager/source annotations rather than repo (#101313)
Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
2025-03-05 08:54:20 +02:00
Leon Sorokin e7baf9804e
Transformations: Avoid mutation during variable interpolation (#101594) 2025-03-05 04:06:24 +02:00
grafana-pr-automation[bot] 1f36a8a27c
I18n: Download translations from Crowdin (#101592)
New Crowdin translations by GitHub Action

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-03-05 02:31:01 +02:00
Stephanie Hingtgen e806a00701
K8s: Dashboards: Add useful error message for too large (#101590) 2025-03-04 17:11:42 -06:00
Stephanie Hingtgen 67221fb328
K8s: Folders: Fix not found errors (#101585) 2025-03-05 00:31:41 +02:00
J Stickler 8832aa2aa2
Docs: Fix typo in Drilldown note (#101579)
docs: Fix typo in Drilldown note
2025-03-04 15:09:25 -06:00
Stephanie Hingtgen 7c35d741ba
Folders: Add validation that folder is not a parent of itself (#101569) 2025-03-04 13:56:21 -06:00
Kevin Minehart e933f7cf01
CI: Add frontend lint GitHub Actions workflow (#101559)
* lint frontend

* set frontend as owners of the lint workflow

* Fix syntax

* fix warning

* fix quote
2025-03-04 12:20:04 -06:00
Andreas Christou 4595df9be6
Azure: Resource picker improvements (#101462)
* Update resource group query

- Updates the resource groups query to support users/apps with restricted permissions

* Update resources request to be paginated

- Also order by name
- Add tests

* Update test
2025-03-04 17:30:14 +00:00
Stephanie Hingtgen b8e1511c7f
K8s: Increase max request body (#101564) 2025-03-04 11:27:43 -06:00
David Harris 7b9970f1e7
chore: update text for ds connections tab (#101509)
* chore: update text for ds connections tab

Not sure if additional work is required to generate the translation

* chore: text change for connection tab

---------

Co-authored-by: Sam Kh. <syerikjan.khusayan@grafana.com>
2025-03-04 10:36:56 -05:00
Jack Westbrook 6d4a271a39
Frontend: Expose unstable entrypoints for data and runtime (#101547)
* feat(grafana-data): introduce unstable entrypoint to package

* feat(grafana-runtime): introduce unstable entrypoint to package

* feat(plugins): expose unstable entrypoints for data and runtime to plugins

* feat(packages): dummy exports so package verification and shared deps imports work
2025-03-04 16:22:05 +01:00
Yuri Tseretyan 67b44ad22a
Alerting: Fix state reason (#101530)
---------

Signed-off-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
2025-03-04 17:05:41 +02:00
Kevin Minehart 2f3aff0e04
Dashboards: Prevent title longer than 5 000 characters (#101554)
Co-authored-by: AgnesToulet <35176601+AgnesToulet@users.noreply.github.com>
2025-03-04 17:02:54 +02:00
Oscar Kilhed 6ed55766da
Dashboards: Fix saving repeat rows in schemav2 (#101432)
fix saving repeat rows
2025-03-04 15:16:01 +01:00
Joey b3ad7ce151
TraceView: Use global config for showing and hiding feedback link in trace view (#101504)
Use global config for showing feedback link in trace view
2025-03-04 14:15:49 +00:00
Tom Ratcliffe ac0fd38183
Chore: Add new `no-translation-top-level` eslint rule (#101550) 2025-03-04 15:42:37 +02:00
Sergej-Vlasov 4f0e76ec56
Dashboards: Redesign tab edit pane and header (#101523)
* add tab item changes

* redesign tab edit pane and header actions

* Merge branch 'main' into serge/redesign-tab-edit-pane

* address comments

* adjust i18n typo

* sanitise url
2025-03-04 13:09:54 +00:00
Gilles De Mey 751ea772e6
Alerting: Add error handling for missing data source (#101508) 2025-03-04 13:22:24 +02:00
Jack Baldry 5b61222733
Lint only Markdown files (#101533)
* Lint only Markdown files

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Lint a file

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Test

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Lint

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

---------

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2025-03-04 11:00:35 +00:00
Jack Westbrook bbfeb8d220
Feature: Introduce subresource integrity checks (SRI) for frontend assets (#100983)
* feat(featuremgmt): introduce feature toggle for enabling sri checks

* feat(frontend): use assetSriChecks feature toggle to inject integrity hash into script tags

* chore(webpack): align sri algorithms across dev and prod builds

* docs(featuremgmt): update assetSriChecks to pass CI

* docs(featuremgmt): fix more spelling complaints with assetSriChecks

* Add crossorigin attribute

* chore(webpack): add subresource-integrity plugin

* build(webpack): wrap webpack jsonp loader integrity checks in feature flag checks

* revert(index.html): remove crossorigin attribute if assertSriChecks is disabled

---------

Co-authored-by: Kristian Bremberg <kristian.bremberg@grafana.com>
2025-03-04 11:56:35 +01:00
Sergej-Vlasov bf9a34f2ca
TimePicker: Ability to manually specify quick ranges (#101465)
* add quickRanges to scene model transforms

* add test for quickRanges transformations

* fix lint
2025-03-04 10:45:24 +00:00
Alexander Akhmetov 60827fe499
Alerting: Return 403 if no datasource access or quota has been exceeded (#101522) 2025-03-04 10:04:47 +01:00
Jack Westbrook 859c12bbb4
Grafana UI: Expose unstable entrypoint (#97080)
* feat(grafana-ui): build unstable entrypoint for experimental components

* feat(plugins): expose grafana/ui/unstable

* build(grafana-ui): add rollup plugin to create alias package.json for unstable entrypoint

* build(packages): rewrite prepare npm script to generate alias packagejson files

* chore(packages): use relative paths in publishConfig for exports generation

* chore(frontend): move npmcli/package-json package to root package.json

* revert(grafana-ui): remove rollup plugin for generating alias package.json files

* chore(grafana-ui): clean up unstable directory postpack to prevent yarn lock issues

* build(packages): fix scope for pkgName usage

* feat(packages): create separate cjs and esm builds that validate with arethetypeswrong cli

* chore(yarn): refresh lock file

* fix(packages): make sure alias package.jsons point to existing files
2025-03-04 09:55:41 +01:00
Stephanie Hingtgen 503bc2ba66
K8s: Indexing: Fix v2 (#100683) 2025-03-04 08:04:53 +02:00
Ryan McKinley c1b48cc488
Dashboards: Add apiVersion to dashboard table (#100845) 2025-03-04 07:47:45 +03:00
grafana-pr-automation[bot] 8a341ebcce
I18n: Download translations from Crowdin (#101540)
New Crowdin translations by GitHub Action

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-03-04 02:31:05 +02:00
alerting-team[bot] d9538fd5dc
Alerting: Update alerting module to bb85a58ec8975d91b49d746dbd11d312f0485ecc (#101537)
[create-pull-request] automated change

Co-authored-by: yuri-tceretian <25988953+yuri-tceretian@users.noreply.github.com>
2025-03-03 18:10:15 -05:00
Sarah Zinger ed3f96ce28
Fix misleading log line (#101532) 2025-03-03 15:52:47 -05:00
Charandas cedb4ef9c1
fix: testutil blocking PR checks from passing (#101527) 2025-03-03 10:56:30 -08:00
Jev Forsberg dc61bf0855
Chore: Migrate `pr-lint-backend` from Drone to GHAs (#101482)
* baldm0mma/ create backend-code-checks workflow

* baldm0mma/ update to validate backend configs

* baldm0mma/ rem unused dir

* baldm0mma/ update codeowners

* baldm0mma/ update naming

* baldm0mma/ update case

* baldm0mma/ update workflow name

* baldm0mma/ rem action and run the commands directly

* baldm0mma/ update codeownders

* baldm0mma/ update codeowners for workflow

* baldm0mma/ update workflow name in codeowners
2025-03-03 11:29:11 -07:00
Ieva 5f6b00a72f
Revert "Authz: Removes setting `viewers_can_edit`" (#101528)
Revert "Authz: Removes setting `viewers_can_edit` (#101265)"

This reverts commit 4ce41acade.
2025-03-03 20:26:55 +02:00
Charandas 22d39f585d
fix: don't double set aggregator certs (#101444) 2025-03-03 09:50:11 -08:00
Ivana Huckova 66279081c6
Elasticsearch: Invalid response JSON parsing error should be downstream (#101506)
* Elasticsearch: Invalid response JSON parsing error should be downstream

* Add test

* Update test
2025-03-03 18:14:43 +01:00
Alexander Akhmetov c7c68322b1
Alerting: Allow specifying a folder for Prometheus rule import (#101406)
What is this feature?

Allows the creation of alert rules with mimirtool in a specified folder.

Why do we need this feature?

Currently, the APIs for mimirtool create namespaces and rule groups in the root folder without the ability to set a custom folder. For example, it could be a special "Imported" folder, etc.

This PR makes it possible with a special header: mimirtool ... --extra-headers="X-Grafana-Alerting-Folder-UID=123". If it's not present, the root folder is used, otherwise, the specified one is used.

mimirtool does not support nested folder structures, while Grafana allows folder nesting. To keep compatibility, we return only direct child folders of the working folder (as namespaces) with rule groups and rules that are directly in these child folders as if there are no nested folders.

For example, given this folder structure in Grafana:

```
	grafana/
	├── production/
	│   ├── service1/
	│   │   └── alerts/
	│   └── service2/
	└── testing/
	    └── service3/
```

If the working folder is "grafana":

    Only namespaces "production" and "testing" are returned
    Only rule groups directly within these folders are included

If the working folder is "production":
   -  Only namespaces "service1" and "service2" are returned
    Only rule groups directly within these folders are included
2025-03-03 17:59:01 +01:00
linoman b7a0aeeb0d
SCIM: Disable auto assign organization if the user has been provisioned (#101307)
* Add isProvisioned field to model

* Add new isProvisioned column to migration

* Disable auto assignment to organization if the user is provisioned

* add annotation to user model

* add annotation to user models

* Remove IsProvisioned field from Identity

* Move new field assignenment and add default value

* Update annotations for user query results

* Remove isProvisioned from identity

* Add new column to test

* Resolve user from identity at SyncOrgHook
2025-03-03 17:51:23 +01:00
Serge Zaitsev 165bca6417
Chore: Add initial/experimental xorm spanner driver (#101398)
* make it build and start

* run some migrations

* add build tags, remove log

* remove unused code

* revert go.mod changes

* move initialisation into dialect file

* update workspace

* update workspace once again

* clean up dependencies

* further cleanup

* Address some review feedback.

* Fix go.sum.

---------

Co-authored-by: Peter Štibraný <pstibrany@gmail.com>
2025-03-03 17:02:10 +01:00
Tobias Skarhed 4bab25054f
FrontendMonitoring: Track web vitals attribution (#101520) 2025-03-03 16:17:57 +01:00
Gilles De Mey 2430e21ffa
Alerting: Fix no search results loop for new list UI (#101513) 2025-03-03 17:14:34 +02:00
Haris Rozajac 41ab914da2
Dashboard: Fix the unintentional time range and variables updates on saving (#101475)
pass the changedModel
2025-03-03 08:07:02 -07:00
Matheus Macabu b110754c9a
Hackaton: Add more unit tests, take 2 (#101473)
* login/social/socialimpl: add assertions for usage stats, support bundle and oauthinfo methods

* accesscontrol/acimpl: add tests for GetRoleByName

* anonymous/sortopts: add tests for Sorter

* cloudmigration/gmsclient: add basic test cases for all methods

* shorturls/shorturlimpl: add more edge test cases

* tag/tagimpl: add test to cover duplicate tag kv and nil pairs

* updatechecker: add test cases for module
2025-03-03 13:12:13 +01:00