203 Commits

Author SHA1 Message Date
20c700dd52 Chore: reduces barrel files part II (#107688)
* Chore: reduce barrel files

* chore: fixes unit test

* Chore: reduces barrel files part II

* chore: fix import sorting
2025-07-09 06:15:33 +02:00
d5a1781fb6 Schema V2: Simplify annotations v1<->v2 conversions (#107390)
* Initial migration pending to test

* Update tests

* apply feedback

* Remove unnecessary types

* Fix types

* Update tests

* fixing tests

* Default DS for transformer

* Update the default DS

* Update the generated sdk files

* Restore commented tests

* Update tests

* Updating snapshots

* fix

* Do not preserve empty datasource in panel spec

* update provisioning v2 sample dashboard

* Fix test

* Prettier

* Fix import e2e

* Prettier

* restore commented tests

* Update to support annotations

* Lint

* Make gen apps

* Make the build pass

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

* Update grafana-app-sdk to 0.39.2

* Workspace update

* make gen-cue

* Runtime error fix

* Update dashboard spec

* Update go workspaces

* Schema V2: Simplify annotations v1<->v2 conversions

* Update public/app/features/dashboard-scene/serialization/transformSceneToSaveModelSchemaV2.ts

* Cleanup and some more tests

* test improvement

* Update public/app/features/dashboard-scene/serialization/transformSceneToSaveModelSchemaV2.ts

* Update go.sum

* make generate

* Update public/app/features/dashboard-scene/serialization/transformSceneToSaveModelSchemaV2.ts

Co-authored-by: Haris Rozajac <58232930+harisrozajac@users.noreply.github.com>

* ts

* make gen-apps

* Update response transformers to correctly handle v2->v1 annotations

* Update dashboards openapi snapshot

---------

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
Co-authored-by: alexandra vargas <alexa1866@gmail.com>
Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com>
Co-authored-by: Igor Suleymanov <igor.suleymanov@grafana.com>
Co-authored-by: spinillos <selenepinillos@gmail.com>
Co-authored-by: Haris Rozajac <58232930+harisrozajac@users.noreply.github.com>
2025-07-08 14:42:30 +02:00
37c480def4 K8s: Add support for stored subresources in app runner (#105481) 2025-07-07 11:25:23 -04:00
075770070e Future-proofing query and data source model in Dashboard Schema v2 (#104194)
---------

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
Co-authored-by: alexandra vargas <alexa1866@gmail.com>
Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com>
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: Igor Suleymanov <igor.suleymanov@grafana.com>
Co-authored-by: spinillos <selenepinillos@gmail.com>
2025-07-07 15:31:25 +02:00
713f6d1551 IAM: Move resource definitions to apps/iam step 1 (#107389)
* wip

* Use serviceaccount model from /apps/iam

* revert version update

* Add tembinding, userteam, other improvements

* Change serviceaccounttoken spec

* Revert the change of ServiceAccountToken

* Revert the change of UserTeam

* Clean up

* Remove files that are not needed for now

* Lint

* Update sql query's integration tests

* Fix tests

* update openapi spec

* Move LastSeenAt to the annotations

* Updte openapi_snapshots

* Change lastSeenAt annotation name
2025-07-04 11:07:48 +02:00
93c14c52da Migrations: Compare backend and frontend outputs to ensure feature parity (#106851)
* wip: trying to understand how to get the ds info from migrator

* add datasource info provider

* Use DS service to fetch DS data

* add more tests cases to match with migrator cases

* Add snapshots

* Non-existing DS

* Add different DS for snapshots

* fix import

* Fix tests: guard against double initialization

* don't use full datasource package in test

* min version should be 35

* fix test

* fix conversion test

* Dashboards: Support schemaVersion v35 migration in backend

* Dashboards: Support schemaVersion v34 migration in backend

* Dashboards: Support schemaVersion v33 migration in backend

* Apply suggestions from code review

Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>

* Apply feedback

* Remove unused parameters

* Refactor to follow Go patterns

* Update logic

* Only write final migration result as output

* Compare backend and frontend results

* Improve snapshots to cover all possible use cases

* Linter

* wip make it consistent v33

* apply feedback

* Return default when the ref cannot be found

* Update apps/dashboard/pkg/migration/schemaversion/v33.go

Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>

* apply feedback

* Use same mocks backend/frontend

* restore migrations

* update snapshots

* Adapt migration tests to use min versions

* Ensure v40-v41 works

* Ensure v39-v40 works

* Simplify the naming of the files

* adjust jest to new input convention

* Ensure every migration v36-v41 works

* Improve v38 naming

* Ensure v36 migrates correctly

* Skip v36 refs migrations on rows

* Treat rows as frontend and ensure same results for v36

* Ensure v34 runs with the same logic than the frontend

* Leave empty stadistics as valid option

* ensure v33 is working as the frontend

* Update tests

* Undo frontend changes for legend handling

* Remove filtering by version in the frontend

* linter

* Clean up v33 input JSON

---------

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com>
Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
2025-07-03 12:23:51 +02:00
2294620b2e Advisor: Include optional more info in failures (#107244) 2025-07-01 10:49:16 +02:00
b1d3155b60 K8s: Library Panels: Add rerouting for get (#107362) 2025-06-30 13:26:24 -05:00
22fbcae11b Dependencies: Bump github.com/go-viper/mapstructure/v2 from 2.2.1 to 2.3.0 (#107379) 2025-06-30 11:56:31 +02:00
07f5a72842 Dashboard Migrations: V33 Replace string-based datasource by datasource ref (#106848)
---------
Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
2025-06-26 19:04:43 +02:00
3d543a336f IAM: Register CoreRole apis (#106924)
* IAM: Register CoreRole apis

* one line store instantiation

* Small refactor for readability

* Add authorizer for CoreRole

* Nit

* Error strings should not end with punctiation

* Account for error

* Switch to use the local resource client

* error should not start with upper casing

* noopStorageErr should have a name starting with err

* Update workspace

* I don't know why I don't have the same output as the CI 🤷

* Dependency xOwnership

* imports

* Import order

* Rename alias to make it clear this is legacy
2025-06-26 10:11:28 +02:00
0356e1302a Advisor: improve code readability (#107175) 2025-06-25 10:48:36 +00:00
c5a6bb5ab1 Advisor: Address error logs (#107125) 2025-06-25 12:08:30 +02:00
4e19bc515e Chore: bump grafana-plugin-sdk-go from v0.277.0 to v0.278.0 (#107165)
Chore: bump grafana-plugin-sdk-go
2025-06-25 10:16:14 +02:00
238cff5e8a Dashboard Migrations: V34 CloudWatch Multi-Statistics Migration (#106656)
* wip: trying to understand how to get the ds info from migrator

* add datasource info provider

* Use DS service to fetch DS data

* add more tests cases to match with migrator cases

* Add snapshots

* Non-existing DS

* Add different DS for snapshots

* fix import

* Fix tests: guard against double initialization

* don't use full datasource package in test

* min version should be 35

* fix test

* fix conversion test

* Dashboards: Support schemaVersion v35 migration in backend

* Dashboards: Support schemaVersion v34 migration in backend

* Apply suggestions from code review

Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>

* Apply feedback

* Remove unused parameters

---------

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com>
Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
2025-06-19 07:03:14 +00:00
a646043066 chore: update grafana/authlib (#106918) 2025-06-18 22:46:27 +02:00
689cafc1fa App Platform Provisioning: Add experimental nanogit mode for Git Sync (#106763)
* Add nanogit package
* Add nanoGit feature flag
* Put logger into nanogit context
* Commit go mod and go sum updates
* Add more stuff around logging
* Nanogit also in extra one
* Add owner to dependency
2025-06-17 19:07:30 +02:00
09bbdfe8ab Dashboard Migrations: V35 ensures X-axis visibility in timeseries (#106633)
* Add datasource info provider

* Dashboards: Support schemaVersion v35 migration in backend

* update go mods

---------

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com>
Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
2025-06-17 10:38:48 +02:00
d02b62e874 Chore: Update app-sdk to v39 (#106785) 2025-06-16 19:11:30 +02:00
59c2f15433 Dashboard V0->V1 Migration: Schema migration v36 (#100757)
---------

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com>
Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
2025-06-16 15:53:41 +02:00
ffc16ee072 Schema: Change how origin filters are added to AdHocVariable (#106086)
* refactor origin filters schema

* add canary version

* update schema

* fix failing tests

* refactor

* remove autogenerated import

* tests

* maintain only dashboard originated filters

* refactor

* refactor

* Schema: Persist defaultValue for groupBy in schema (#106542)

* persist defaultValue for groupBy in schema

* fix

* type

* refactor

* refactor

* bump scenes
2025-06-16 11:15:00 +03:00
a3e85d8319 Advisor: Fix issues (#106612) 2025-06-12 15:37:07 +00:00
e73530da09 Advisor: Add a check for pinned instances (#106059) 2025-06-12 10:15:40 +02:00
5c268c1734 Dependencies: Bump Go to v1.24.4 (#106533) 2025-06-11 14:25:48 +02:00
34ef571542 Advisor: Better handling of context cancel (#106470) 2025-06-10 16:53:51 +02:00
6fb0ed9886 Bump tempo to 20250529124718-87c2dc380cec (#106220)
* Bump tempo to 20250529124718-87c2dc380cec

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

* Add owners to pkg/build

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

* update workspace

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

* update pkg/build/go.sum

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

* update pkg/build/go.sum

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

---------

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
2025-05-29 23:43:13 -05:00
4ac248a512 Internationalisation: Mark up panel plugins for translations (#106068)
* config for panel plugin translations

* markup

* tweaks

* prettier

* use data-testid

* rename disable rule now it's been moved

* final markup
2025-05-29 18:13:25 +01:00
e2e8de29ba Advisor: Check plugin signature (#106044) 2025-05-29 11:33:19 +02:00
10f2b76156 Chore: Update apps codegen to v0.38.2 (#106111) 2025-05-28 12:35:44 +03:00
d4c446f42c Chore: Update k8s.io to v0.33.1 (#105307) 2025-05-28 00:13:18 +03:00
c4c4faff1e Dependencies: Bump github.com/openfga/openfga to v1.8.13 to address CVE-2025-48371 (#106064) 2025-05-27 16:30:23 +02:00
4f18ad30c9 SchemaV2: Remove legacy rows from schema v2. (#105238)
* save transparent setting

* make sure we test both transparent and non transparent

* no more legacy rows

* schema changes

* Add testing, fix first row offset

* Remove legacy row from transform test

* Remove panel that's not present in layout

* Remove expects after removing the row, fix lint issues

* Remove unused commit

* update codegen

* update openapi snapshot

* Fix snapshot

* add missing default prop

* Fix repeating, fix first row, fix not flushing last row

* Use correct repeater

* fix lint, remove unused empty check

* update codegen

* update openapi test snapshot
2025-05-26 14:33:30 +02:00
701297aa3f Advisor: Documentation and config check (#105929) 2025-05-26 11:11:29 +02:00
109dc4dc56 Advisor: Update some wording (#105935) 2025-05-23 16:38:50 +02:00
5cee301e75 GroupByVariable: Add support for default values in schema (#105518)
* update schema

* update schema

* refactor property to singular naming

* bump scenes

* leave scenes to caret version

* add defaultValue to groupBy model

* typo
2025-05-23 01:13:52 +03:00
269226cb50 Advisor: Add human readable name to check types (#105717) 2025-05-21 15:23:08 +02:00
c012480fd6 Authz: Define app resources (#105050)
* Authz: Define app resources

* Add coreroles and cluster roles

* Restore CODEOWNERS from main

* ManagedPermissions -> ResourcePermissions

* Rework changes

* Update apps/authz/kinds/v0alpha1/rolebindingspec.cue

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>

* Update apps/authz/kinds/v0alpha1/rolespec.cue

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>

* Make

* WIP first set of comments

* typox

* Copy folder Makefile

* Remove uid

* Rename authz -> iam

* Rename to iam

* Dockerfile

* Remove name

* Mv up

* Try with postprocess

* linting

* Use same version

* apimachinery v0.32.3

* update-workspace

---------

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
2025-05-21 14:47:44 +02:00
b1a6860f52 Dashboards: Schema V2 - Rename Annotations 'options' to 'legacyOptions' and Fix stale props (#105266)
* Rename Annotations 'Options' to 'legacyOptions'

* use new legacyOptions in StandardAnnotationQueryEditor

* use new legacyOptions in transformSaveModelSchemaToScene

* use legacyOptions in transformSceneToSaveModelSchemaV2

* Fix bug with ds query editors not taking the latest state

* update snapshot
2025-05-20 17:55:30 +02:00
13f4cf162e CI: move grafana-build into pkg/build (#105640)
* move grafana-build into pkg/build
2025-05-20 10:48:00 -05:00
03f1bb950b DashboardSchemaV2: add missing allowCustomValue property in variables (#105416)
* add missing allowCustomValue property to variables in schema V2

* fix K8s Codegen Check

* updade snapshots for backend tests
2025-05-20 11:50:46 +01:00
4d0124af7a Advisor: Fix retry behavior for missing item (#105608) 2025-05-19 15:15:20 +02:00
8dda9da035 Dependencies: Bump authlib to support service identity in claims (#105513) 2025-05-16 10:52:30 +03:00
002f46736a refactor(unified-storage): move generated protos to own pkg (#105356) 2025-05-15 21:36:52 +02:00
b2387c1a31 Advisor: Allow to skip a step (#104454) 2025-05-15 16:58:45 +02:00
d7715c4220 Dependencies: Bump packages in modules with incorrect dependencies or outside of workspace (#105455)
* Dependencies: Bump github.com/getkin/kin-openapi from v0.131.0 to v0.132.0

* Dependencies: Bump github.com/openfga/openfga from v1.8.6 to v1.8.12

* Dependencies: Bump golang.org/x to latest
2025-05-15 13:09:49 +00:00
76d4953879 Advisor: Include deprecated and filter by plugin slug (#105383) 2025-05-15 14:53:49 +02:00
441fa18590 Chore: Update golang.org/x/ and do not omitempty Items (#105371)
* deps and omitempty Items

* update apis
2025-05-14 14:31:45 +03:00
4b426238bd Dependencies: Bump github.com/openfga/openfga from v1.8.6 to v1.8.12 (#105193)
* Dependencies: Bump github.com/openfga/openfga from v1.8.6 to v1.8.12

* Linter: Replace x/exp/rand with math/rand/v2

* NGAlert: Fix test after linter fixes
2025-05-14 11:09:00 +03:00
8738bab8b2 Chore: Update grpc to v1.72.0 (#105311) 2025-05-13 12:49:42 +03:00
afc0fd39ac Dependencies: Unpin and bump github.com/getkin/kin-openapi from v0.126.0 to v0.132.0 (#105185) 2025-05-12 14:59:51 +02:00