Skip to content

v0.10.1

Latest
Compare
Choose a tag to compare
@l46kok l46kok released this 25 Jun 23:47
· 38 commits to main since this release

This release features the following:

  • New Android-Optimized Runtime (Beta): Introducing a lightweight runtime with native support for Protobuf Lite, significantly reducing footprint for Android applications.
  • Expanded Extension Libraries: New Regular Expression extension library is now available, alongside enhanced Math extensions including floor, ceil, round, and bitwise operators.
  • CEL Unit test runner framework: Allows exercising tests for CEL expressions and policies via Bazel macros.
  • YAML Environment Serialization: Support for a bi-directional CEL environment serialization in YAML for improved configuration management.

Breaking Changes

The following PRs change the fully qualified class name for function binding:

Before: dev.cel.runtime.CelRuntime.CelFunctionBinding
After: dev.cel.runtime.CelFunctionBinding

  • Rename dev.cel.runtime.CelRuntime.CelFunctionBinding to dev.cel.runtime.CelFunctionBinding in #627
  • Remove deprecated dev.cel.runtime.CelRuntime.CelFunctionBinding in #628

Various utility methods for spawning protobuf-based CEL types have been moved out of CelTypes into CelProtoTypes or CelProtoMessageTypes:

  • Migrate from CelProtoTypes#createMessage(descriptor) to CelProtoMessageTypes#createMessage(descriptor) in #568
  • Remove deprecated CelProtoTypes#createMessage in #573
  • Create CelProtoMessageTypes for handling proto based types that require a full protobuf dependency in #567

CelPolicyConfig and its sibling classes have been removed. These classes are superseded by CelEnvironment, which are functionally equivalent and provides functionality for environment setup beyond policy use cases.

  • Remove deprecated CelPolicyConfig and its parser in #618

Bug Fixes

  • Include CEL Policy Compiler in next release's jar #678
  • Fix an issue with the error message not including the source location and position during function dispatch in #569
  • Fix JSON conversions involving FieldMask and Empty in #644
  • Fix a fuzzer issue involving nested comprehensions in #655
  • Fixing lastIndexOf incosistent behaviour in #681
  • Fix bytes to string conversion to explicitly error on invalid code points in #717
  • Fix optional or/orValue to propagate errors and unknowns in #718
  • add string(bool) overload by @maorwayn in #728
  • Enable updated accumulator variable for CEL-Java parser by default. in #537

What's Changed

Extension libraries

  • Implement math extension functions for floor, ceil, etc in #650
  • Porting lists.range() to Java Stack in #685
  • Adding the CEL regex extensions in #708
  • Updating Regex ext to align with Google SQL and Adding Regex documentation in #722
  • Aligning replace function in Regex ext with Google SQL in #724

YAML serialization

  • Introduce serializable CEL environment with YAML in #606
  • Support for CelEnvironment to YAML in #675

Lite Runtime (Android)

  • Add rules_android to WORKSPACE, add cel_android_library bzl macro in #583
  • Bring in android artifacts for guava and protobuf in WORKSPACE in #584
  • Implement interfaces for CelLiteRuntime. Add Android runtime tests in #615
  • Assert allowed CelOptions during CelLiteRuntime environment construction in #619
  • Split ProtoAdapter into ProtoLiteAdapter to adapt lite messages in #636
  • Bring in WORKSPACE dependencies for supporting CelLiteDescriptor codegen in #647
  • Add interpreter test for protolite messages in #656
  • Implement codegen for CelLiteDescriptor in #659
  • Add CelLiteDescriptorPool and DefaultLiteDescriptorPool in #664
  • Add ProtoMessageLiteValue and ProtoLiteCelValueConverter in #666
  • Perform field selections on lite messages by reading from the wire format in #668
  • Add ProtoMessageLiteValueProvider in #669
  • Rename CelLiteRuntimeTest to CelLiteRuntimeAndroidTest in #671
  • Add an interface for accepting CelValueProvider in lite runtime in #672
  • Add protolite tests for Android in #673
  • Add BaseProtoMessageValueProvider to decouple full/lite protobuf value providers in #674
  • Handle unknown fields in messagelite in #683
  • Rename CelFieldValueType to EncodingType in #684
  • Derive the java class name for CelLiteDescriptor in #687
  • Handle dependent protos when generating CelLiteDescriptor in #692
  • Add late bound function resolver to lite runtime's program interface in #693
  • Expose Late function bindings target for Android. in #698
  • Allow resolution of proto messages from dyn-typed functions in lite runtime in #700
  • Add @Generated annotation to codegened CelLiteDescriptor. Fix package location error prone warning for generated sources within srcjar. in #704
  • Separately generate lite descriptors per message in #705
  • Decouple CelTypeResolver from full protobuf implementation in #590
  • Add DefaultInstanceMessageLiteFactory in #630
  • Decouple ProtoCelValueConverter into BaseProtoCelValueConverter in #660
  • Partition CEL standard functions per function definition in #707
  • Remove extraneous protoTypeName argument from RuntimeTypeProvider interface in #706
  • Add an additional messageName argument to MessageProvider interface in #662
  • Add toRuntimeBuilder to CelLiteRuntime in #620

Test runner framework

  • Push Testrunner to OSS in #680
  • Support unknown_set in output. in #720

Miscellaneous

  • Split CelEvaluationException from runtime build target in #555
  • Remove deprecated ExprFeatures in #557
  • Allow AsyncProgram to accept an async resolver for an attribute in #711
  • Create a builder for CelEvaluationException in #561
  • Replace InterpreterExceptions with CelEvaluationException in the runtime path in #564
  • Remove InterpreterException in #565
  • Update CelUnparser and open up visibility so that inheriting class can use it in #556
  • Upgrade to Bazel 8, upgrade protobuf-java to 4.29.3 in #582
  • Explicitly set locale for String.format calls in #577
  • Enable conformance tests in #596
  • Add CelCompilerTool java binary and compile_cel bzl library in #594
  • Add empty binder to GlobalResolver in #586
  • fixed typo in README.md by @tobiKaboom in #599
  • Add capability to accept a CEL environment in CelCompilerTool in #611
  • Surface ExprId in CelIssue in #604
  • Add test coverage for overlapping overloads and invalid struct creation in #608
  • Decouple Activation from full protobuf implementation in #614
  • Change default java toolchain and build from 8 to 11. Add separate CI for Java 8 builds in #616
  • Augment runtime's toBuilder method to reinstantiate a builder from stored artifacts in #623
  • Change WellKnownProto to lookup a descriptor by its type name. Add google.protobuf.Empty and google.protobuf.FieldMask to WKP in #626
  • Drop support for java.lang.long uint support in CelValue in #663
  • Make UnspecifiedType abstract in #676
  • Fork timestamp/duration protobuf utility methods. Remove protobuf_java_util dependency from the runtime in #682
  • Remove deprecated CelExtensions#sets() in #695
  • Upgrade protobuf-java version to 4.31.0 in #703
  • Remove deprecated builder methods for accepting unknown attribute patterns in #714
  • Move Optional function bindings from standard lib to CelOptionalLibrary in #710
  • Make CelRuntime.Program an interface in #729
  • Switch CelStandardFunctions to use dev.cel.runtime.CelFunctionBinding in #592

New Contributors

Full Changelog: v0.9.1...v0.10.1