Open bugs84 opened 1 day ago
I was able to reproduce this. My suspicion is that something about the protobuf upgrade to 4.28.0 is causing this issue, and that the binary compatibility may not have been fully restored as stated in https://github.com/protocolbuffers/protobuf/issues/17247. Either that, or the dependent protos (ExprValue from proto-google-common-protos
, used to represent unknowns in CEL) is not fully protobuf v4 compatible.
The workaround is to downgrade CEL to 0.6.0 as of now. I'll look into this further.
This is an issue on any code path in CEL that references the Builder's methods on protobuf messages. The earlier release of Protobuf v4 have removed GeneratedMessageV3, and shims were added afterwards to restore ABI compatibility in 4.27.x, but not fully. Particularly, any generated messages produced before protoc version 3.25.x are no longer compatible with Protobuf V4. Bazel's built-in proto toolchain (@com_google_protobuf//:protoc
) happens to use 3.21. This unfortunately led to publishing a JAR with incompatible generated messages.
In short, CEL is not compatible with protobuf v4. The published JAR for 0.7.1 forces protobuf v4 as a dependency so it should not be used. I'll try to release a fix soon.
Thank you.
Just note:
Downgrade to CEL 0.6.0 - has different issue NoClassDefFoundError: com/google/rpc/StatusProto
But it doesn't matter. For us is now enough to comment out ConstantFoldingOptimizer. And wait for proper fix.
Thank you again!
Oh for that one, you just need to bring in proto-google-common-protos from maven. Not sure why that's not being resolved automatically in gradle, but that's a separate issue.
Btw, the issue in 0.7.1 is not just specific to constant folding. You'll run into issues in other places where an unknown value needs to be referenced at all internally.
Describe the bug ConstantFoldingOptimizer doesn't work for some expressions. e.g. "my_var in ['H', 'O']"
To Reproduce Clone this repository, that reproduce the bug. https://github.com/bugs84/CelOptimizerIssue
Current issue Program ends with following exception: