Expand description
Reshape proto audit_log_event_v1::Details JSON back into the shape
mz_audit_log::EventDetails::as_json produces.
The mz_audit_events MV reads audit events from mz_catalog_raw as
their durable proto twin (mz_catalog_protos::objects::audit_log_event_v1)
and projects details through the SQL scalar
parse_catalog_audit_log_details. Its output must equal what the prior
pack_audit_log_update populator wrote, i.e.
mz_audit_log::EventDetails::as_json.
The reshape is driven by five rule tables below plus two structural
rewrites (StringWrapper unwrap and the ResetAllV1 null case). See the
individual table docstrings for their shapes. The reciprocal is
EventDetails::as_json combined with the proto RustType conversion in
src/catalog-protos/src/audit_log.rs. The round-trip property test at
src/catalog/tests/audit_log_details.rs samples every Arbitrary
variant and catches drift when either side gains a new variant, field,
or serde attribute.
Structs§
Functions§
- parse_
catalog_ 🔒audit_ log_ details - Reshapes proto
audit_log_event_v1::DetailsJSON frommz_catalog_raw(e.g.{"IdFullNameV1": {"id": "u1", "name": {...}}}) into the shapemz_audit_log::EventDetails::as_jsonproduces: the format the priorpack_audit_log_updatepopulator wrote tomz_audit_events.