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

ext_proc: least surprise behavior for DEFAULT in mode_override. #38254

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

htuch
Copy link
Member

@htuch htuch commented Jan 29, 2025

The mode_override feature has a very surprising behavior, in which unset fields in ProcessingMode, revert behavior back to the default. For example, it is the default behavior that resposne headers are sent, but if the filter is configured not to send response headers in processing_mode, and a mode_override is sent to explicitly send request body, this then inadvertently triggers the sending of response headers as well, as the mode has been overriden back to the "default". We have seen ext_proc users of mode_override being affected by these confusing semantics.

It seems far more sensible that a mode_override only affects the processing mode features explicitly set in the mode_override message. Technically this could be a breaking wire change, but it seems unlikely that anyone is relying on the default override, as they would most likely just set response headers to SEND instead of DEFAULT if that was the intended behavior.

This is a protocol change proposal, which will be augmented with implementation if there is agreement on this approach.

Risk level: Medium
Testing: TODO

The mode_override feature has a very surprising behavior, in which unset fields in ProcessingMode,
revert behavior back to the default. For example, it is the default behavior that resposne headers
are sent, but if the filter is configured not to send response headers in processing_mode, and a
mode_override is sent to explicitly send request body, this then inadvertently triggers the sending
of response headers as well, as the mode has been overriden back to the "default". We have seen
ext_proc users of mode_override being affected by these confusing semantics.

It seems far more sensible that a mode_override only affects the procesisng mode features explicitly
set in the mode_override message. Technically this could be a breaking wire change, but it seems
unlikely that anyone is relying on the default override, as they would most likely just set response
headers to SEND instead of DEFAULT if that was the intended behavior.

This is a protocol change proposal, which will be augmented with implementation if there is
agreement on this approach.

Risk level: Medium
Testing: TODO

Signed-off-by: Harvey Tuch <htuch@google.com>
Copy link

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to (api/envoy/|docs/root/api-docs/).
envoyproxy/api-shepherds assignee is @mattklein123
CC @envoyproxy/api-watchers: FYI only for changes made to (api/envoy/|docs/root/api-docs/).

🐱

Caused by: #38254 was opened by htuch.

see: more, trace.

@htuch
Copy link
Member Author

htuch commented Jan 29, 2025

Copy link
Member

@tyxia tyxia left a comment

Choose a reason for hiding this comment

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

Make sense to me, Thanks!

@mattklein123
Copy link
Member

This makes sense to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants