451 Commits

Author SHA1 Message Date
b09d79b21c K8s/Dashboard: Promote from alpha1 to beta1 (#104009) 2025-04-23 20:54:35 +03:00
9b325438f7 Chore: Upgrade authlib (use UIDs for authz checks) (#104307) 2025-04-23 12:51:37 +01:00
3310149964 Chore: Update internal go.mod references (#104262) 2025-04-22 10:42:39 +01:00
fc9f32a9f6 SQLTemplates: Add helper to ensure all templates have a test-case (#103964)
* SQLTemplates: Add helper to ensure all templates have a test-case associated

* UnifiedStorage: Add missing sql template test case

* LegacyDashboards: Add sql templates fs to test cases for exhaustiveness check

* RBACStore: Add sql templates fs to test cases for exhaustiveness check

* LegacyIAM: Add missing sql template test cases
2025-04-22 11:21:51 +02:00
7c8433fbb2 Unified: Replace user.SignedInUser with StaticRequester in apistore perm tests (#104257) 2025-04-22 10:47:09 +03:00
ca36d77f5b Dependencies: Bump golang.org/x/net to v0.39.0 in apps/advisor (#104228) 2025-04-22 09:06:59 +02:00
c09ef1189e K8s/Storage: remove github.com/grafana/grafana from go.mod (#104212) 2025-04-21 10:48:44 +03:00
efd9334295 Provisioning: route provisioning storage to the provisioning client (#104082) 2025-04-18 21:47:37 +03:00
3380ea441a feat(unified-storage): return guid, group and resource on read/list (#104121) 2025-04-17 12:58:58 +02:00
af59c4eb3e Chore: bump grafana-plugin-sdk-go from v0.275.0 to v0.277.0 (#103971)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2025-04-17 00:32:25 +03:00
3bbc4c0024 Cloudwatch: Update grafana-aws-sdk (#104119)
Cloudwatch: update grafana-aws-sdk
2025-04-16 15:39:04 -04:00
a3c71accf5 Chore: go mod tidy... with current imports (#104127) 2025-04-16 19:35:10 +01:00
b3b92e2471 Storage: Change timeout for flaky test (#104065)
Change timeout for flaky test

Co-authored-by: Marco de Abreu <18629099+marcoabreu@users.noreply.github.com>
2025-04-15 19:28:27 +01:00
66a04babe1 datasources: querier: handle the grafana-ds (#103980)
* datasources: querier: handle the grafana-ds

* updated dependencies
2025-04-15 14:55:39 +02:00
5c418196f9 SQL Expressions: Add STDDEV(), VARIANCE() and aliases (#103851)
* SQL Expressions: Bump GMS for STDDEV(), VARIANCE()

Bump Go MySQL Server to the latest version, to get support for STDDEV()
and VARIANCE() functions, and their aliases.

See https://github.com/dolthub/go-mysql-server/pull/2928

* Update app-code to comply with latest GMS version

* Run `go mod tidy`

* Update test which had depended on STDDEV being missing

* Run `make update-workspace`
2025-04-15 10:48:19 +01:00
0283c98e30 K8s/Folders: Use v1beta1 and app-sdk based spec (#103975) 2025-04-14 23:20:10 +03:00
e69052a417 unistore: add check when update the folder of a resource (#102699)
* Add check for move folder

* make the server test generic

* address comment
2025-04-14 16:57:40 +02:00
f4dbbbac0c Chore: update golang.org/x/sys+net+text+tools+crypto (#103963) 2025-04-14 10:01:19 +01:00
1125f36f4f fix(test): Attempt to make TestPollingNotifier/notify_returns_channel_and_starts_polling less flaky (#103947)
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
2025-04-14 09:41:09 +02:00
9aca2606c7 upgrade plugin-sdk-go from v0.274.0 to v0.275.0 (#103863)
* upgrade plugin-sdk-go from v0.274.0 to v0.275.0

* ignore deprecated warning
2025-04-14 08:29:58 +02:00
9e933882ed Alerting: Webhook Improvements - Templateable Payloads (#103818)
* Template editor syntax highlighting when preview is json-like

* Add new template editor language examples, snippets, and functions

* Use updated NewTemplate function

* Add new fields to webhook notifier

- CustomPayload
- ExtraHeaders

* Documentation

* Update grafana/alerting to in-progress PR (needs updating after merge)

* Fix integration test

* Remove docs reference to .Extra template context

No longer exists, was part of a previous iteration

* make update-workspace

* Update grafana/alerting to actual merged commit
2025-04-11 12:22:51 -04:00
be696dd70c unified storage: check for iterator errors after each call to iter.Next. (#102804)
* unified storage: check for iterator errors after each call to iter.Next.
* Extracted test to separate method, add 500 events before listing.
2025-04-11 16:25:40 +02:00
babea87ebd Chore: make update-workspace (#103888) 2025-04-11 16:06:54 +02:00
f5ad1ef69b K8s: Folders: Add v1 api (#103842) 2025-04-11 13:09:52 +01:00
50fcc053c2 feat(unified-storage): provide delete function for bucket (#103825) 2025-04-11 10:10:13 +02:00
02b090574d Unified: use server access client for bulk operations (#103828) 2025-04-10 20:29:59 +01:00
47664a7d51 Provisioning: unit test sync job (#103636)
* Split in multiple files

* Refactor sync even further

* Move more things between RepositoryResources

* Add status patcher

* Interface for sync functions

* Interface for compare function

* Add syncer back

* Move interfaces

* Move execute complete

* Return currentRef in syncer

* Add repository status test

* Add initial sync tests

* Fix a couple of spots

* Make initial sync tests work

* Fix register.go

* Add initial tests for sync worker

* Finish tests for sync

* Add incremental tests

* Add TODO

* Finish incremental tests

* Move folder creation to full sync

* Move interfaces

* Add initial full sync tests

* Update tests

* Reshape things

* Add changes test

* Fix register

* Add some tests

* Add more tests

* Add test

* WIP

* WIP: delete test

* Add more full test

* More tests

* Add tests for folder creation

* Add folder tests full sync

* Full coverage full sync

* Clean up tests

* Add more tests for changes function

* Enhance tests for Changes function to cover error scenarios and empty paths

- Added test cases for handling empty file paths and folder resources.
- Updated error message formatting in the Compare function for clarity.

* Add unit tests

* Failed initial patch

* Add tests failed repository resources

* Add test failed getting client

* Test for successful and unsuccessful syncs

* Add final tests for worker

* Fix existing tests

* Add missing test

* Fix spelling mistake

* Fix flake in changes test
2025-04-10 13:55:49 +01:00
757be6365a CI: Bump golangci-lint to 2.0.2 (#103572) 2025-04-10 14:42:23 +02:00
68ed0feeff Unistore: Change to 404 rather than 403 if not found (#103743) 2025-04-09 19:14:39 -05:00
870d401f75 Alerting: Update grafana/alerting (#103607)
* Alerting: Update grafana/alerting

* Run make update-workspace
2025-04-10 00:12:02 +02:00
af8a70bbab K8s/Permissions: Enable a grant-permissions annotation action to set default permissions (#102527)
* create permissions

* add key

* lint

* structure as a delayed callback

* legacy API hook

* merge main

* wired up

* and folders

* watch repos

* missing return statement

* Set the correct permissions

* add TestAfterCreatePermissionCreator

* do not add perms on folder create

* fix tests

* add annotation on create

* lint

* lint

* ensure we set permissions when the FT is disabled

* remove custom folder_storage

* fix lint

* change default

* lint

* lint

* fix: annotation

* ensure permissions are added on folder legacy

* remove folderstorage again

* fix tests

* add FT

* undo change to folder

* dashboard on create

* remove annotation for folder

* fix tests

* fix prepare after rebase

* fix tests

* fix tests

* fix tests

* lint

* address comments

* add test for prepareObjectForStorage

* add again skipIfMode as per comment

---------

Co-authored-by: Georges Chaudy <chaudyg@gmail.com>
2025-04-09 13:05:37 +02:00
13534a7d98 Cloudwatch: Revert aws sdk go v2 (#103644)
* Revert "CloudWatch: Import new grafana-aws-sdk with PDC fix (#103249)"

This reverts commit f2b5b4e0c0230b9cc8553b0c768582698610da00.

* Revert "CloudWatch: Migrate to aws-sdk-go-v2 (#103106)"

This reverts commit a65cc0df93c5568d0ba32f0171a3c2cd04997cf7.

* make update-workspace
2025-04-08 15:40:15 -04:00
9df94718ab [main] Go: Bump to 1.24.2 (#103521)
Go: Bump to 1.24.2

It is not likely we are actually affected by the CVEs, but updating proactively is not a bad idea nonetheless.

Fixes: CVE-2025-22871
Fixes: https://github.com/grafana/grafana-operator-experience-squad/issues/1311
2025-04-08 17:12:30 +02:00
a9ef8bcced Use logging from app sdk in the resource mod (#103281)
* Use logging from app sdk in the resource mod

* make update-workspace

* Use app-sdk logging in SQL backend

* Use grafana-app logging in tests

* make update-workspace

* make update-workspace

* make update-workspace

* Use default logging

* Remove dependency on grafana/grafana

* Fix imports
2025-04-08 15:35:11 +02:00
d3e6e308a0 K8s/ManagedBy: Enforce who can CRUD provisioning resources (#103322) 2025-04-08 14:17:33 +03:00
56b4e5670d fix(unified-storage): fix graceful termination for grafana target servers (#103520) 2025-04-08 11:45:10 +02:00
df537d6f0f UniStore/Large Objects: Make threshold configurable (#101774)
* Make blob threshold configurable
* Test condition for deconstructing large objects
* Refactor blob threshold naming
2025-04-08 10:50:35 +02:00
e9ed7223a6 Use authlib repo. Use otel (#103178)
* Use authlib repo. Use otel

* Use interceptors on the provider level

* Create a new wire set with otel

* Lint

* Fix test

* make update-workflow

* make update-workspace

* make update-workspace. Try to add authlib as enterprise imports

* make update-workspace
2025-04-07 15:47:40 +02:00
c63cfc11e2 [Chore] Mark CodeQL warning as safe (#101365)
* Mark CodeQL warning as safe

* Temporarily ignore file
2025-04-07 11:52:09 +02:00
505c0cbbaf Alerting: upgrade alerting (#103333) 2025-04-07 11:39:38 +02:00
38db7fad22 Build: Unpin bleve/v2 (#103506)
The commit we wanted[1] is now in v2.5.0 of bleve/v2. This means we no longer need a pin here and can update the library
instead.

[1]: af9e3111da
2025-04-07 10:21:33 +02:00
364247e26b Provisioning: add most mocks to unit test provisioning jobs (#103446)
* Use interface for factories

* Add most mocks to unit test jobs

* Generate more mocks for main jobs package

* Interface for parser

* Use clients directly without parser

* Regenerate mock

* Eliminate resource clients from Parser

* Interface for folder tree
2025-04-04 15:42:20 +03:00
db1f1c5df9 search: add manager kind to bleve (#103305) 2025-04-03 10:02:02 +03:00
88d54892bd CI: Move e2e test pipeline from Drone to GitHub Actions (#103134)
* Add e2e dagger pipeline

* various-suite not various suite

* upload videos dir

* produce e2e videos even on failure

* nil ref

* sync doesn't return container

* fix quotes

* try without flags first?

* try without quoting?

* use two dashes in flags

* update CODEOWNERS

* make update-workspace

* go work sync

* make update-workspace

* add newline
2025-04-02 13:31:47 -05:00
c54496a3f9 Search: Avoid panic with missing title (#103257) 2025-04-02 15:43:08 +03:00
08042ae827 search: add legacy id for all resources in bleve (#103206)
* add legacy id for all resources in bleve
2025-04-02 08:20:23 -04:00
d5addcc822 Chore: Fix Go Workspace Check workflow and run make update-workspace (#103261)
* Chore: Fix Go Workspace Check workflow

* Chore: Run make update-workspace
2025-04-02 12:26:38 +02:00
93009a4f5b Dependencies: Fix invalid version for pkg/apis/folder (#103256)
* Chore: Use correct version of pkg/apis/folder

* Chore: Clarify pinning for google/cel-go

* Remove replace directives

---------

Co-authored-by: leonorfmartins <leonorfmartins@gmail.com>
2025-04-02 11:23:59 +02:00
6781612335 Provisioning: Enable search when provisioning is enabled (#103208) 2025-04-02 11:20:28 +03:00
f21362ad48 Convert pkg/apis/folder to a module (#102975)
* Convert pkg/apis to a module

* Update apistore module to use apis go module

* Add module to dependabot

* Group go dependencies

* Add guidelines for adding a new gomod

* Prettier

* Only convert apis/folder to a module for now

* Add replace directive

* Add missing go mod
2025-04-02 10:10:04 +02:00