timoni icon indicating copy to clipboard operation
timoni copied to clipboard

apply silently ignores an incomplete resource

Open ineu opened this issue 5 months ago • 0 comments

I'm investigating timoni as a replacement for helm, enjoying static typing and overall experience. Thanks for the project!

There's a couple of things I find confusing:

  1. I couldn't find documentation on the format of timoni: apply: NAME: ... path in timoni.cue. As far as I understood from the quick look at the code, the NAME is ignored and can really be anything. Then you can have any number of apply calls, like timoni: apply: foo:, timoni: apply: bar: etc, and they all will be merged in the final result. Please correct me if I misunderstood the way it works. It would be great to add this to the documentation
  2. What's more confusing is that apply silently ignores the incomplete resources. By trial and error I came to the conclusion that for a resource to be generated it must have the following set of fields at least:
    {
        apiVersion: "v1"
        kind: "ConfigMap"
        metadata: name: "foo"
    }

The problem here is that only the kind field is validated by mod vet or build or apply. If apiVersion or metadata: name is missing, you get no errors, but the resource is silently ignored and is missing from the output. I believe this is a bug: if kind is validated then other required fields must be validated as well.

Thank you.

ineu avatar Jul 26 '25 19:07 ineu