apigee / registry

The Registry API allows teams to track and manage machine-readable descriptions of APIs.
https://apigee.github.io/registry
Apache License 2.0
148 stars 33 forks source link

store api labels as json, filter using sql #1219

Open theganyo opened 1 year ago

theganyo commented 1 year ago

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.

theganyo commented 1 year ago

JFYI, the failing tests are because of a couple of CEL conversion failures:

theganyo commented 1 year ago

For posterity, if we return to this we may also want to look at indexing the JSON. Some references:

theganyo commented 1 year ago

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.