-
Notifications
You must be signed in to change notification settings - Fork 214
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
Exposing Default CEL checker.CostEstimator and interpreter.ActualCostEstimator #879
Comments
cc'ing @TristonianJones - I've seen you helping various people in the community with CEL cost stuff. Seems you may be the best point of contact for this 🤷 ? |
@jon-whit The main reason for the lack of a default estimator is that complex types in CEL don't have a built-in notion of size, so the default implementations for the type-check and interpreter would basically always return Also, I exposed custom cost overrides as something that could be configured on a per-method/overload basis if you're looking to package your functionality up as a library: https://github.com/google/cel-go/pull/850/files Let me know if this is what you're looking for. Cheers, -Tristan |
Is there a specific reason not to expose the default implementation of the
checker.CostEstimator
andinterpreter.ActualCostEstimator
? I'm looking at adding cost estimation to a base CEL environment and if the estimate exceeds a max cost estimate then I would reject the expression prior to accepting it. What would be the best way to make use of the standard CEL library to achieve this given this functionality is not exposed as public signatures yet?The text was updated successfully, but these errors were encountered: