Open theganyo opened 1 year ago
JFYI, the failing tests are because of a couple of CEL conversion failures:
[].all()
comprehension: https://github.com/apigee/registry/blob/main/cmd/registry/controller/controller.go#L246labels.x
sub-entity reference: https://github.com/apigee/registry/blob/main/tests/filters_test.go#L76For posterity, if we return to this we may also want to look at indexing the JSON. Some references:
do you see an easy way to structure this to be optional
Not for the data, but I'm not sure that's necessary... it should be easy to move from binary blob to JSON and change nothing but the encoding and decoding.
As for switching between SQL/CEL and CEL-only? Yes.
This is a quick proof of concept for storing labels as JSON and allowing our CEL filters to use SQL. An actual implementation would handle more cases and include a fallback process for filters that can't be properly converted.