grafana / kindsys

a kind system for schematizing objects
Apache License 2.0
12 stars 0 forks source link

Introduce hacky support for kind composition #31

Open sdboyer opened 1 year ago

sdboyer commented 1 year ago

This PR introduces (hacky! early!) support for composition of Composable kinds into Resource kinds.

The eventual goal is that we can describe kind composition declaratively in enough detail that all the work of doing composed validation can be handled generically here in the base kind implementations provided by kindsys. Doing so is prerequisite to doing full, composed validation on the apiserver, rather than having to rely webhooks (which would get pretty noisy).

For now, though, the implementations have to be hardcoded per-kind. I'm pulling up a corresponding PR in Grafana that does that for dashboards.

sdboyer commented 1 year ago

Need to fix up tests, but this is working as-is for composed dashboard validation over in grafana/grafana

sdboyer commented 1 year ago

CI passing now.

We don't have a direct way of testing this in kindsys right now, but we will once we have a corpus. For now, best thing is just knowing that it works in core, for dashboards (see grafana/grafana#72934)

CLAassistant commented 3 months ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


sam boyer seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.