envoy
envoy copied to clipboard
Fix null node for list of struct in payload_to_metadaata filter
Commit Message:
Previously we rely on fieldBegin right before structBegin to determine this is not top-level struct.
i.e., fieldBegin structBegin structEnd fieldEnd sequence.
However, while we have a list of struct, this assumption doesn't hold since the structure inside a container inherits the field id of the container.
i.e., we had fieldBegin listBegin (structBegin structEnd)*n listEnd fieldEnd sequence.
Therefore, introduce a stack of field ids so could we track field id better.
In the added unit test, it hits assertion before fix.
Additional Description: Risk Level: low Testing: unit