Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In User Defined Output plugin framework, handleResponseData called twice per request #950

Open
dubious90 opened this issue Nov 30, 2022 · 1 comment

Comments

@dubious90
Copy link
Contributor

It is possible that it is being called on both the request path and the response path. More investigation is required here.

When called in integration tests, it is always first empty data followed by the expected response.

mum4k pushed a commit that referenced this issue Dec 2, 2022
The resulting PR was too large, so splitting these fixes out from the full integration PR:
1. FakeUserDefinedOutputPlugin is now thread safe.
2. AggregateGlobalOutput takes in UserDefinedOutput so that it can account for errors
  - Previously there was no way for the global aggregate to know about missing outputs which could have created confusion for users
3. FakeUserDefinedOutput - handleResponseData now ignores empty data responses
  - We uncovered an issue where handleData gets called twice per request, once with empty data - more investigation required in #950 
4. fake_user_defined_output plugin can no longer be test only because of a dependency chain that leads to non-test code, such as benchmarks and dynamic_config. It is too complex to break this dependency chain at the moment.

Signed-off-by: Nathan Perry <[email protected]>
@dubious90
Copy link
Contributor Author

I've confirmed that we are not calling this on the request path, only the response path. New theory is that this is just envoy sending response data in chunks, though more investigation is required as to why there is an empty data buffer sent ahead of each actual response.

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

No branches or pull requests

1 participant