Skip to content

header_mutation: expose CEL config in formatters#45945

Open
kamalmarhubi wants to merge 2 commits into
envoyproxy:mainfrom
kamalmarhubi:push-utkqwspvllnr
Open

header_mutation: expose CEL config in formatters#45945
kamalmarhubi wants to merge 2 commits into
envoyproxy:mainfrom
kamalmarhubi:push-utkqwspvllnr

Conversation

@kamalmarhubi

@kamalmarhubi kamalmarhubi commented Jul 2, 2026

Copy link
Copy Markdown

This is broken out from #45815 after reviewers suggested splitting it up. That PR had lgtm on the API.

NOTE: This PR is stacked on top of #45934. The top commit is the incremental diff.

Commit Message:
header_mutation: expose CEL config in formatters

Header mutation values already use substitution format strings, but the HTTP filter had no API surface for configured formatter parsers. Add formatters to the filter config and thread the parsed parsers through top-level and per-route mutation construction.

Built-in parsers remain available when the field is empty.

Part of #45420

Additional Description: See #45420 for motivation: enabling CEL string functions in header mutations.
AI Disclosure: This was developed by iterating with OpenAI Codex (GPT-5.5), with review and further iteration using Claude Code (Opus 4.8). I reviewed and edited the generated output, understand the submitted changes, and take responsibility for them.
Risk Level: Low
Testing:

bazel test \
  //test/extensions/filters/http/header_mutation:header_mutation_test \
  //test/extensions/filters/http/header_mutation:config_test

Docs Changes: Inline proto documentation for the new formatters field.
Release Notes: Added (header_mutation).
Platform Specific Features: N/A. (The CEL formatter is already excluded on Windows via WINDOWS_SKIP_TARGETS; I haven't changed that.)
API Considerations: adds formatters (repeated config.core.v3.TypedExtensionConfig) to the header mutation Mutations message. This is additive; omitting it preserves existing behaviour.

Add `cel_config` to `envoy.formatter.cel` configuration, allowing CEL
runtime options to be enabled on a per-formatter basis.

This is prerequisite work for envoyproxy#45420 and envoyproxy#45447: both are about enabling
CEL string functions through formatter configuration, but the CEL
formatter extension did not expose the underlying CEL expression runtime
options.

The built-in CEL parser still uses the active server context, so
existing unconfigured CEL formatter command usage is unchanged.

Signed-off-by: Kamal Al Marhubi <kamal@marhubi.com>
@kamalmarhubi kamalmarhubi had a problem deploying to external-contributors July 2, 2026 14:39 — with GitHub Actions Error
@repokitteh-read-only

Copy link
Copy Markdown

Hi @kamalmarhubi, welcome and thank you for your contribution.

We will try to review your Pull Request as quickly as possible.

In the meantime, please take a look at the contribution guidelines if you have not done so already.

🐱

Caused by: #45945 was opened by kamalmarhubi.

see: more, trace.

@repokitteh-read-only

Copy link
Copy Markdown

As a reminder, PRs marked as draft will not be automatically assigned reviewers,
or be handled by maintainer-oncall triage.

Please mark your PR as ready when you want it to be reviewed!

🐱

Caused by: #45945 was opened by kamalmarhubi.

see: more, trace.

Header mutation values already use substitution format strings, but the
HTTP filter had no API surface for configured formatter parsers. Add
`formatters` to the filter config and thread the parsed parsers through
top-level and per-route mutation construction.

Built-in parsers remain available when the field is empty.

Signed-off-by: Kamal Al Marhubi <kamal@marhubi.com>
@kamalmarhubi kamalmarhubi requested a deployment to external-contributors July 2, 2026 14:43 — with GitHub Actions Waiting
@kamalmarhubi kamalmarhubi changed the title header_mutation: Expose CEL config in formatters header_mutation: expose CEL config in formatters Jul 2, 2026
@kamalmarhubi kamalmarhubi marked this pull request as ready for review July 2, 2026 14:43
@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 @mattklein123
CC @envoyproxy/api-watchers: FYI only for changes made to (api/envoy/|docs/root/api-docs/).

🐱

Caused by: #45945 was ready_for_review by kamalmarhubi.

see: more, trace.

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.

2 participants