feat(utils): add typed cel evaluation#1616
Merged
abhijith-darshan merged 1 commit intomainfrom Nov 19, 2025
Merged
Conversation
Signed-off-by: abhijith-darshan <abhijith.ravindra@sap.com>
mikolajkucinski
approved these changes
Nov 19, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Typed CEL Evaluation
For #1426 we need the value of CEL that is evaluated to be type safe
Current CEL will evaluate it into any, which might result into undesired helm values.
Consider the scenario where a plugin has the following ingress hosts -
plugin-b needs to extract the hosts from plugin-a
the expression -
object.spec.optionValues.filter(o, o.name == 'ingress.hosts')[0].value[0]returns the first element in the array.the expression -
object.spec.optionValues.filter(o, o.name == 'ingress.hosts')[0].valuereturns the array as is.typed evaluation usage -
value, err := cel.EvaluateTyped[[]string](expr, object)The first expression will return error as the evaluation is a
stringand not an[]stringThe second expression will succeed as the evaluated value is indeed an
[]stringWhat type of PR is this? (check all applicable)
Related Tickets & Documents
Added tests?
validating type evaluation result
Added to documentation?
Checklist