mirror of
https://github.com/open-cluster-management-io/ocm.git
synced 2026-05-16 14:18:42 +00:00
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Failing after 1m20s
Post / images (amd64, addon-manager) (push) Failing after 5m39s
Post / coverage (push) Failing after 7m32s
Post / images (amd64, registration-operator) (push) Failing after 43s
Post / images (amd64, work) (push) Failing after 40s
Post / images (amd64, placement) (push) Failing after 8m15s
Post / images (arm64, addon-manager) (push) Failing after 40s
Post / images (arm64, registration) (push) Failing after 43s
Post / images (arm64, registration-operator) (push) Failing after 39s
Post / images (amd64, registration) (push) Failing after 5m26s
Post / images (arm64, work) (push) Failing after 38s
Post / images (arm64, placement) (push) Failing after 7m27s
Post / image manifest (addon-manager) (push) Has been skipped
Post / image manifest (placement) (push) Has been skipped
Post / image manifest (registration) (push) Has been skipped
Post / image manifest (registration-operator) (push) Has been skipped
Post / image manifest (work) (push) Has been skipped
Post / trigger clusteradm e2e (push) Has been skipped
Bumps [github.com/google/cel-go](https://github.com/google/cel-go) from 0.26.1 to 0.27.0. - [Release notes](https://github.com/google/cel-go/releases) - [Commits](https://github.com/google/cel-go/compare/v0.26.1...v0.27.0) --- updated-dependencies: - dependency-name: github.com/google/cel-go dependency-version: 0.27.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Common Expression Language
The Common Expression Language (CEL) implements common semantics for expression evaluation, enabling different applications to more easily interoperate.
Key Applications
- Security policy: organizations have complex infrastructure and need common tooling to reason about the system as a whole
- Protocols: expressions are a useful data type and require interoperability across programming languages and platforms.
Guiding philosophy:
- Keep it small & fast.
- CEL evaluates in linear time, is mutation free, and not Turing-complete. This limitation is a feature of the language design, which allows the implementation to evaluate orders of magnitude faster than equivalently sandboxed JavaScript.
- Make it extensible.
- CEL is designed to be embedded in applications, and allows for extensibility via its context which allows for functions and data to be provided by the software that embeds it.
- Developer-friendly.
- The language is approachable to developers. The initial spec was based on the experience of developing Firebase Rules and usability testing many prior iterations.
- The library itself and accompanying toolings should be easy to adopt by teams that seek to integrate CEL into their platforms.
The required components of a system that supports CEL are:
- The textual representation of an expression as written by a developer. It is of similar syntax to expressions in C/C++/Java/JavaScript
- A representation of the program's abstract syntax tree (AST).
- A compiler library that converts the textual representation to the binary representation. This can be done ahead of time (in the control plane) or just before evaluation (in the data plane).
- A context containing one or more typed variables, often protobuf messages.
Most use-cases will use
attribute_context.proto - An evaluator library that takes the binary format in the context and produces a result, usually a Boolean.
For use cases which require persistence or cross-process communcation, it is highly recommended to serialize the type-checked expression as a protocol buffer. The CEL team will maintains canonical protocol buffers for ASTs and will keep these versions identical and wire-compatible in perpetuity:
Example of boolean conditions and object construction:
// Condition
account.balance >= transaction.withdrawal
|| (account.overdraftProtection
&& account.overdraftLimit >= transaction.withdrawal - account.balance)
// Object construction
common.GeoPoint{ latitude: 10.0, longitude: -5.5 }
For more detail, see:
Released under the Apache License.