Skip to content

ext_proc: add failure_mode_allow per route override#40014

Merged
yanavlasov merged 12 commits intoenvoyproxy:mainfrom
AndresGuedez:feat/ext-proc-failure-mode-override
Jun 27, 2025
Merged

ext_proc: add failure_mode_allow per route override#40014
yanavlasov merged 12 commits intoenvoyproxy:mainfrom
AndresGuedez:feat/ext-proc-failure-mode-override

Conversation

@AndresGuedez
Copy link
Copy Markdown
Contributor

Commit Message: Add failure_mode_allow per route override to the ExtProc filter.
Additional Description:
Risk Level: Low
Testing: Added ext_proc unit tests
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

google-labs-jules bot and others added 7 commits June 23, 2025 19:26
This commit was authored by jules.google (AI agent) with review by
Andres Guedez.

This commit adds a new `failure_mode_allow` field to the `ExtProcOverrides`
message in the ExternalProcessor proto. This allows per-route configuration
to override the default `failure_mode_allow` behavior of the ext_proc filter.

The implementation follows the existing pattern for other overrides in
ext_proc.cc, where the FilterConfigPerRoute constructor checks the
override when initializing fields, and the Filter::mergePerRouteConfig
method applies the override to the filter's effective configuration.

Signed-off-by: Andres Guedez <aguedez@google.com>
This commit was authored by jules.google (AI agent) with review by
Andres Guedez.

This commit adds unit tests to verify the behavior of the
`failure_mode_allow` override in the `ExtProcPerRoute` configuration.

The tests cover scenarios where:
- Filter-level `failure_mode_allow` is true, route override is false.
- Filter-level `failure_mode_allow` is false, route override is true.
- No route override is present, filter-level setting is used.
- Route is disabled, `failure_mode_allow` override is ignored.

Signed-off-by: Andres Guedez <aguedez@google.com>

Signed-off-by: Andres Guedez <aguedez@google.com>
This commit was authored by jules.google (AI agent) with review by
Andres Guedez.

Removes the `has_failure_mode_allow()` check for the boolean field
`failure_mode_allow` in `ExtProcOverrides` as scalar fields do not
have `has_<field>()` methods in Protobuf. The presence of the override
is determined by `config.has_overrides()`.

This resolves a build error.

Signed-off-by: Andres Guedez <aguedez@google.com>

Signed-off-by: Andres Guedez <aguedez@google.com>
Signed-off-by: Andres Guedez <aguedez@google.com>
Signed-off-by: Andres Guedez <aguedez@google.com>
Signed-off-by: Andres Guedez <aguedez@google.com>
… logic.

Signed-off-by: Andres Guedez <aguedez@google.com>
@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 @markdroth
CC @envoyproxy/api-watchers: FYI only for changes made to (api/envoy/|docs/root/api-docs/).

🐱

Caused by: #40014 was opened by AndresGuedez.

see: more, trace.

Signed-off-by: Andres Guedez <aguedez@google.com>
…otobuf.BoolValue to properly incorporate presence checks.

Signed-off-by: Andres Guedez <aguedez@google.com>
@markdroth
Copy link
Copy Markdown
Contributor

/lgtm api

tyxia
tyxia previously approved these changes Jun 26, 2025
Copy link
Copy Markdown
Member

@tyxia tyxia 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

…or refactoring of EXPECT_* argument ordering for consistency.

Signed-off-by: Andres Guedez <aguedez@google.com>
tyxia
tyxia previously approved these changes Jun 27, 2025
Copy link
Copy Markdown
Member

@tyxia tyxia 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

Sorry i missed it in the first pass. Please follow-up with a changelog change as this PR adds a new feature. Example: https://github.com/envoyproxy/envoy/pull/36279/files#diff-6f9c718224c533c13c2c0ba1d5abaab86be9d0cc73808749c77934e9f9b0d5d0

@yanavlasov
Copy link
Copy Markdown
Contributor

@AndresGuedez please add release noted as Tianyu suggests.

/wait

Signed-off-by: Andres Guedez <aguedez@google.com>
@AndresGuedez
Copy link
Copy Markdown
Contributor Author

@AndresGuedez please add release noted as Tianyu suggests.

/wait

Added changelog entry. Thanks!

Signed-off-by: Andres Guedez <aguedez@google.com>
@yanavlasov yanavlasov enabled auto-merge (squash) June 27, 2025 14:53
@yanavlasov yanavlasov merged commit 58fce3a into envoyproxy:main Jun 27, 2025
24 of 25 checks passed
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.

4 participants