http: migrate aws_lambda/admission_control/... to exception free#46041
Open
wbpcode wants to merge 1 commit into
Open
http: migrate aws_lambda/admission_control/... to exception free#46041wbpcode wants to merge 1 commit into
wbpcode wants to merge 1 commit into
Conversation
Signed-off-by: wbpcode/wangbaiping <wbphub@gmail.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR continues Envoy’s exception-free migration for HTTP filter factory creation by removing exception-throwing wrappers and directly returning absl::StatusOr<Http::FilterFactoryCb> results from helper factory builders.
Changes:
aws_request_signing: return the helperStatusOrdirectly instead of translating failures intoEnvoyException.aws_lambda: return the helperStatusOrdirectly instead of throwing on non-OK status.admission_control: returnStatusOrdirectly instead ofTHROW_IF_NOT_OK_REF(...)+.value()extraction.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| source/extensions/filters/http/aws_request_signing/config.cc | Removes exception-throwing wrapper and returns helper StatusOr directly for exception-free factory creation. |
| source/extensions/filters/http/aws_lambda/config.cc | Removes exception-throwing wrapper and returns helper StatusOr directly for exception-free factory creation. |
| source/extensions/filters/http/admission_control/config.cc | Replaces throw-on-error extraction with direct StatusOr return to align with exception-free behavior. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Commit Message: http: migrate aws_lambda/admission_control/... to exception free
Additional Description:
Migrate exceptions of these filters to absl::Status and absl::StatusOr.
NOTE: This is AI assisted. But I reviewed all the changes and tests, and also did some manually update.
Risk Level: low.
Testing: unit/integration.
Docs Changes: n/a.
Release Notes: n/a.
Platform Specific Features: n/a.