Skip to content

ext_proc: Support clearing the route cache - #16288

Merged
lizan merged 1 commit into
envoyproxy:mainfrom
gbrail:ext-proc-clear-cache
May 5, 2021
Merged

lizan merged 1 commit into
envoyproxy:mainfrom
gbrail:ext-proc-clear-cache

Conversation

@gbrail

@gbrail gbrail commented May 3, 2021

Copy link
Copy Markdown
Contributor

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
Copy Markdown

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
MutationUtils::applyCommonBodyResponse(response, headers_, data);
});
if (response.response().clear_route_cache()) {
filter_callbacks_->clearRouteCache();

Copy link
Copy Markdown
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
Copy Markdown
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