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

Update to latest version of CUE #424

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

errordeveloper
Copy link
Contributor

CUE now has resolved the CRD import issue with oneOf, not, and anyOf (#336) as well required fields. This PR integrates latest revision and updates tests.

Comment on lines +44 to +69
#AlertProviderSpec: matchN(1, [{
type!: _
address!: _
}, {
type!: _
secretRef!: _
}]) & {
// Hook URL address of this provider
address?: string

// Alert channel for this provider
channel?: string

// Http/s proxy of this provider
proxy?: string
secretRef?: {
// Name of the Kubernetes secret
name!: string
}

// Type of this provider
type?: "slack" | "msteams" | "discord" | "rocket" | "gchat"

// Bot username for this provider
username?: string
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@stefanprodan I suppose this one might be small enough to eyeball? 😅

Copy link
Owner

Choose a reason for hiding this comment

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

Yeap, looks great!

@errordeveloper errordeveloper marked this pull request as ready for review September 10, 2024 12:29
@errordeveloper
Copy link
Contributor Author

Adding a bump for gomega, as it gets only a shy +1 as part of CUE bump, might as well get the very latest.

Copy link
Owner

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

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

Thanks @errordeveloper! Really happy to see the CRD import working for oneOf/anyOf 🎉

@@ -3,7 +3,7 @@ module github.com/stefanprodan/timoni
go 1.22.0

require (
cuelang.org/go v0.9.2
cuelang.org/go v0.11.0-alpha.1.0.20240910060539-63413629e06b
Copy link
Owner

Choose a reason for hiding this comment

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

We'll need to wait for v0.11.0 to go GA before merging.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes... only if one could use build tags in 'go.mod'!

@errordeveloper
Copy link
Contributor Author

Should we add test cases for all verbs? I think Flagger CRD has only one of them.

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.

2 participants