grafana / grafana-app-sdk

An SDK for developing apps for grafana using kubernetes-like storage and operators
Apache License 2.0
45 stars 8 forks source link

Recursive Types #460

Open IfSentient opened 2 days ago

IfSentient commented 2 days ago

Because CRDs cannot handle recursive types natively, we do not currently support recursive codegen from the CLI ("do not currently support" in this case means "CLI freezes up when CUE attempts to convert the recursive CUE type to OpenAPI). However, there are definitely use-cases for recursive types within app platform, so we should evaluate if we want to support recursive types in any possible case. Some questions:

radiohead commented 1 day ago

However, there are definitely use-cases for recursive types within app platform

Do we have any real requests / questions / examples?

Do we want to only generate code for the recursive types, and use kubernetes-preserve-unknown-fields: true on an empty object when generating the schema (as suggested in https://github.com/kubernetes-sigs/controller-tools/issues/585?

I would prefer that for a V1 / V0 approach. We could start there and investigate changing apiextensions code to support recursive types natively later.