Commit Graph

8092 Commits

Author SHA1 Message Date
Leonor Oliveira
df36e77cd3 [Folders] Put move and counts behid a feature flag (#98317)
* Put move and counts behid a feature flag

* Gen toggles

* Generate feature flag

* Make feature name more explicit

* Remove unused code

* Update toggle  name
2024-12-27 18:10:44 +01:00
Ieva
1334caa6c8 AuthZ service: Support anonymous access (#98322)
support anonymous access
2024-12-20 16:32:57 +01:00
Gabriel MABILLE
efb7cc0343 Chore: Authlib upgrade (#98319)
* Chore: Authlib upgrade

* Upgrade authlib

* Uncommit file
2024-12-20 15:48:35 +01:00
Ieva
2503b31f53 AuthZ service: Implement listing (#98220)
* listing implementation pt 1

* validate list request

* register GRPC endpoint, pass the correct user UID and return folder identifiers not scopes

* uncomment code that was only commented out for testing

* fix tests

* remove unneeded changes

* remove unused import

* Update pkg/services/authz/rbac/service.go

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>

* refactor to improve efficiency

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>

* use variable names when logging

* adding tests for listing

---------

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2024-12-20 15:48:20 +02:00
Eric Leijonmarck
e0e4e1cdff LBAC for datasources: Refactor to only use jsondata and not the datasource struct (#98294)
refactor to only use jsondata and not the datasource struct
2024-12-20 11:40:26 +00:00
Gabriel MABILLE
55f8be62a1 AuthZ Service: Use singleflight group to fetch and build the folder tree (#98299)
* AuthZ Service: Use singleflight group to fetch and build the folder tree

* Change the sfgroup key

* Future proof
2024-12-20 10:26:30 +01:00
Charandas
24bf337c56 Playlists: convert to use reconcilers instead (#98075) 2024-12-19 19:09:31 -08:00
Scott Lepper
a8f347144d wire up the ui to the new search api (#97866)
wire up the ui to the new search api

Co-authored-by: Scott Lepper <scott.lepper@gmail.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Dan Cech <dcech@grafana.com>
2024-12-19 13:21:48 -05:00
Gabriel MABILLE
c175722dfd AuthZService: Cache folder tree (#98210)
* AuthZService: Cache folder tree

* Remove fmt

* Suggestion

* Add tests
2024-12-19 13:55:59 +01:00
Ivan Ortega Alba
6c5b408339 Feature toggle: remove dashboardSchemaV2 (#98252) 2024-12-19 14:28:20 +02:00
Nick Richmond
721c50a304 Prometheus: Improve handling of special chars in label values (#96067)
* fix: handling of special chars

* docs: add clarity

* fix: escaping

* refactor: put changes behind new feature toggle

* docs: use consistent comment style

* refactor: rename feature toggle for brevity

* use single quotes

* fix unit tests

* remove redundant json entry

* fix: keep all changes behind feature toggle

* fix: support builder mode

* fix: don't escape when using regex operators

* fix: code mode label values completions with special chars

* refactor: remove unneeded changes

* move feature toggle up so new changes from main won't conflict with ours

* fix: escape label values in metric select scene

* refactor: ensure changes are behind feature toggle

---------

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
2024-12-18 16:31:08 -05:00
owensmallwood
4837585cab Unified Storage Search: Add sprinkles (#97820)
* Wire up sprinkles to oss and enterprise. Fetching sprinkles not implemented yet.

* Adds wireset for initializing document builders. Had to init it when creating the service to avoid cyclical imports.

* updates to int64 for stats

* adds config for sprinklesApiServer and gets sprinkles from there when its present

* add comment for later

* adds feature toggle for sprinkles. returns empty results when flag not enabled.

* adds unified storage config setting for sprinkles apiserver page limit

* fixes bug where dashboard uid was not getting set

* when creating dashboard summary, use metadata.name as the dashboard uid

* cleans up wire. use existing oss and enterprise sets to generate doc builders

* remove old wireset

* fix linter - adds missing arg for doc builders

* update dashboard stats in tests

* updates test-data dashboards

* log a warning instead of returning an error if we can't get sprinkles for a namespace

* dont read uid from dashboard json
2024-12-18 11:00:54 -06:00
Ieva
30321a59a9 Fix broken builds (#98198)
* fix broken builds

* fix broken builds
2024-12-18 17:24:56 +02:00
Liza Detrick
67a85fc358 feat: (Navlinks) - Add Adaptive Traces to Cost mgmt navlinks (#97981) 2024-12-18 09:05:18 -06:00
Misi
26c323b5a6 Chore: Do not return the token on refresh error (#98171)
* Small improvements

* Remove unused error
2024-12-18 15:30:39 +01:00
Ieva
40a9f7162a AuthZ service: Build folder tree and check inherited permissions (#98074)
* build folder tree and check inherited permissions

* don't fetch dashboards

* remove unused queries
2024-12-18 14:19:16 +00:00
Gabriel MABILLE
961211b21a AuthZ Service: Add caching (#98008)
* AuthZ Service: Add caching

* split in functions

* Test getUserTeams

* Add tests to getUserBasicRole

* Test getUserPermissions

* Cache user identifiers

* fix test
2024-12-18 14:07:19 +01:00
Misi
a5635d7e89 Auth: Update external session data regardless if the improved session handling is enabled (#98139)
Update ext session tokens regardless if the ft is enabled
2024-12-18 11:27:50 +01:00
Jackson Coelho
f46c07aba7 feat: Add investigations app backend (#98084)
* add initial structure for investigations app backedn

* update version

* Fix codegen & paths

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

* Fix Go workspace and CODEOWNERS

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

* update kinds for investigation

* update dockerfile

* update codeowners

* update dependabot

* update golangci

* add investigation app and watcher

* run make update-workspace

* run make update-workspace

* register investigation app

* add investigation app to wireset

* add investigations app provider to api initializer

* fix imports

* update feature toggle

* fix cue definition and api initializer

* clean up removing unecessary components

* remove watcher feature toggle

* add investigations backend behind feature toggle

* revert change

---------

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
Co-authored-by: Igor Suleymanov <igor.suleymanov@grafana.com>
2024-12-18 10:31:03 +02:00
Dominik Prokop
070f0e4457 Dashboard API versions handling (#96666)
* structure apic

* API versioning proposal

* Make api service independent from version

* Update v2

* Fix public dashboards page test

* Uncomment reload dashboard feature code

* Revert

* Betterer

* Fix imports

* useV2DashboardsAPI feature toggle

* POC/v2 schema: Add v1<-> v2 transformers (#97058)

* Make dshboard access interface more precise

* Add first pass for schema v1<->v2 transformers

* Update response transformer test

* Import fixes

* Manage dashboards validation: Handle v2 schema

* Handle new dashboard with v2

* Fix tests

* Move dashboard is folder error handling to legacy API implementation

* Add tests for dashboard api client

* betterer

* Use dashboard DTO when capturing dashbaord impression

* prettier

* Dashboard API: resolve folder metadata

* Add tests for resolving folder metadata

* Fix DashboardPicker

* Renames and nits

* POC Alternative Suggestion for  Dashboard API versions handling (#97789)

* Add transitional_dashboard_api, reset components that are not ready for v2 schema, and start working on migrating
DashboardPicker to use v2 schema

* reset DashboardScenePageStateManager

* Improve logic in transitional api, also remove isDashboardResource checks from components

* REmove transitional_dashboard_api and apply PR feedback

* Apply PR feedback, use 'v2' as a parameter and remove unnecesary if

* Fix tests

* Adding missing comments from original PR and also changing order to improve diffing in github :)

* update betterer

* fix prettier

* Add tests for DashboardPicker

* Do not use unified alerting mocks

* Fix unused type in dashboard test

* Improve comments in DahboardPicker

* Update folder validation fn

* Validation update

* Update legacy api test

* Lint

---------

Co-authored-by: alexandra vargas <alexa1866@gmail.com>
Co-authored-by: Alexa V <239999+axelavargas@users.noreply.github.com>
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
2024-12-17 22:17:09 +01:00
Stephanie Hingtgen
b3985a4d37 k8s: Dashboards: allow querying of unistore (#97995) 2024-12-17 10:35:46 -06:00
Ryan McKinley
a01878332a K8s/Storage: Deprecate StorageTypeLegacy (#98096) 2024-12-17 17:00:35 +03:00
Ashley Harrison
687e207b48 SingleTopNav: Clean up and remove code + toggle (#97937)
* clean up almost all of the toggle

* betterer

* clean up searchBarHidden and extract translations

* fix remaining unit tests

* remove redundant topPosition
2024-12-17 13:32:38 +00:00
Matheus Macabu
c824f5b9bf CloudMigrations: Add config for alert rules state behavior and remove experimental feature toggle on alerts migration (#97254)
* CloudMigrations: add config for controlling alert rules state behavior

* CloudMigrations: remove experimental 'onPremToCloudMigrationsAlerts' feature toggle
2024-12-17 12:56:18 +01:00
Georges Chaudy
3fe2227c82 [auth] make id-token optional (#97831)
make idtoken optional

enure there is always an identity in the context

fix: update token

fix: now it should work

fix: now it should work
2024-12-17 13:28:00 +02:00
Alexander Akhmetov
bb713cf8e4 Alerting: Add simplified_notifications_section setting to grafana_alerting_simplified_editor_rules metric (#98053) 2024-12-17 11:13:31 +01:00
Misi
6cd3a5458e Auth: Return error when retries have been exhausted for OAuth token refresh (#98034)
Return error when retries for DB lock have been exhausted in oauth_token.go
2024-12-16 17:03:39 +01:00
Alexander Akhmetov
1f8f9a45d7 Alerting: Add state_periodic_save_batch_size config option (#98019)
* Alerting: Add state_periodic_save_batch_size config option

---------

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2024-12-16 15:30:38 +01:00
Andres Martinez Gotor
95dea152b6 Plugins Admin: Avoid disabling auto-enabled apps (#97800) 2024-12-16 14:51:04 +01:00
Stephanie Hingtgen
8f6e9f8ed0 Restores in app platform (#97582) 2024-12-13 16:55:43 -06:00
Misi
09123a7bd6 FeatureToggle: Enable useSessionStorageForRedirection by default (#97966)
Enable useSessionStorageForRedirection by default
2024-12-13 19:36:35 +01:00
Sven Grossmann
5ac7443fce Loki: Default to /labels API with query param instead of /series API (#97935)
* feat(loki-labels-api): add feature toggle

* feat(loki-labels-api): default to `/labels` API
2024-12-13 15:31:41 +01:00
Karl Persson
5c0cb09d27 Zanzana: Remove capabilities (#97918)
Remove capabilities
2024-12-13 12:23:12 +01:00
Dana Axinte
b9d6af34cd CloudMigrations: Obtain gcom plugins to enable plugins migration (#97784)
* just api

* preallocate
2024-12-13 10:59:43 +00:00
Laura Fernández
aac62c89da UnifiedHistory: Create feature toggle (#97922) 2024-12-13 12:41:18 +02:00
Jo
40d3b02648 Auth: Separate anonymous settings to its own struct (#97791)
separate anonymous settings to its own struct
2024-12-13 10:46:27 +01:00
Agnès Toulet
1c4d30f73c Rendering: Add logs (#97885)
* Rendering: add logs

* fix tests and lint issues
2024-12-13 09:42:35 +01:00
Isabella Siu
b3a12f486e Elasticsearch: Use _field_caps instead of _mapping to get fields (#97607) 2024-12-12 17:20:04 -05:00
Jean-Philippe Quéméner
1509fadd5b refactor(unified-storage): make datasyncer configurable (#97832) 2024-12-12 21:41:01 +01:00
owensmallwood
0e8702369a Folders: Create default folder permissions within transaction (#97812)
create default folder permissions within transaction
2024-12-12 14:08:46 -06:00
Ieva
32554c78a8 Direct DB perm checks: check that the namespaces match (#97828)
check that the namespace of the caller matches the namespace in the request
2024-12-12 12:57:16 +02:00
Santiago
7ad004236e Alerting: Change the description for the 'Message' field in webhooks (#96153) 2024-12-12 10:30:23 +01:00
Ieva
ded90fa28d App platform: Implement perm check with direct db access (#97579)
* implement perm check with direct db access

* add tests

* more tests

* Update pkg/services/authz/rbac/service.go

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>

* Update pkg/services/authz/rbac/service.go

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>

* allow fetching permissions for a user who is not a member of the org

* linting

* fix typo

---------

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2024-12-12 08:52:14 +00:00
Todd Treece
c5e8e71ee3 K8s: Add APIGroupPostStartHookProvider (#97801) 2024-12-11 19:13:42 +02:00
Alexander Zobnin
61d71ec5b1 Zanzana: Handle anonymous users (#97171)
* add anonymous users to schema

* sync anonymous user role

* remove unused

* fix linter

* only add anonymous reconciler if feature is enabled
2024-12-11 12:22:42 +01:00
Ivana Huckova
2149c75e22 Zipkin: Run queries through backend (#97754)
* Zipkin: Run queries through backend

* ;2DUpdate e2e

* Update e2e
2024-12-11 12:31:24 +02:00
Stephanie Hingtgen
f05d016ae7 Chore: Remove mysqlParseTime feature toggle (#97761) 2024-12-10 15:13:13 -06:00
Stephanie Hingtgen
b05d60e5b5 k8s: dashboards: remove FT (#97758) 2024-12-10 12:35:36 -06:00
Juan Cabanas
c2333e3bc0 ShareDrawer: Enable by default (#97259) 2024-12-10 12:52:18 -03:00
Karl Persson
87ba9c60b2 Zanzana: change type name from namespace to group_resource (#97741)
* Change type name from namespace to group_resource

* update function names and test descriptions
2024-12-10 15:21:54 +01:00