Closed rodaine closed 2 months ago
The latest Buf updates on your PR. Results from workflow Buf / validate-protos (pull_request).
Build | Format | Lint | Breaking | Updated (UTC) |
---|---|---|---|---|
✅ passed | ✅ passed | ✅ passed | ❌ failed (83) | Sep 30, 2024, 11:33 PM |
Breaking changes are expected due to the transitive breaking changes from the protovalidate project.
Using a repeated field as a predefined rule value results in a panic, as CEL cannot convert a
protoreflect.List
value into a valid CEL type. This results in an error value standing in for the list's value in the expression. When attempting to optimize the expression via computing residuals, a type assertion without the guard boolean (i.e.,typed := unknown.(T)
instead oftyped, ok := unknown.(T)
) triggers the panic on this non-list error value.This patch adds a new helper to the celext package to compute an appropriate value for any
protoreflect.Value
given its field descriptor.Fixes #148