Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Teach codegen to accept and generate additionalPrinterColumns #408

Merged
merged 5 commits into from
Sep 17, 2024

Conversation

bcotton
Copy link
Contributor

@bcotton bcotton commented Sep 17, 2024

This will get passed through to the CRDs.

I don't know how to get the thema tests to pass. Ideas?

customKind.lineage.schemas.1.additionalPrinterColumns: field not allowed:
    /github.com/grafana/grafana-app-sdk/codegen/thema/testing/customkind.cue:69:13
    /github.com/grafana/grafana-app-sdk/kindsys/cue.mod/pkg/github.com/grafana/thema/lineage.cue:42:24
    /github.com/grafana/grafana-app-sdk/kindsys/cue.mod/pkg/github.com/grafana/thema/lineage.cue:42:27
    /github.com/grafana/grafana-app-sdk/kindsys/cue.mod/pkg/github.com/grafana/thema/lineage.cue:45:2
    /github.com/grafana/grafana-app-sdk/kindsys/cue.mod/pkg/github.com/grafana/thema/lineage.cue:46:34
    /github.com/grafana/grafana-app-sdk/kindsys/cue.mod/pkg/github.com/grafana/thema/lineage.cue:46:37
    /github.com/grafana/grafana-app-sdk/kindsys/cue.mod/pkg/github.com/grafana/thema/lineage.cue:46:38
    /github.com/grafana/grafana-app-sdk/kindsys/cue.mod/pkg/github.com/grafana/thema/lineage.cue:231:13
    /github.com/grafana/grafana-app-sdk/kindsys/kindcat_custom.cue:115:2
    /github.com/grafana/grafana-app-sdk/kindsys/kindcats.cue:69:11
customKind.lineage._sortedSchemas: invalid value [] (does not satisfy list.MinItems(1)): len(list) < MinItems(1) (0 < 1):
    /github.com/grafana/grafana-app-sdk/kindsys/cue.mod/pkg/github.com/grafana/thema/lineage.cue:98:7
    /github.com/grafana/grafana-app-sdk/kindsys/cue.mod/pkg/github.com/grafana/thema/lineage.cue:94:21
    /github.com/grafana/grafana-app-sdk/kindsys/cue.mod/pkg/github.com/grafana/thema/lineage.cue:98:21
--- FAIL: TestCRDGenerator (0.14s)
    --- FAIL: TestCRDGenerator/JSON (0.04s)
        generators_test.go:34:
                Error Trace:    /Users/bcotton/projects/grafana-app-sdk/codegen/thema/generators_test.go:34

This will get passed through to the CRDs.
@bcotton bcotton requested a review from a team as a code owner September 17, 2024 03:46
Copy link
Contributor

@radiohead radiohead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

I'll leave it up to @IfSentient to look into Thema tests – perhaps it's time to drop our support for it.

Copy link
Collaborator

@IfSentient IfSentient left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM except for one minor change in the CUE.

codegen/cuekind/def.cue Outdated Show resolved Hide resolved
@IfSentient IfSentient merged commit eb9af02 into main Sep 17, 2024
9 checks passed
@IfSentient IfSentient deleted the bcotton/add-additional-printer-columns branch September 17, 2024 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants