Repository navigation
[Python] Export CEL Policy compiler and YAML parser module to OSS - #138
Open
copybara-service[bot] wants to merge 1 commit into
Open
copybara-service[bot] wants to merge 1 commit into
copybara-service[bot] wants to merge 1 commit into
Conversation
copybara-service
Bot
force-pushed
the
test_1014822063
branch
from
November 14, 2026 01:55
9418e73 to
038d79c
Compare
Stop linking `cel_policy` against `cel_pybind_lib`, so it no longer carries its own copy of the PyCelEnv and protobuf descriptor state, and loads `cel` dynamically instead: - `cel.Env` exposes its compiler through a private `_compiler_capsule()` PyCapsule, which shares ownership of the env. - `cel_compiler_capsule.h` holds the shared capsule name and helpers (`MakeCelCompilerCapsule`, `GetCelCompiler`). - `CelPolicyValidationResult` builds and caches the compiled expression once, using `env.deserialize()`, because a CheckedExpr message can't be passed directly between separately built shared libraries. Also adds Bazel/Copybara/Windows test support: the yaml-cpp dependency, export of policy/**, and runfiles-relative testdata paths. PiperOrigin-RevId: 1014822063
copybara-service
Bot
force-pushed
the
test_1014822063
branch
from
November 14, 2026 02:03
038d79c to
5564648
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[Python] Export CEL Policy compiler and YAML parser module to OSS
Stop linking
cel_policyagainstcel_pybind_lib, so it no longer carriesits own copy of the PyCelEnv and protobuf descriptor state, and loads
celdynamically instead:
cel.Envexposes its compiler through a private_compiler_capsule()PyCapsule, which shares ownership of the env.
cel_compiler_capsule.hholds the shared capsule name and helpers(
MakeCelCompilerCapsule,GetCelCompiler).CelPolicyValidationResultbuilds and caches the compiled expression once,using
env.deserialize(), because a CheckedExpr message can't be passeddirectly between separately built shared libraries.
Also adds Bazel/Copybara/Windows test support: the yaml-cpp dependency,
export of policy/**, and runfiles-relative testdata paths.