Skip to content

Fix null node for list of struct in payload_to_metadaata filter#32309

Merged
KBaichoo merged 1 commit intoenvoyproxy:mainfrom
JuniorHsu:fix_p2m_wrong_top_of_struct_decision
Mar 4, 2024
Merged

Fix null node for list of struct in payload_to_metadaata filter#32309
KBaichoo merged 1 commit intoenvoyproxy:mainfrom
JuniorHsu:fix_p2m_wrong_top_of_struct_decision

Conversation

@JuniorHsu
Copy link
Copy Markdown
Contributor

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

Signed-off-by: kuochunghsu <kuochunghsu@pinterest.com>
Copy link
Copy Markdown
Member

@zuercher zuercher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, though I did have one question that, if it's a problem, has been one for a while. Ok to fix in a subsequent PR.

@KBaichoo KBaichoo merged commit ae11b93 into envoyproxy:main Mar 4, 2024
mattjo added a commit to mattjo/envoy that referenced this pull request Mar 5, 2024
* main: (151 commits)
  http3: fixing an upstream threading issue and bumping http3 upstream code back to alpha (envoyproxy#32640)
  rlqs: reset quota usage (envoyproxy#32569)
  proxy status: add more mapping to proxystatus (envoyproxy#32606)
  rlqs: add logging around token bucket (envoyproxy#32612)
  Logging: ENVOY_BUG include filter name. (envoyproxy#32663)
  mobile: Reenable the FilterIntegrationTest.AltSvcCachedH2Slow test (envoyproxy#32675)
  c++20 by default (envoyproxy#32585)
  Docs: Add diagram for histogram stat sink. (envoyproxy#32665)
  Fix null node for list of struct in payload_to_metadaata filter (envoyproxy#32309)
  metrics_service: populate histogram summary sample sum (envoyproxy#32666)
  build(deps): bump postgres from `0e564da` to `f58300a` in /examples/shared/postgres (envoyproxy#32632)
  build(deps): bump the examples-ext-authz group in /examples/ext_authz with 1 update (envoyproxy#32654)
  build(deps): bump distroless/base-nossl-debian12 from `28dc895` to `0e777c6` in /ci (envoyproxy#32652)
  Update QUICHE from 02047e04d to 3373df94b (envoyproxy#32650)
  ci/logging: Add failure detection (envoyproxy#32662)
  Change udpa renaming workaround to not compile the same archive twice (envoyproxy#32647)
  sockets: flipping graceful client socket creation failure (envoyproxy#32602)
  TcpAsyncClient: enhance reconnect robustness (envoyproxy#32578)
  owners: adding Fredy as an Enovy Mobile maintainer (envoyproxy#32638)
  ci: Add scheduled garbage collection (and fix retest) (envoyproxy#32639)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants