Skip to content

Conversation

@Tochemey
Copy link
Owner

@Tochemey Tochemey commented Dec 6, 2025

This PR adds first-class support for propagating context values across remoting calls:

  • Introduced a context_propagator option on remoting config so outbound RemoteAsk/RemoteTell (actors and grains) inject caller context into headers, and inbound handlers extract those values back into the message context.

  • Added a simple header-based propagator and race-safe echo actor to verify propagation end-to-end in tests (ask/tell for both actors and grains).

  • Ensured remoting handler test servers use h2c to match the HTTP/2 client and avoid protocol errors.

@Tochemey
Copy link
Owner Author

Tochemey commented Dec 6, 2025

@sbulman The current design only supports context propagation within a single process. After this PR, context values can be propagated across nodes all the way down to the message handlers; the only additional step is implementing remote.ContextPropagator.

@codecov
Copy link

codecov bot commented Dec 6, 2025

Codecov Report

❌ Patch coverage is 93.90244% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.43%. Comparing base (76849e2) to head (63bab33).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
actor/grain_engine.go 75.00% 2 Missing and 2 partials ⚠️
remote/remoting.go 97.67% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #996      +/-   ##
==========================================
+ Coverage   94.22%   94.43%   +0.20%     
==========================================
  Files         139      139              
  Lines       10999    11070      +71     
==========================================
+ Hits        10364    10454      +90     
+ Misses        414      399      -15     
+ Partials      221      217       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Tochemey Tochemey merged commit 048b17c into main Dec 7, 2025
7 checks passed
@Tochemey Tochemey deleted the issue-ctx branch December 7, 2025 19:32
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