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

pkg simpleschema: Add simple CEL validation support #484

Merged
merged 1 commit into from
Apr 7, 2025

Conversation

DhairyaMajmudar
Copy link
Contributor

Description

  1. Adds simple CEL validation support
  2. Adds test cases corresponding to the changes

related to: #347 & #477

Copy link
Member

@a-hilaly a-hilaly left a comment

Choose a reason for hiding this comment

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

Awesome, thanks @DhairyaMajmudar !

@a-hilaly
Copy link
Member

a-hilaly commented Apr 7, 2025

shall we add this to the simple schema documentation? https://kro.run/docs/concepts/simple-schema

Comment on lines +223 to +225
if marker.Value == "" {
return fmt.Errorf("validation failed")
}
Copy link
Member

@a-hilaly a-hilaly Apr 7, 2025

Choose a reason for hiding this comment

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

nit:

Suggested change
if marker.Value == "" {
return fmt.Errorf("validation failed")
}
if marker.Value == "" {
return fmt.Errorf("found empty validation expression")
}

@a-hilaly a-hilaly merged commit 56ea2e7 into kro-run:main Apr 7, 2025
4 checks passed
@DhairyaMajmudar DhairyaMajmudar deleted the simple-validation branch April 7, 2025 20:46
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