schema: Migrate from scuemata to thema (#49805)

* Remove crufty scuemata bits

Buhbye to: cue/ dir with old definitions, CI steps for checking unnecessary
things, and the original dashboard scuemata file.

* Remove grafana-cli cue subcommand

* Remove old testdata

* Don't swallow errors from codegen

* Small nits and tweaks to cuectx package

* WIP - refactor pluggen to use Thema

Also consolidate the embed.FS in the repo root.

* Finish halfway rename

* Convert all panel models.cue to thema

* Rewrite pluggen to use Thema

* Remove pkg/schema, and trim command

* Remove schemaloader service and usages

Will be replaced by coremodel-centric hydrate/dehydrate system Soon™.

* Remove schemaloader from wire

* Remove hangover field on histogram models.cue

* Fix lint errors, some vestiges of trim service

* Remove unused cuetsify cli command
This commit is contained in:
sam boyer
2022-06-06 17:52:44 -07:00
committed by GitHub
parent e7d6a58037
commit 8876d56495
81 changed files with 538 additions and 32087 deletions
-4
View File
@@ -39,8 +39,6 @@ load(
'upload_packages_step',
'store_packages_step',
'upload_cdn_step',
'validate_scuemata_step',
'ensure_cuetsified_step',
'verify_gen_cue_step',
'test_a11y_frontend_step',
'trigger_oss'
@@ -135,8 +133,6 @@ def get_steps(edition):
build_frontend_step(edition=edition, ver_mode=ver_mode),
build_frontend_package_step(edition=edition, ver_mode=ver_mode),
build_plugins_step(edition=edition, sign=True),
validate_scuemata_step(),
ensure_cuetsified_step(),
verify_gen_cue_step(),
]
integration_test_steps = [
-4
View File
@@ -29,8 +29,6 @@ load(
'redis_integration_tests_step',
'memcached_integration_tests_step',
'benchmark_ldap_step',
'validate_scuemata_step',
'ensure_cuetsified_step',
'verify_gen_cue_step',
'test_a11y_frontend_step',
'enterprise_downstream_step',
@@ -125,8 +123,6 @@ def pr_pipelines(edition):
build_frontend_step(edition=edition, ver_mode=ver_mode),
build_frontend_package_step(edition=edition, ver_mode=ver_mode),
build_plugins_step(edition=edition),
validate_scuemata_step(),
ensure_cuetsified_step(),
verify_gen_cue_step(),
]
integration_test_steps = [
-5
View File
@@ -39,8 +39,6 @@ load(
'upload_packages_step',
'store_packages_step',
'upload_cdn_step',
'validate_scuemata_step',
'ensure_cuetsified_step',
'verify_gen_cue_step',
'publish_images_step',
'trigger_oss'
@@ -182,8 +180,6 @@ def get_steps(edition, ver_mode):
build_frontend_step(edition=edition, ver_mode=ver_mode),
build_frontend_package_step(edition=edition, ver_mode=ver_mode),
build_plugins_step(edition=edition, sign=True),
validate_scuemata_step(),
ensure_cuetsified_step(),
verify_gen_cue_step(),
]
@@ -192,7 +188,6 @@ def get_steps(edition, ver_mode):
mysql_integration_tests_step(edition=edition, ver_mode=ver_mode),
]
if include_enterprise2:
test_steps.extend([
lint_backend_step(edition=edition2),
-30
View File
@@ -1149,36 +1149,6 @@ def get_windows_steps(edition, ver_mode):
return steps
def validate_scuemata_step():
return {
'name': 'validate-scuemata',
'image': build_image,
'depends_on': [
'build-backend',
],
'commands': [
'./bin/linux-amd64/grafana-cli cue validate-schema --grafana-root .',
],
}
def ensure_cuetsified_step():
return {
'name': 'ensure-cuetsified',
'image': build_image,
'depends_on': [
'validate-scuemata',
],
'commands': [
'# It is required that the generated Typescript be in sync with the input CUE files.',
'# To enforce this, the following command will attempt to generate Typescript from all',
'# appropriate .cue files, then compare with the corresponding (*.gen.ts) file the generated',
'# code would have been written to. It exits 1 if any diffs are found.',
'./bin/linux-amd64/grafana-cli cue gen-ts --grafana-root . --diff',
],
}
def verify_gen_cue_step():
return {
'name': 'verify-gen-cue',