Skip to content

Releases: cel-expr/cel-go

Release v0.24.0-alpha

05 Feb 20:04
e086729

Choose a tag to compare

Release v0.24.0-alpha Pre-release
Pre-release

Alpha release for testing new subsetting features

What's Changed

  • Helper methods for subsetting function overloads (#1120)

Full Changelog: v0.23.2...v0.24.0-RC1

Release v0.23.2

31 Jan 22:12
1bf2472

Choose a tag to compare

Corrects one remaining issue for cost computations from the v0.23.0 releases

Fixes

  • Bump github.com/golang/glog from 1.0.0 to 1.2.4 in /codelab in the go_modules group across 1 directory by @dependabot in #1115
  • Minor update on cost order by @TristonianJones in #1119

Full Changelog: v0.23.1...v0.23.2

Release v0.23.1

28 Jan 20:59
d8351df

Choose a tag to compare

Minor release to address cost tracking and size estimation [#1113]

Full Changelog: v0.23.0...v0.23.1

Release v0.23.0

24 Jan 18:02
2f7606a

Choose a tag to compare

Features

  • First and last element in list support [#1067]
  • Add support for typed conformance tests. [#1089]
  • Add syntax for escaped field selectors. [#1002]
  • Add optional.unwrap() / .unwrapOpt() function [#1103]
  • Cost tracking for two-variable comprehensions and bindings [#1104]

Fixes

PR #1099 enables a change in the internal variable name used for comprehension result accumulation. This change may break some tests which inspect the AST contents in text form; however, will not break any existing uses of CEL during parse, check, or evaluation.

  • Improve policy compiler error message for incompatible outputs. [#1082]
  • Fix partial evaluation with the comprehension folder objects [#1084]
  • Introduce versioning options to all extensions [#1075]
  • Fix a crash in mismatched output check for nested rules [#1086]
  • improve debug output to properly quote byte strings [#1088]
  • Fix two-variable comprehension pruning [#1083]
  • Replace checks for valid UTF-8 in strings with go-maintained calls [#1094]
  • Policy nested rule fix [#1092]
  • Address non-const format string lint findings [#1096]
  • Fix typos in ext/README.md [#1098]
  • Add option to use inaccessible accumulator var [#1097]
  • Add test cases for string.format covering various edge cases [#1101]
  • Add base_config and partial_config files under restricted_destination testdata [#1106]
  • Default enable using hidden accumulator name [#1099]
  • Update PruneAst to support constants of optional type [#1109]

New Contributors

Full Changelog: v0.22.1...v0.23.0

Release v0.22.1

22 Nov 16:58
933f926

Choose a tag to compare

Fixes

  • Additional hardening on legacy macros [https://github.com//pull/1064]
  • Additional nil-safety checks with corresponding test updates [https://github.com//pull/1073]
  • Add two-variable comprehension support to cel-policy [https://github.com//pull/1074]
  • Fix optional test to short-circuit [https://github.com//pull/1076]
  • Fix nil-type when two-var comprehension has a dyn range [https://github.com//pull/1077]

New Contributors

Full Changelog: v0.22.0...v0.22.1

Release v0.22.0

06 Nov 20:50
8ad600b

Choose a tag to compare

What's Changed

Core CEL

Policy

New Contributors

Full Changelog: v0.21.0...v0.22.0

Release v0.21.0

03 Aug 21:11
3545aac

Choose a tag to compare

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

v0.20.1

07 Mar 15:56
7654578

Choose a tag to compare

Minor release to capture a couple bug fixes and API / build visibility changes.

What's Changed

  • Track sizes of comprehension results by [#901]
  • Introduce new helper APIs for optimizers by [#903]
  • Make the CEL ast package public. [#904]

New Contributors

Full Changelog: v0.20.0...v0.21.0

Release v0.20.0

15 Feb 22:25
f221e70

Choose a tag to compare

What's Changed

  • Minor adjustment to inlining to fix a bad bind [#888]
  • Ensure error typed variables are returned as errors from Resolve b [#889]
  • ext.NativeTypes: Recursively add sub-types [#892]
  • DefaultTypeAdapter: Add support for missing custom scalars [#893]
  • Lists: Fix handling of go arrays [#894]

New Contributors

Full Changelog: v0.19.0...v0.20.0

Release v0.19.0

19 Jan 16:41
df07208

Choose a tag to compare

Features

  • Add AST node IDs to types.Err for errorable expressions [#862]
  • Set membership test rewriting optimizer [#865]
  • Introduce 'wither' method for changing type traits [#871]
  • Add option to include test types in the repl [#855]

Fixes

  • Fix MaxID to consider macro keys and expressions [#861]
  • Update builtin macros to use unique IDs. [#866]
  • Fix incorrect example in string formatting docs. [#873]
  • Fix the optional type name and type identifier resolution [#870]
  • Fix type substitution within parameterized type names [#880]
  • Bump follow-redirects from 1.15.2 to 1.15.4 in /repl/appengine/web [882]

New Contributors

Full Changelog: v0.18.2...v0.19.0