Commit Graph

6649 Commits

Author SHA1 Message Date
Andres Martinez Gotor
7f9ebe5464
Chore: Make the secret table name configurable (#83106) 2024-02-20 16:56:43 +01:00
Kristina
9d6da82e36
Query History: Count using SQL, not post query (#82208)
* Count in SQL, not externally

* Fix linter
2024-02-20 07:32:40 -06:00
Matthew Jacobson
87ab98ea95
Alerting: Fix panic in provisioning filter contacts by unknown name (#83070) 2024-02-19 17:30:13 +02:00
Serge Zaitsev
1aff748e8f
Use split scopes instead of substr in search v1 (#82092)
* use split scopes instead of substr in search v1

* tests, of course

* yet, some test helpers dont use split scopes

* another test helper to fix

* add permission.identifier to group by

* check if attribute is uid

* fix tests

* use SplitScope()

* fix more tests
2024-02-18 22:26:08 +01:00
Ryan McKinley
f23f50f58d
Expressions: Add model struct for the query types (not map[string]any) (#82745) 2024-02-17 02:59:11 +02:00
Matthew Jacobson
46a77c0074
Alerting: Validate upgraded receivers early to display in preview (#82956)
Previously receivers were only validated before saving the alertmanager
configuration. This is a suboptimal experience for those upgrading with preview
as the failed channel upgrade will return an API error instead of being
summarized in the table.
2024-02-16 15:17:07 -05:00
Sofia Papagiannaki
38e8c62972
Folders: Switch order of the columns in folder table indexes so that org_id becomes first (#82454)
* Folders: Switch order of the columns in folder table so that org_id becomes first
2024-02-16 21:10:46 +02:00
Xavi Lacasa
46c26bbd0b
Auth: Fix email verification bypass when using basic authentication (#82914) 2024-02-16 18:54:59 +01:00
William Wernert
fabaff9a24
Alerting: Create metric for rules using simple notifications (#82904)
---------

Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
2024-02-16 19:01:49 +02:00
Matthew Jacobson
dfaf6d1e2e
Alerting: Dry-run legacy upgrade on startup (#82835)
Adds a feature flag (alertingUpgradeDryrunOnStart) that will dry-run the legacy 
alert upgrade on startup. It is enabled by default.

When on legacy alerting, this feature flag will log the results of the legacy 
alerting upgrade on startup and draw attention to anything in the current legacy 
alerting configuration that will cause issues when the upgrade is eventually 
performed. It acts as a log warning for those where action is required before 
upgrading to Grafana v11 where legacy alerting will be removed.
2024-02-16 11:29:54 -05:00
Laura Fernández
7422a90e8b
ReturnToPrevious: modify stage of the feature toggle (#82912) 2024-02-16 17:00:51 +01:00
Matthew Jacobson
e7c6e9c5c9
Alerting: Fix migration edge-case race condition for silences (#81206)
If the db already has an entry in the kvstore for the silences of an
alertmanager before the migration has taken place, then it's possible that the
active alertmanager will overwrite the silence file created by the migration
before it has a chance to load it into memory.

This should not happen normally but is possible in edge-cases.

This change opts to bypass the unnecessary step of writing the silences to disk
during the migration and instead write them directly to the kvstore. This avoids
 the race condition entirely and is more correct as we treat the database as the
  source of truth for AM state.
2024-02-16 10:47:34 -05:00
Todd Treece
8f0431ba46
K8s: Pass ID token in X-Extra-id-token header (#82893) 2024-02-16 17:07:37 +02:00
kay delaney
82e3e2e558
LibraryPanels/RBAC: Fix issue where folder scopes weren't being correctly inherited (#82700) 2024-02-16 14:17:41 +00:00
Karl Persson
9e04fd0fb7
AuthToken: Remove client token rotation feature toggle (#82886)
* Remove usage of client token rotation flag

* Remove client token rotation feature toggle
2024-02-16 15:03:37 +01:00
Giuseppe Guerra
6ce0efeb41
Plugins: Enable feature toggle angularDeprecationUI by default (#82880)
* Plugins: Enable feature toggle angularDeprecationUI by default

* Clarified feature toggle description
2024-02-16 14:46:14 +02:00
Ieva
7343102d59
RBAC: Migration to remove the scope from permissions where action is alert.instances:read (#82202)
* add a migration to remove the scope from any permissions where action is alert.instances:read

* linting
2024-02-16 11:52:43 +00:00
Misi
bb9d5799cf
Auth: Load oauth_allow_insecure_email_lookup using the SettingsProvider (#82460)
* wip

* Introduce fixed:server.config:writer role

* Fix tests

* Update name
2024-02-16 12:05:00 +01:00
linoman
ac84069071
Password policy (#82268)
* add password service interface

* add password service implementation

* add tests for password service

* add password service wiring

* add feature toggle

* Rework from service interface to static function

* Replace previous password validations

* Add codeowners to password service

* add error logs

* update config files


---------

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2024-02-16 04:58:05 -06:00
Gabriel MABILLE
846eadff63
RBAC Search: Replace userLogin filter by namespacedID filter (#81810)
* Add namespace ID

* Refactor and add tests

* Rename maxOneOption -> atMostOneOption

* Add ToDo

* Remove UserLogin & UserID for NamespaceID

Co-authored-by: jguer <joao.guerreiro@grafana.com>

* Remove unecessary import of the userSvc

* Update pkg/services/accesscontrol/acimpl/service.go

* fix 1 -> userID

* Update pkg/services/accesscontrol/accesscontrol.go

---------

Co-authored-by: jguer <joao.guerreiro@grafana.com>
2024-02-16 11:42:36 +01:00
Misi
fe0fc08b93
Chore: Update ssoSettingsApi feature toggle state to Public Preview (#82521)
Update feature toggle state to Public Preview
2024-02-16 12:20:08 +02:00
Sven Kirschbaum
86c618a6d6
Alerting: Escape namespace and group path parameters (#80504)
Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2024-02-16 09:43:47 +01:00
Nathan Marrs
cdd3e1c776
chore: Promote panel monitoring feature toggle to GA (#82472) 2024-02-15 21:29:59 -08:00
Yuri Tseretyan
5985876f4a
Alerting: make feature flag alertingSimplifiedRouting public (#82808) 2024-02-15 17:58:34 -05:00
Matthew Jacobson
118e4a50b7
Alerting: Remove start page of legacy upgrade preview (#82010)
Alerting: Remove start page of upgrade preview

Alerting upgrade page will now always show the summary table even before
upgrading any alerts or notification channels. There a few reasons for this:

- The information on the start page is redundant as it's now contained in the
documentation.
- Previously, if some unexpected issue prevented performing a full upgrade, a
user would have limited to no means to using the preview tool to help fix the
problem. This is because you could not see the summary table until the full
upgrade was performed at least once. Now, you can upgrade individual alerts and
notification channels from the beginning.
2024-02-15 17:34:00 -05:00
Ryan McKinley
c879588332
APIServer: Use options pattern in standalone mode (#82760)
use options
2024-02-15 12:00:20 -08:00
Julien Duchesne
ba63e62311
Alerting: Return provenance of notification templates (#82274) 2024-02-15 14:35:54 -05:00
Marcus Efraimsson
b894d26cbc
SQLStore: New store without side-effects (#82657) 2024-02-15 14:03:55 -04:00
Todd Treece
f593161ef6
K8s: Set X-Remote- headers for SignedInUser (#82543) 2024-02-15 12:29:36 -05:00
William Wernert
b7bbc5058f
Alerting: Don't validate rules on group update if they've only been reordered (#81841)
---------

Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
2024-02-15 12:03:28 -05:00
Ieva
4d53385d5f
RBAC: allow listing permissions on the root folder (#82184)
* allow returning AC metadata for the root folder

* add a test

* share the reserved root folder UID with frontend
2024-02-15 16:13:14 +00:00
Yuri Tseretyan
1eebd2a4de
Alerting: Support for simplified notification settings in rule API (#81011)
* Add notification settings to storage\domain and API models. Settings are a slice to workaround XORM mapping
* Support validation of notification settings when rules are updated

* Implement route generator for Alertmanager configuration. That fetches all notification settings.
* Update multi-tenant Alertmanager to run the generator before applying the configuration.

* Add notification settings labels to state calculation
* update the Multi-tenant Alertmanager to provide validation for notification settings

* update GET API so only admins can see auto-gen
2024-02-15 09:45:10 -05:00
Alexander Weaver
d4ae10ecc6
Alerting: Small refactor, move unrelated functions out of fetcher (#82459)
Move unrelated functions out of fetcher
2024-02-14 20:01:32 +02:00
Diego Augusto Molina
ff08c0a790
Chore: improve test readability in ngalert/schedule (#82453)
Chore: improve test readability
2024-02-14 14:53:32 -03:00
Dominik Prokop
f016f95298
GroupBy variable core integration (#82185)
* Bump scenes

* Make GroupByVariableModel a VariableWithOptions

* Serialise/deserialise group by variable

* WIP: Group by variable editor

* WIP tests

* Group by variable tests

* add feature toggle and gate variable creation behind it

* Fix types

* Do not resolve DS variable

* Do not show the message if no DS is selected

* Now groupby has options and current

* Update public/app/features/dashboard-scene/settings/variables/components/GroupByVariableForm.test.tsx

Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>

* don't allow creating groupby if toggle is off + update tests

* add unit tests

* remove groupByKeys

---------

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
2024-02-14 09:18:04 -08:00
Sven Grossmann
e422309bc4
Loki: Enable lokiStructuredMetadata feature flag by default (#82325) 2024-02-14 17:24:56 +01:00
Nathan Marrs
ce750e0618
Deprecation: Create explicit feature toggles for remaining panels (#82217) 2024-02-14 18:06:25 +02:00
Diego Augusto Molina
9c29e1a783
Alerting: Fix data races and improve testing (#81994)
* Alerting: fix race condition in (*ngalert/sender.ExternalAlertmanager).Run

* Chore: Fix data races when accessing members of *ngalert/state.FakeInstanceStore

* Chore: Fix data races in tests in ngalert/schedule and enable some parallel tests

* Chore: fix linters

* Chore: add TODO comment to remove loopvar once we move to Go 1.22
2024-02-14 12:45:39 -03:00
Misi
12b1170631
Auth: Validation fixes for SSO Settings (#82252)
* Validation fixes

* Add URL validations + tests

* Add ApiUrl validation

* Refactor validators

* lint

* Clean up

* Improvements
2024-02-14 16:06:52 +01:00
Yulia Shanyrova
9dcb7800de
Plugins: Add fuzzy search to plugins catalogue (#81001)
* WIP add fuzzysearch to plugins catalog

* Add keywords to the plugins listing output

* add fuzzy search to plugin catalog, add keywords to plugins at frontend side

* refactor fuzzysearch function after review

* review changes

* change the version of uFuzzy library

* change reduce result object in getPluginDetailsForFuzzySearch

* fix yarn lock error

* fix helpers tests

* fix frontend searching test

* fix frontend linting issues

* fix tests

---------

Co-authored-by: Esteban Beltran <esteban@academo.me>
Co-authored-by: Giuseppe Guerra <giuseppe@guerra.in>
2024-02-14 14:30:24 +01:00
Ieva
7c44dd713a
IP range AC: Add X-Real-IP header (#82390)
add X-Real-IP header
2024-02-14 11:45:55 +00:00
Sofia Papagiannaki
28de94f6a2
Folders: Modify folder service Get() to optionally return fullpath (#81972)
* Folders: Modify Get() to optionally return fullpath

* Set FullPath to folder title if feature flag is off

* Apply suggestion from code review
2024-02-14 04:47:46 +11:00
Alexander Weaver
ccb4533a86
Alerting: Remove unused AlertRuleVersionWithPauseStatus (#82383)
Remove unused AlertRuleVersionWithPauseStatus
2024-02-13 10:56:24 -06:00
Alexander Weaver
99fa064576
Alerting: Emit warning when creating or updating unusually large groups (#82279)
* Add config for limit of rules per rule group

* Warn when editing big groups through normal API

* Warn on prov api writes for groups

* Wire up comp root, tests

* Also add warning to state manager warm

* Drop unnecessary conversion
2024-02-13 08:29:03 -06:00
Ryan McKinley
0c6e409350
Chore: Update arrow and prometheus dependencies (#82215)
* update arrow and prometheus

* keep codeowner

* use compare

* use grafana-plugin-sdk-go v0.210.0

---------

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
2024-02-13 01:50:25 +01:00
Ryan McKinley
d1e5e4e747
FeatureToggles: keep older history (#82336) 2024-02-12 15:13:51 -08:00
Todd Treece
d6e6298103
K8s: Add Aggregation to Backend Service (#81591)
Co-authored-by: Charandas Batra <charandas.batra@grafana.com>
2024-02-12 22:59:35 +02:00
Todd Treece
6d5211e172
K8s: Fix windows filepath issue in file storage (#81919)
Co-authored-by: Dan Cech <dcech@grafana.com>
2024-02-12 13:21:57 -05:00
Galen Kistler
29be9b127a
Logs: Table UI - Enable feature flag by default (GA) (#81185)
default logsExploreTableVisualisation to true
2024-02-12 10:12:05 -06:00
Karl Persson
1315c67c8b
Team/User: UID migrations (#82298)
* Add user uid migration to run on every startup to protect against empty values in a upgrade downgrade scenario

* Add team uid migration to run on every startup to protect against empty values in a upgrade downgrade scenario

* Run team uid migration
2024-02-12 14:48:29 +01:00