Skip to content

Release v0.21.0

Latest
Compare
Choose a tag to compare
@TristonianJones TristonianJones released this 03 Aug 21:11
· 44 commits to master since this release
3545aac

Features

  • Math extensions update to include bitwise ops and floating point helpers [#923]
  • Better support custom types with custom type registries [#931]
  • repl: implement %parse [#933]
  • Fixed partial variables extended bug and split PartialVarsEnvExtended test into two [#955]
  • Added partial evaluations example [#959]
  • Enable conformance tests for extensions [#930]
  • Update cel-spec and enable optional_type conformance tests [#919]
  • Improve token representation in AST [#932]
  • Add function accessor to Env [#978]

CEL Policy Compiler

Policies which use CEL often evolve to express complex logic using multiple statements
and decision criteria. The CEL Policy Compiler provides an extensible format for parsing,
compiling, and composing expression graphs. Below is a simple example which can easily
be compiled to a single CEL expression.

name: "my-policy"
rule:
  variables:
    - name: greeting
      expression: "'%s, %s!'"
    - name: people
      expression: >
       ['Tristan', 'Calla', 'Antoine', 'Jonathan', 'Sokwhan', 'Rebecca']
  match:
    - condition: "request.user in variables.people"
      output: "variables.greeting.format(['hello', request.user])"
    - output: "variables.greeting.format(['goodbye', 'stranger'])"
  • Simple Policy Compiler [#924]
  • Introduce protobuf message testing to policies [#961]
  • Generate policy explanations during compilation [#977]
  • Variable and nested rule limits [#989]
  • Improved support for nested rules #991]

Fixes

  • Delete dangling source info from macro expansion [#934]
  • Do not re-use ID twice in exists_one macro [#935]
  • Avoid iterating over the source multiple times during parse [#936]
  • Fix for working with byte arrays by [#958]
  • Stabilize macro id generation during optimization [#962]
  • String formatting panic fix for non-literal format strings [#987]
  • Add nil checking for wrapperspb's types [#960]
  • Prevent self-append for Issues [#988]
  • Use bytes interface value for zero native type struct fields instead of dynamic list [#981]

Presence Test Semantics

The following two changes identified an issue where presence test was unexpectedly being performed over a scalar type and evaluating to absent rather than erroring. It is strongly advised to set the flag cel.EnableErrorOnBadPresenceTest(true) to avoid a logical correctness issue.

  • Fix presence test to produce an error when it's not a map or a message [#922]
  • Update the presence testing fix to be opt-out [#939]

Deprecation Cleanup

  • Remove the deprecated protobuf function and type declarations [#921]

New Contributors

Full Changelog: v0.20.1...v0.21.0