Skip to content

fix: improve includeWhen CEL expression validation #444

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

Closed

Conversation

aryasoni98
Copy link

This change modifies the validation logic to:

  1. Use CEL type checking instead of evaluation
  2. Skip validation of other expressions when includeWhen conditions indicate the resource won't be included
  3. Fix array index access validation issues by properly respecting includeWhen conditions

Fixes #417

aryasoni98 and others added 2 commits March 23, 2025 13:42
This change modifies the validation logic to: 1. Use CEL type checking instead of evaluation 2. Skip validation of other expressions when includeWhen conditions indicate the resource won't be included 3. Fix array index access validation issues by properly respecting includeWhen conditions

Fixes kro-run#417
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.

Hi @aryasoni98, thanks for this PR. I'm closing this pr because:

the code has multiple compiler errors that would have been caught by local testing, also
caching and string checking CEL content doesn't solve the underlying issue in #417 it also appears that this code was LLM generated.

rven though this issue was assigned to you, please discuss your technical approach with the maintainers before writing code.

@a-hilaly a-hilaly closed this Apr 1, 2025
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.

includeWhen not taken into account when evaluating CEL expressions
2 participants