Skip to content

http: test a StopAll filter that buffers the body until trailers - #49396

Merged
botengyao merged 2 commits into
envoyproxy:mainfrom
botengyao:stop-all-rebuffer-tests
Nov 18, 2026
Merged

botengyao merged 2 commits into
envoyproxy:mainfrom
botengyao:stop-all-rebuffer-tests

Conversation

@botengyao

Copy link
Copy Markdown
Member

Commit Message: http: test a StopAll filter that buffers the body until trailers
Additional Description:
Test-only follow-up to #49151, which fixed the body dropped by a filter that resumes from StopAllIteration, buffers the replayed body and continues from its trailers callback. It closes two gaps in the tests for that fix.

  • StopAllDecoderFilterRebuffersBodyUntilRequestTrailers: It runs with async host resolution, so the router stops all iteration on headers too and replays the shared request buffer itself when it resumes, which delivers the body the filter failed to forward. The test now runs in both modes. Without async host resolution the upstream gets an empty body without the fix and the full body with it. The async case is kept as ...AsyncLb and covers the path where the router is stopped as well.
  • FilterManagerTrailersInvariantTest has no stop kind for this case. StopAllThenBufferData adds 24 cases (both directions, every add phase and stopper position).

Risk Level: Low (test only)
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A
AI Usage: AI helped write and run these tests; I reviewed the change.

Follow-up to envoyproxy#49151, which fixed the body dropped by a filter that
resumes from StopAllIteration, buffers the replayed body and continues
from its trailers callback.

Add that stop kind to the FilterManagerTrailersInvariantTest matrix. Run
the integration test without async host resolution: the router otherwise
stops all iteration too and replays the buffered body itself, so the
test passed without the fix.

Signed-off-by: Boteng Yao <[email protected]>
Without async host resolution the router takes the body straight from
the filter, so the test fails if the filter drops it. With it the router
is stopped on all frames when the filter continues and replays the body
itself, which the second case covers.

Signed-off-by: Boteng Yao <[email protected]>
@botengyao
botengyao marked this pull request as ready for review November 18, 2026 15:27
@repokitteh-read-only

Copy link
Copy Markdown

As a reminder, PRs marked as draft will not be automatically assigned reviewers,
or be handled by maintainer-oncall triage.

Please mark your PR as ready when you want it to be reviewed!

🐱

Caused by: #49396 was opened by botengyao.

see: more, trace.

@botengyao botengyao assigned paul-r-gall and wbpcode and unassigned paul-r-gall Nov 18, 2026
@botengyao
botengyao merged commit 92eee2c into envoyproxy:main Nov 18, 2026
26 checks passed
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