Commit Graph

33 Commits

Author SHA1 Message Date
Dan Cech
790e1feb93
Chore: Update test database initialization (#81673)
* streamline initialization of test databases, support on-disk sqlite test db

* clean up test databases

* introduce testsuite helper

* use testsuite everywhere we use a test db

* update documentation

* improve error handling

* disable entity integration test until we can figure out locking error
2024-02-09 09:35:39 -05:00
Ryan McKinley
539bc6d31b
Playlist: Implement a more efficient List command to support k8s list (#79820) 2023-12-21 15:03:12 -08:00
Ryan McKinley
dd773e74f1
K8s: Implement playlist api with k8s client (#77405) 2023-10-31 10:26:39 -07:00
Kristin Laemmert
15c1d5f636
chore: add basic tracing to playlist service (#77165) 2023-10-26 09:25:31 -04:00
Ryan McKinley
29cf60988b
Playlist: Use a different go struct for sql service vs k8s (#76393) 2023-10-12 08:29:06 -07:00
Ryan McKinley
c26e3d80e3
Playlist: Add create+update timestamps to the database (#76295) 2023-10-10 12:46:12 -07:00
Ryan McKinley
bbdd1fc3b1
Playlist: Remove unused/deprecated api and unused wrapper (#75503) 2023-09-27 15:28:16 +00:00
Dan Cech
85a207fceb
Chore: Replace entity GRN with infra/grn GRN (#74198)
replace entity GRN with infra/grn GRN
2023-08-31 15:43:35 -04:00
Ryan McKinley
10ea92fa09
Schemas: minor updates from the k8s branch (#71688)
Co-authored-by: sam boyer <sdboyer@grafana.com>
2023-07-21 19:17:11 +03:00
Ryan McKinley
c66d5721f7
Kinds: Use apimachinery ObjectMeta for metadata (#68668) 2023-05-24 09:13:44 -07:00
Ryan McKinley
ca1f79b9ba
Kindsys: Target k8s style resource definitions (#67008)
Co-authored-by: sam boyer <sdboyer@grafana.com>
2023-04-27 23:32:38 +03:00
Selene
7ace44c8b5
Chore: Update oapi-codegen library (#62962)
* Update oapi library and thema

* Use fork commit to fix elasticsearch and cloudwatch generators

* Update thema

* Fixes

* Update thema with last fixes

* Sync

* Fix test

* Update thema and schemas

* Update thema
2023-02-21 12:34:24 +01:00
Kristin Laemmert
dd147a3c31
chore: move entity models into entity store service (#62145) 2023-01-25 12:43:22 -05:00
Kat Yang
9a14a7db03
Chore: Remove star model duplicates (#61191) 2023-01-10 09:56:33 -05:00
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
d036225f7b
Chore: get user from appcontext rather than store utility (#59926)
user from appcontext
2022-12-07 07:38:23 -08: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
b4b843be66
ObjectStore: Replace path model with folder, uid, and slug model (#59452) 2022-11-30 12:10:35 -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
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
Ryan McKinley
3527cad9dc
Store: protobuf based GRN/identifier (#57714) 2022-10-31 07:26:16 -07:00
Ryan McKinley
a3acfb1a48
Chore: Register a feature flag for "newDBLibrary" (#57468) 2022-10-25 18:20:41 -07:00
Ryan McKinley
e6575bab76
Playlist: allow using object store as the backend (#57467) 2022-10-25 16:51:01 -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
sam boyer
ba97b268d0
Playlist: Split PlaylistItem into standalone TS type (#56343)
* playlist: Split PlaylistItem into standalone TS type

* update playlist model

* actually set the title

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-10-04 16:08:26 -04:00
Ryan McKinley
3b1a8d45ed
Playlist: update service so it supports both read+write (#55959) 2022-10-04 11:11:18 -04:00
sam boyer
9ec7b202b6
playlist: introduce coremodel schema, swap in for backend DTO types (#56048)
* Add simplest possible playlist schema

* Add @grafana(decisionNeeded) attributes

* playlistid, not playlist_id
2022-09-30 06:33:11 -04:00
ying-jeanne
25de383540
Chore: Replace xorm with sqlx (#52575)
* Change of sqlstore to use sqlx

* Use sqlx in the playlist store

* Refectory of the interface

* update playlist service

* go mod tidy

* some refectory on interface

* fix kyle
2022-08-16 13:17:14 -05:00
ying-jeanne
af09638a0d
remove the sqlstore playlist methods (#53415) 2022-08-08 11:06:06 -05:00
Sofia Papagiannaki
fb379ae436
Chore: Introduce playlist service (#52252)
* Store: Introduce playlist service

* Integrate playlist service

* Update swagger
2022-07-18 05:26:35 -04:00