Skip to content

early_header_mutation: expose CEL config in formatters#45935

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

early_header_mutation: expose CEL config in formatters#45935
kamalmarhubi wants to merge 2 commits into
envoyproxy:mainfrom
kamalmarhubi:push-ztuwtkwpwxpq

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:
early_header_mutation: expose CEL config in formatters

Early header mutation values also use substitution format strings, but the extension had no API surface for configured formatter parsers. Add formatters to the early header mutation config and pass parsed parsers into header 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 (early) 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/http/early_header_mutation/header_mutation:header_mutation_test

Docs Changes: Inline proto documentation for the new formatters field.
Release Notes: Added (early_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 early header mutation 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>
@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: #45935 was opened by kamalmarhubi.

see: more, trace.

@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: #45935 was opened by kamalmarhubi.

see: more, trace.

Early header mutation values also use substitution format strings, but the
extension had no API surface for configured formatter parsers. Add
`formatters` to the early header mutation config and pass parsed parsers
into header mutation construction.

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

Fixes envoyproxy#45420

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 early_header_mutation: Expose CEL config in formatters early_header_mutation: expose CEL config in formatters Jul 2, 2026
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