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: Support clearing the route cache #16288

Merged
merged 1 commit into from
May 5, 2021

Conversation

gbrail
Copy link
Contributor

@gbrail gbrail commented May 3, 2021

Commit Message: Support the clear_route_cache parameter on responses
from the remote server

Risk Level: Low. Only enabled if the flag is set.

Testing: New unit test to ensure that the method is called.

Docs Changes: Marked "clear_route_cache" in the API as no longer
"not-implemented".

Release Notes: If the clear_route_cache flag is set on a
response from the external processing server, then the filter will
call the "clearRouteCache" method on the filter state. Processors
should set this flag if they have changed any headers, such as
":path", which may affect routing after the filter runs.

Signed-off-by: Gregory Brail [email protected]

Commit Message: Support the clear_route_cache parameter on responses
from the remote server

Risk Level: Low. Only enabled if the flag is set.

Testing: New unit test to ensure that the method is called.

Docs Changes: Marked "clear_route_cache" in the API as no longer
"not-implemented".

Release Notes: If the clear_route_cache flag is set on a
response from the external processing server, then the filter will
call the "clearRouteCache" method on the filter state. Processors
should set this flag if they have changed any headers, such as
":path", which may affect routing after the filter runs.

Signed-off-by: Gregory Brail <[email protected]>
@repokitteh-read-only
Copy link

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to api/envoy/.
envoyproxy/api-shepherds assignee is @lizan
CC @envoyproxy/api-watchers: FYI only for changes made to api/envoy/.

🐱

Caused by: #16288 was opened by gbrail.

see: more, trace.

@gbrail gbrail marked this pull request as ready for review May 3, 2021 20:21
@gbrail gbrail requested a review from snowp as a code owner May 3, 2021 20:21
@@ -66,6 +69,9 @@ bool ProcessorState::handleBodyResponse(const BodyResponse& response) {
modifyBufferedData([this, &response](Buffer::Instance& data) {
MutationUtils::applyCommonBodyResponse(response, headers_, data);
});
if (response.response().clear_route_cache()) {
filter_callbacks_->clearRouteCache();
Copy link
Member

Choose a reason for hiding this comment

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

Since routing doesn't use the body, does it make sense to clear here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When the body is in buffered mode, it's possible to set headers when responding to the body callback, so it's possible that someone will want this.

@repokitteh-read-only repokitteh-read-only bot removed the api label May 4, 2021
@lizan lizan merged commit b7ce74e into envoyproxy:main May 5, 2021
gokulnair pushed a commit to gokulnair/envoy that referenced this pull request May 6, 2021
Commit Message: Support the clear_route_cache parameter on responses
from the remote server

Risk Level: Low. Only enabled if the flag is set.

Testing: New unit test to ensure that the method is called.

Docs Changes: Marked "clear_route_cache" in the API as no longer
"not-implemented".

Release Notes: If the clear_route_cache flag is set on a
response from the external processing server, then the filter will
call the "clearRouteCache" method on the filter state. Processors
should set this flag if they have changed any headers, such as
":path", which may affect routing after the filter runs.

Signed-off-by: Gregory Brail <[email protected]>
Signed-off-by: Gokul Nair <[email protected]>
gokulnair pushed a commit to gokulnair/envoy that referenced this pull request May 6, 2021
Commit Message: Support the clear_route_cache parameter on responses
from the remote server

Risk Level: Low. Only enabled if the flag is set.

Testing: New unit test to ensure that the method is called.

Docs Changes: Marked "clear_route_cache" in the API as no longer
"not-implemented".

Release Notes: If the clear_route_cache flag is set on a
response from the external processing server, then the filter will
call the "clearRouteCache" method on the filter state. Processors
should set this flag if they have changed any headers, such as
":path", which may affect routing after the filter runs.

Signed-off-by: Gregory Brail <[email protected]>
Signed-off-by: Gokul Nair <[email protected]>
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