Skip to content

dynamic_modules: initial support for attributes#38519

Merged
mattklein123 merged 5 commits intoenvoyproxy:mainfrom
mathetake:attributesinitial
Feb 28, 2025
Merged

dynamic_modules: initial support for attributes#38519
mattklein123 merged 5 commits intoenvoyproxy:mainfrom
mathetake:attributesinitial

Conversation

@mathetake
Copy link
Copy Markdown
Member

Commit Message: dynamic_modules: initial support for attributes
Additional Description:

This adds two new callback functions:

  • envoy_dynamic_module_callback_http_filter_get_attribute_string
  • envoy_dynamic_module_callback_http_filter_get_attribute_int

which are similar to dynamic_metadata callbacks. This implements only a subset of attributes and followup PRs will implement the rest little by little.

Risk Level: low
Testing: added
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: n/a

Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
@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: #38519 was opened by mathetake.

see: more, trace.

envoy_dynamic_module_type_attribute_id_XdsUpstreamHostMetadata,
// xds.filter_chain_name
envoy_dynamic_module_type_attribute_id_XdsFilterChainName,
} envoy_dynamic_module_type_attribute_id;
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: the choice of enum vs accepting an opaque "path" is intentional as we've experienced in Wasm that paths resolution is unnecessarily complex and slow look up. IIRC Wasm is planning to migrate this enum style from the opaque "get_property([]string)" style.

*
* Note: currently, not all attributes are implemented.
*/
bool envoy_dynamic_module_callback_http_filter_get_attribute_string(
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: just like the existing dynamic metadata callbacks, each function is typed vs opaque "returning some serialized buffer" as we saw in Wasm. Non-integer/string complex type can be supported later (with some non-protobuf serialization scheme) if someone requests.

@mathetake mathetake mentioned this pull request Feb 20, 2025
11 tasks
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
@mathetake
Copy link
Copy Markdown
Member Author

/coverage

@repokitteh-read-only
Copy link
Copy Markdown

Coverage for this Pull Request will be rendered here:

https://storage.googleapis.com/envoy-pr/38519/coverage/index.html

The coverage results are (re-)rendered each time the CI envoy-presubmit (check linux_x64 coverage) job completes.

🐱

Caused by: a #38519 (comment) was created by @mathetake.

see: more, trace.

Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
@mathetake mathetake marked this pull request as ready for review February 24, 2025 20:44
@mattklein123 mattklein123 merged commit d339b82 into envoyproxy:main Feb 28, 2025
24 checks passed
mathetake added a commit to envoyproxy/dynamic-modules-examples that referenced this pull request Mar 1, 2025
envoyproxy/envoy#38519

---------

Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
@mathetake mathetake deleted the attributesinitial branch March 28, 2025 16:21
jewertow pushed a commit to jewertow/envoy that referenced this pull request Apr 2, 2025
Commit Message: dynamic_modules: initial support for attributes
Additional Description:

This adds two new callback functions:

* envoy_dynamic_module_callback_http_filter_get_attribute_string
* envoy_dynamic_module_callback_http_filter_get_attribute_int

which are similar to dynamic_metadata callbacks. This implements only a
subset of attributes and followup PRs will implement the rest little by
little.

Risk Level: low 
Testing: added
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: n/a

---------

Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
agrawroh pushed a commit to agrawroh/envoy that referenced this pull request Apr 9, 2025
Commit Message: dynamic_modules: initial support for attributes
Additional Description:

This adds two new callback functions:

* envoy_dynamic_module_callback_http_filter_get_attribute_string
* envoy_dynamic_module_callback_http_filter_get_attribute_int

which are similar to dynamic_metadata callbacks. This implements only a
subset of attributes and followup PRs will implement the rest little by
little.

Risk Level: low 
Testing: added
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: n/a

---------

Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
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.

2 participants