Skip to content

ext_proc: propagate detailed GRPC status for fail open#40808

Merged
botengyao merged 11 commits intoenvoyproxy:mainfrom
melginaldi:extproc-fail-open-stats
Aug 28, 2025
Merged

ext_proc: propagate detailed GRPC status for fail open#40808
botengyao merged 11 commits intoenvoyproxy:mainfrom
melginaldi:extproc-fail-open-stats

Conversation

@melginaldi
Copy link
Copy Markdown
Contributor

@melginaldi melginaldi commented Aug 20, 2025

ext_proc: propagate detailed GRPC status for fail open

Commit Message: Propagate detailed GRPC status for fail open rather than always ABORT. In order to have a better understanding of what is causing a request to fail we should log the GRPC status even if fail open is being used.
Additional Description: For backwards compatibility this CL uses optional parameters for call_status with a default value of Grpc::Status::Aborted.

Risk Level: Low
Testing: Added a unit test within ext_proc_integration_test.cc to validate the logged call_status changed accordingly. I did some additional unit testing within the Google codebase for products that use ext_proc.
Docs Changes: N/A
Release Notes: If failure_mode_allowed is true, save the grpc failure status code returned from the ext_proc server in the filter state. Previously all fail-open cases would return call_status Grpc::Status::Aborted.
Platform Specific Features: N/A

Signed-off-by: Melissa Ginaldi meginaldi@google.com

Copy link
Copy Markdown
Contributor

@adisuissa adisuissa left a comment

Choose a reason for hiding this comment

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

Thanks!
Overall LGTM.
Please add a release note (here].

Assigning @yanjunxiang-google as code-owner.
/assign @yanjunxiang-google

Comment thread source/extensions/filters/http/ext_proc/ext_proc.cc Outdated
@repokitteh-read-only
Copy link
Copy Markdown

CC @envoyproxy/runtime-guard-changes: FYI only for changes made to (source/common/runtime/runtime_features.cc).

🐱

Caused by: #40808 was synchronize by melginaldi.

see: more, trace.

@melginaldi
Copy link
Copy Markdown
Contributor Author

Thanks! Overall LGTM. Please add a release note (here].

Assigning @yanjunxiang-google as code-owner. /assign @yanjunxiang-google

Done. Release note is added

Comment thread test/extensions/filters/http/ext_proc/ext_proc_integration_test.cc Outdated
@yanjunxiang-google
Copy link
Copy Markdown
Contributor

yanjunxiang-google commented Aug 25, 2025

Thanks for working on this. Please fix the DCO and other CI errors

@repokitteh-read-only
Copy link
Copy Markdown

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

🐱

Caused by: #40808 was synchronize by melginaldi.

see: more, trace.

@melginaldi melginaldi force-pushed the extproc-fail-open-stats branch from b851831 to d01a0be Compare August 26, 2025 14:21
Signed-off-by: Melissa Ginaldi <mginaldi@google.com>
@melginaldi melginaldi force-pushed the extproc-fail-open-stats branch from d01a0be to 55d351f Compare August 26, 2025 14:21
Signed-off-by: Melissa Ginaldi <mginaldi@google.com>
…tats

Signed-off-by: Melissa Ginaldi <mginaldi@google.com>
Signed-off-by: Melissa Ginaldi <mginaldi@google.com>
Signed-off-by: Melissa Ginaldi <mginaldi@google.com>
…tats

Signed-off-by: Melissa Ginaldi <mginaldi@google.com>
@adisuissa
Copy link
Copy Markdown
Contributor

/retest

@melginaldi
Copy link
Copy Markdown
Contributor Author

Thanks for working on this. Please fix the DCO and other CI errors

I fixed the DCO error. The CI error is unrelated to my PR and its changes. I think #40860 is trying to fix the Envoy/Checks error

…tats

Signed-off-by: Melissa Ginaldi <mginaldi@google.com>
@melginaldi
Copy link
Copy Markdown
Contributor Author

The Envy checks are now passing. This PR is ready for review

@yanjunxiang-google
Copy link
Copy Markdown
Contributor

LGTM

@melginaldi
Copy link
Copy Markdown
Contributor Author

/assign @yanavlasov

Copy link
Copy Markdown
Contributor

@adisuissa adisuissa left a comment

Choose a reason for hiding this comment

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

Small nit, but otherwise LGTM.
Thanks!

Comment thread changelogs/current.yaml Outdated
Signed-off-by: Melissa Ginaldi <mginaldi@google.com>
…tats

Signed-off-by: Melissa Ginaldi <mginaldi@google.com>
@melginaldi melginaldi requested a review from adisuissa August 28, 2025 14:38
Copy link
Copy Markdown
Contributor

@adisuissa adisuissa 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!

Copy link
Copy Markdown
Member

@botengyao botengyao 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!

}

void Filter::onGrpcClose() {
void Filter::onGrpcClose() { onGrpcCloseWithStatus(Grpc::Status::Aborted); }
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.

I was thinking to also expend the status to onGrpcClose method, but this solution is better. Thanks for adding this support.

@botengyao botengyao merged commit 0685d7b into envoyproxy:main Aug 28, 2025
24 checks passed
mmcloud pushed a commit to mmcloud/envoy that referenced this pull request Aug 29, 2025
)

ext_proc: propagate detailed GRPC status for fail open

Commit Message: Propagate detailed GRPC status for fail open rather than
always ABORT. In order to have a better understanding of what is causing
a request to fail we should log the GRPC status even if fail open is
being used.
Additional Description: For backwards compatibility this CL uses
optional parameters for call_status with a default value of
Grpc::Status::Aborted.

Risk Level: Low
Testing: Added a unit test within ext_proc_integration_test.cc to
validate the logged call_status changed accordingly. I did some
additional unit testing within the Google codebase for products that use
ext_proc.
Docs Changes: N/A
Release Notes: If failure_mode_allowed is true, save the grpc failure
status code returned from the ext_proc server in the filter state.
Previously all fail-open cases would return call_status
Grpc::Status::Aborted.
Platform Specific Features: N/A

Signed-off-by: Melissa Ginaldi <meginaldi@google.com>

---------

Signed-off-by: Melissa Ginaldi <mginaldi@google.com>
Signed-off-by: Matthew McLeod <mail@matthewmcleod.co.uk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants