Skip to content

Concurrent Eval with context.Context bound functions#1369

Merged
TristonianJones merged 10 commits into
cel-expr:masterfrom
TristonianJones:async-cel
Jul 21, 2026
Merged

Concurrent Eval with context.Context bound functions#1369
TristonianJones merged 10 commits into
cel-expr:masterfrom
TristonianJones:async-cel

Conversation

@TristonianJones

@TristonianJones TristonianJones commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

The ConcurrentEval function for CEL enables you to connect asynchronous extensions
that respect context cancellation and deadlines.

Execution Frame as Context

The features is built upon the CEL-managed ExecutionFrame which serves the role of a
custom context.Context object for the duration of a single ConcurrentEval execution.
The ExecutionFrame must never be stored or used outside of CEL: it's purely internal

Async Blocking

Async extensions are expected to block with CEL managing channel creation / concurrency
limits which can be configured through top-level options. Over time, CEL will add more utilities
for customizing extension timeouts, retries, and caching, e.g. #1367

Async Pruning

This implementation uses CEL's unknown feature to prune async dispatches before they're
executed if they're not relevant to the result.

Fixes for Unknown Merging

All code paths now properly early return on error, but aggregate unknowns, allowing for better
constant folding and expression pruning in addition to better identification of the batches of
calls which are relevant to result computation.

Closes #557

Comment thread interpreter/async.go Outdated
Comment thread interpreter/async.go
Comment thread interpreter/prune_test.go
Comment thread cel/folding.go Outdated
Comment thread cel/program.go Outdated
l46kok
l46kok previously approved these changes Jul 20, 2026
@TristonianJones
TristonianJones merged commit 94b0cce into cel-expr:master Jul 21, 2026
8 checks passed
@TristonianJones
TristonianJones deleted the async-cel branch July 21, 2026 20:10
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.

Support context propagation on overloads

2 participants