Skip to content

thrift: support onLocalReply to inform filters of local replies#21387

Merged
zuercher merged 6 commits intoenvoyproxy:mainfrom
JuniorHsu:onLocalReply
May 26, 2022
Merged

thrift: support onLocalReply to inform filters of local replies#21387
zuercher merged 6 commits intoenvoyproxy:mainfrom
JuniorHsu:onLocalReply

Conversation

@JuniorHsu
Copy link
Copy Markdown
Contributor

Signed-off-by: kuochunghsu kuochunghsu@pinterest.com

Commit Message:
Similar setup with http onLocalReply in #15172

Additional Description:
Risk Level: low
Testing: unit test
Docs Changes: current.yaml
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]

Signed-off-by: kuochunghsu <kuochunghsu@pinterest.com>
@JuniorHsu JuniorHsu requested a review from zuercher as a code owner May 19, 2022 23:49
kuochunghsu added 2 commits May 20, 2022 14:56
Signed-off-by: kuochunghsu <kuochunghsu@pinterest.com>
Signed-off-by: kuochunghsu <kuochunghsu@pinterest.com>

// Continue sending onLocalReply to all filters, but reset the stream once all filters have been
// informed rather than sending the local reply.
ContinueAndResetStream,
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.

Is the description correct? Seems like parent_.sendLocalReply is always called and this causes the stream to be reset after the reply.

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.

you're right. Let me see which makes sense, changing description or implementation.

kuochunghsu added 2 commits May 24, 2022 13:25
Signed-off-by: kuochunghsu <kuochunghsu@pinterest.com>
@JuniorHsu
Copy link
Copy Markdown
Contributor Author

After more deliberation, It would make more sense to let filter stop the response instead of ending stream.
However, currently we don't have use case at the moment.

To reduce risk, I'd like to remove the code for end stream handling for now,
but keep the response struct type for flexibility (i.e., if someone implement end_stream or reset_imminent, the filters still compile).

@zuercher would you mind to take another look? Thanks!

@JuniorHsu
Copy link
Copy Markdown
Contributor Author

/retest

@repokitteh-read-only
Copy link
Copy Markdown

Retrying Azure Pipelines:
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #21387 (comment) was created by @JuniorHsu.

see: more, trace.

Copy link
Copy Markdown
Member

@zuercher zuercher left a comment

Choose a reason for hiding this comment

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

One small thing on the release notes, but otherwise looks good to me.

Signed-off-by: kuochunghsu <kuochunghsu@pinterest.com>
@JuniorHsu JuniorHsu requested a review from zuercher May 25, 2022 18:44
@JuniorHsu
Copy link
Copy Markdown
Contributor Author

/retest

@repokitteh-read-only
Copy link
Copy Markdown

Retrying Azure Pipelines:
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #21387 (comment) was created by @JuniorHsu.

see: more, trace.

Copy link
Copy Markdown
Member

@rgs1 rgs1 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@zuercher zuercher merged commit 9889fc5 into envoyproxy:main May 26, 2022
Amila-Rukshan pushed a commit to Amila-Rukshan/envoy that referenced this pull request Jun 28, 2022
…yproxy#21387)

Notifies filters of local replies.

Risk Level: low, defaults to no-op
Testing: unit tests added
Docs Changes: doxygen comments
Release Notes: added
Signed-off-by: kuochunghsu <kuochunghsu@pinterest.com>
Signed-off-by: Amila Senadheera <amila.15@cse.mrt.ac.lk>
@JuniorHsu JuniorHsu deleted the onLocalReply branch October 2, 2022 06:33
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