early_header_mutation: expose CEL config in formatters#45935
Open
kamalmarhubi wants to merge 2 commits into
Open
early_header_mutation: expose CEL config in formatters#45935kamalmarhubi wants to merge 2 commits into
kamalmarhubi wants to merge 2 commits into
Conversation
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>
|
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. |
|
CC @envoyproxy/api-shepherds: Your approval is needed for changes made to |
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>
1f1b3e0 to
9ea58dc
Compare
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.
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
formattersto 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:
Docs Changes: Inline proto documentation for the new
formattersfield.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.