Skip to content

Conversation

@cpakulski
Copy link
Contributor

@cpakulski cpakulski commented Nov 24, 2025

Commit Message:
Use effective context when calling foreign functions.

Additional Description:
This PR fixes an issue when a connection specific foreign function is called from wasm plugin's http or grpc callback. Such callback is invoked on root context and calling a foreign function (like set_filter_state) fails, because root context does not have associated stream. The effective context value is set properly, but was not used when invoking the foreign function. Similar issue has been described in #39797.

Risk Level: Low (affects only foreign functions invoked from http/grpc callback)
Testing: Manual
Docs Changes: yes
Release Notes: yes
Platform Specific Features: no
Runtime guard: yes - envoy.reloadable_features.wasm_use_effective_ctx_for_foreign_functions

@cpakulski cpakulski requested a review from kyessenov as a code owner November 24, 2025 20:52
@repokitteh-read-only
Copy link

CC @envoyproxy/runtime-guard-changes: FYI only for changes made to (source/common/runtime/runtime_features.cc).

🐱

Caused by: #42227 was opened by cpakulski.

see: more, trace.

@cpakulski
Copy link
Contributor Author

/retest

Copy link
Contributor

@adisuissa adisuissa 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!
Assigning a WASM codeowner to review.
/assign @kyessenov

@cpakulski
Copy link
Contributor Author

Thanks for reviewing @adisuissa!

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.

3 participants