Skip to content

Unexpected behavior for mutually exclusive fields in a Resource #445

Description

@birksl

What version of holos are you using (holos --version)?

0.104.3

Does this issue reproduce with the latest release?

Yes

What did you do?

Created a kubernetes resource definition that includes a mutually exclusive field, registered it in resources.cue and used it as a kubernetes resource in a component.

Steps to reproduce:
In the repro repo, run

$ holos render platform

What did you expect to see?

That holos render platform should succeed.

What did you see instead?

holos render platform fails with the following message:

error at internal/component/component.go:132: holos.spec.artifacts.0.generators.0.resources.Test.test.spec: incomplete value {exclusiveA:"",optionalA?:string,optionalB?:string} | {exclusiveA:"",optionalA?:string,optionalB?:string,exclusiveB:string}
holos.spec.artifacts.0.generators.0.resources.Test.test.spec: incomplete value {exclusiveA:"",optionalA?:string,optionalB?:string} | {exclusiveA:"",optionalA?:string,optionalB?:string,exclusiveB:string}
error at cli/render/render.go:89: could not render component: could not run command:
        /Users/birklewin/go/bin/holos '--log-level' 'info' '--log-format' 'console' 'render' 'component' '--write-to' 'deploy' '--inject' 'holos_component_name=test' '--inject' 'holos_component_path=components/test' './components/test'
        exit status 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationNeeds investigationTriageNeeds triage, issue reported from externally

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions