Skip to content

Graceful degradation on extension function panics #1356

Description

@TristonianJones

Feature request checklist

  • There are no issues that match the desired change
  • The change is large enough it can't be addressed with a simple Pull Request
  • If this is a bug, please file a Bug Report.

Change
If an function in the CEL interpreter panics, the expression evaluation terminates and
an error is provided to the caller. This behavior could be relaxed to be more graceful,
by specifically wrapping extension functions (possibly just async functions) in
panic-recover blocks to better handle unexpected errors.

Example
bad_call() || true <-- currently errors if there's a panic in bad_call; however, this
expression could evaluate to completion with panic-recover blocks.

Alternatives considered
Do nothing - panics should probably not be gracefully tolerated, but there may be
exceptions to this rule, and perhaps, instead this should be a wrapper offered to
users to do a panic / recover block around specific functions where they are most
worried about a panic -- such as from a third party library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions