Commit Graph

94 Commits

Author SHA1 Message Date
sam boyer
b8253ac3b9
deps: Update thema, use CUE fork (#60496)
* deps: Update thema, use CUE fork

* Remove superfluous openapi-codegen output

* Update thema again to catch cuetsy changes

* Rerun codegen with latest

* Latest thema, removes cuetsy update

* Latest of cuetsy

* Update type usage

* One last cuetsy rollback

* Update playlist summary tests

* More lint fixes

* Remove TS veneer changes for VariableHide

Co-authored-by: Clarity-89 <homes89@ukr.net>
2022-12-22 07:20:02 -05:00
Ryan McKinley
cf055ab4ec
k8s: Add a dev only feature flag and simple service to get a client (#60204) 2022-12-13 07:41:16 -08:00
Artur Wierzbicki
4893acaeb4
EntityAPI: disable integration tests (#60073)
disable entity api int tests
2022-12-09 02:50:13 -05:00
Ryan McKinley
b2c4af16d7
Git: Update experimental workflow POC (#60049) 2022-12-08 13:57:33 -05:00
Ryan McKinley
d036225f7b
Chore: get user from appcontext rather than store utility (#59926)
user from appcontext
2022-12-07 07:38:23 -08:00
Artur Wierzbicki
9e349bf9b0
EntityStore: support filtering by labels (#59905)
* label filtering

* filtering in sql

* filtering in sql group by

* label is unique - no need for distinct

* capitalize

* fix capitalization
2022-12-06 23:21:12 +04:00
Ryan McKinley
fb98a97efa
EntityStore: Move slug+folder to summary metadata (#59620) 2022-12-01 14:45:08 -05:00
Ryan McKinley
14a080ec12
EntityStore: Rename ObjectStore to EntityStore (part 2) (#59616) 2022-11-30 17:52:15 -05:00
Ryan McKinley
5dc7b01f9d
EntityStore: Rename ObjectStore to EntityStore (part 1) (#59613) 2022-11-30 13:42:42 -08:00
Ryan McKinley
b0b74337f1
Chore: fix go.mod and slugify after merge (#59611) 2022-11-30 16:16:57 -05:00
Ryan McKinley
b4b843be66
ObjectStore: Replace path model with folder, uid, and slug model (#59452) 2022-11-30 12:10:35 -08:00
Ryan McKinley
5b71a16acf
Slugify: Replace gosimple/slug with a simple function (#59517) 2022-11-30 11:12:56 -05:00
Kevin Minehart
a77d95807c
Store: skip flaky test in the store service (#59443)
skip flaky test
2022-11-29 17:54:20 +00:00
Tania
76372a240c
Storage: Add system users service (#57767)
* Storage: Add access for reporting

* reporting upload user per org

* add some basic comments

* Move reporting storage to enterprise

* add comments

Co-authored-by: Artur Wierzbicki <artur.wierzbicki@grafana.com>
2022-11-24 15:15:32 +01:00
Sofia Papagiannaki
9855e74b92
Chore: Refactor quota service (#58643)
Chore: Refactor quota service (#57586)

* Chore: refactore quota service

* Apply suggestions from code review
2022-11-14 21:08:10 +02:00
Ryan McKinley
5934407443
Storage: add an admin write flavor that can explicitly set the user/time (#58618) 2022-11-12 11:36:18 -08:00
sam boyer
07e5f8117f
Reconcile coremodels, entities, objects under new kind framework (#56492)
* Update thema to latest

* Deal with s/Library/*Runtime/

* Commit new, working results of codegen

* We like pointers now

* Always take runtime arg for NewBase()

* Sketchy handwavy pass at entity meta framework

* Little nibbles

* Update pkg/framework/coremodel/entityframework.cue

Co-authored-by: Artur Wierzbicki <wierzbicki.artur.94@gmail.com>

* Move file into new framework location

* Introduce loaders, Go code

* Complete rename to kind

* Flesh out framework, add svg/dashboard examples

* Cruft removal

* Remove generated kind go files from gitignore

* Refine maturity concept, add SlotKind

* Update embed and go deps

* Export PrefixWithGrafanaCUE

* Make the loader actually work, holy crap

* Many small tweaks to type.cue

* Add Apache 2 licensing exceptions for kinds

* Add new kinds dir, start of generator

* Roll back to earlier oapi-codegen

* Introduce new grafana-specific CUE loaders

* Introduce new tidy code generators framework

* Catch up kind framework with tinkering

* Add slices for the generators

* Add write/verify step to main generator

* Many renames

* Split up kind framework cue files

* Use kind.Decl within generated kinds

* Create kind.SomeDecl wrapper type to cache lineages

* Better names again

* Get one generated implemented, hopefully

* Copy dashboard schema into new kind.cue

* Small fixes to make the initial gen work

* Put svg kind in its new home

* Add generated Go dashboard type

* More renames and cleanups

* Add base kind registry and generator

* Stop blacklisting *_gen.go files

This is not the Go best practice, anyway. All we actually want to ignore
for enterprise is generated wire files.

* Change codegen output directories

pkg/kind -> pkg/kinds
pkg/registry/kindreg -> pkg/registry/corekind

* Rename pkg/framework/kind to pkg/kindsys

* Add core structured kind generator

* Add plural and machine names to kind spec

* Copy playlist over to kind system

* Consolidate kindsys files

* Add raw kind generator

* Update CODEOWNERS for kind framework

* Touch up comments a bit

* More docs tweaks

* Remove generated types to reduce noise for review

* Split each generator into its own file

* Rename Slot kind to Composable kind

* Add handwavy types for customkind loading

* Guard against init calls to framework loader

* First pass at doc on extending the kind system

* Improve attribute example in docs

* Fix wire imports

* Add basic TS types generator

* Fix composable kind category def

* No need for a separate file with generate directive

* Catch dashboard schema up

* Rename generator types to something saner and generic

* Make version configurable in ts/go generators

* Add CommonMeta to ease property access

* Add kindsys prop indicating whether lineage is group

* Put all kind categories back in a single file

* Finish with kindsys group props

* Refactor maturity progression per discussion

- Replace "committed" with "merged"
- All kindcats can use all maturity levels, at least for now

* Convert ts veneer index generator to modular system

* Move over to new jennywrites framework

* Strip down old coremodel generator

* Use public version of jennywrites

* Pull latest thema

* Commit generated Go types

* Add header injection postprocessor

* Move sdboyer/jennywrites to grafana/codejen

* Tweak header output

* Remove dashboard and playlist coremodels

* Fix up backend dashboards devenv test

* Fix TS import patterns to new gen filename

* Update internal imports, remove coremodel registry

* Fix compilation errors, wire generation

* Export and replace the prefix dropper

* More Go struct and field name changes

* Last name fixes, hopefully

* Fix lint errors

* Last lint error

Co-authored-by: Artur Wierzbicki <wierzbicki.artur.94@gmail.com>
2022-11-10 12:36:40 -08:00
Ryan McKinley
f92d978386
Export: support export in postgresql (#58553) 2022-11-10 14:16:31 -05:00
Ryan McKinley
238a3f820c
Store: use "at" suffix for time base fields more consistently (#58486) 2022-11-08 17:42:32 -05:00
Sofia Papagiannaki
96cdf77995
Revert "Chore: Refactor quota service (#57586)" (#58394)
This reverts commit 326ea86a57.
2022-11-08 11:52:07 +02:00
Sofia Papagiannaki
326ea86a57
Chore: Refactor quota service (#57586)
* Chore: refactore quota service

* Apply suggestions from code review
2022-11-08 10:25:34 +02:00
Ryan McKinley
eb1cc80941
Storage: include SQL implementation (#58018) 2022-11-04 17:30:22 -04:00
Ryan McKinley
22628d1f7e
Storage: fix failing test (set IsServiceAccount=true) (#58257) 2022-11-04 12:37:25 -04:00
Dan Cech
9ea6a43089
Build: clean up and document integration test convention (#58170)
* clean up and document integration test convention

* clarify integration test conventions

* clean up integration tests that don't follow convention

* mark testIntegration* functions as helpers to avoid confusion
2022-11-04 10:14:21 -04:00
Ryan McKinley
3dfa49b376
Playlist: cleanup object store implementation (#58201) 2022-11-03 16:35:20 -07:00
Giuseppe Guerra
7996a1c8ad
Chore: Update grafana-plugin-sdk-go to v0.142.0 (#58115)
* Chore: Update grafana-plugin-sdk-go to v0.142.0

* Update tests and golden files for 207 status code

* Chore: Move update flag definition at the top in response_parser_test.go

* retrigger

Co-authored-by: Will Browne <will.browne@grafana.com>
2022-11-03 18:34:27 +01:00
Ryan McKinley
0c3ed0219e
Storage: fix dummy implementation and tests (#58019) 2022-11-01 20:33:36 -04:00
Ryan McKinley
5736b46962
Storage: add support for snapshots, dataframes, and raw json objects (#57934) 2022-11-01 08:28:13 -07:00
Ryan McKinley
6e3a6cce61
Storage: move http wrapper into its own subpackage (#57929) 2022-10-31 13:37:05 -07:00
Ryan McKinley
3527cad9dc
Store: protobuf based GRN/identifier (#57714) 2022-10-31 07:26:16 -07:00
Will Browne
9f77bd4728
Plugins: Use public store instead of internal registry (#57631)
* Plugins: Use public store instead of internal registry

* update comments

* fix import

* fix test
2022-10-27 18:44:28 +02:00
Ryan McKinley
e6575bab76
Playlist: allow using object store as the backend (#57467) 2022-10-25 16:51:01 -07:00
Artur Wierzbicki
6abd4cd8e8
Chore: pointerify dummy server (#57640) 2022-10-25 19:27:31 -04:00
Artur Wierzbicki
e485ddd13d
Store: don't marshall/unmarshall the dashboard when building a summary (#57520)
* dont pretty print the dashboard

* stop marshalling the dashboard

* do not sanitize for searchV2

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-10-25 09:39:17 +08:00
Artur Wierzbicki
749b3b6263
Storage: Fix initialization on windows (#57504) 2022-10-25 09:27:22 +08:00
Ryan McKinley
910154c102
ObjectStore: Add folder to kind registry (#57461) 2022-10-21 16:48:32 -04:00
Ryan McKinley
ed1176adc8
Storage: export dashboards + playlists to object store (#57313) 2022-10-19 17:05:51 -07:00
Ryan McKinley
de3737b5de
Store: Add resolver service (#57112) 2022-10-19 07:33:26 -07:00
Kristin Laemmert
05709ce411
chore: remove sqlstore & mockstore dependencies from (most) packages (#57087)
* chore: add alias for InitTestDB and Session

Adds an alias for the sqlstore InitTestDB and Session, and updates tests using these to reduce dependencies on the sqlstore.Store.

* next pass of removing sqlstore imports
* last little bit
* remove mockstore where possible
2022-10-19 09:02:15 -04:00
Ryan McKinley
3b4b528993
Storage: Dashboard summary builder cleanup (#56665) 2022-10-13 09:29:19 -04:00
Ryan McKinley
b24be6c0fc
ObjectStore: add a kind registry (#56507) 2022-10-08 12:05:46 -04:00
Artur Wierzbicki
bf264d2f76
Query library: requiresDevMode dummy backend (#56466)
* query library - dummy backend

* fix tests

* dont explicitly marshall backend dataresponse

* skip integration tests

* null check for tests

* added query library to codeowners

* null check for tests

* lint
2022-10-07 11:31:45 -07:00
Ryan McKinley
609abf00d1
ObjectStore: Write json as json when possible (#56433) 2022-10-06 15:48:53 -04:00
Ryan McKinley
b4e23e5d32
ObjectStore: update dev protobuf definitions (#56428) 2022-10-05 18:46:17 -07:00
Ryan McKinley
97d19830cf
ObjectStore: rename modified to updated (#56420) 2022-10-05 14:58:46 -04:00
Artur Wierzbicki
a94acb7f61
Object store: get user from context (#56346)
* GRPC Server: Add signedInUser to context after auth

* add permissions to signedInUser

* add access control permissions test

* add additional signedInUser checks

* get user from context

* move `UserFromContext` to object/auth.go

Co-authored-by: Todd Treece <todd.treece@grafana.com>
2022-10-05 17:00:34 +00:00
Ryan McKinley
4fc9b9aa35
Storage: Cleanup object history API (#56215) 2022-10-04 14:57:26 -04:00
Ryan McKinley
d5e2713168
Storage: Add HTTP endpoint for object store service (#56214) 2022-10-04 09:40:15 -07:00
Artur Wierzbicki
85b965cbec
Storage: Dummy object server and basic integration tests (#56014)
* object extractors

* update bluge to use summary values

* gosec

* move to store/object package

* references

* references

* references

* same thign but with protobuf

* now the service

* now with summary

* now with summary

* from protobuf

* from protobuf

* cleanup

* remove hand crafted file

* update proto definitions

* update comments

* remove properties

* remove properties

* re-generate

* add batch

* move ref to raw struct

* GRPC test infra

* fix merge

* add delete

* lint

* rename to dummyobjectserver

* update comment

* refactor collection, simplify dummy server

* update

* refactor test structure

* more tests

* more tests

* replace collection with infra/persistentcollection

* skip if not integration test suite

* very important lint fix

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-09-30 15:56:07 -04:00
Ryan McKinley
213cfe5117
Object: use protobuf to declare the raw/summary types (#55646) 2022-09-29 22:18:15 -07:00