Repository navigation
fix: invoke observer-level incoming call filters - #11507
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The focused correction uses the existing filter pipeline, and the regression test covers the reported behavior.
0 open findings
What changed in this PR
Fixes observer dispatch so observer-level incoming call filters run even without system-wide filters.
Changes:
- Checks the observer target rather than its weak-reference wrapper.
- Adds regression coverage for filter invocation count, target identity, and result transformation.
- Removes an outdated test-helper comment.
CI coverage results were unavailable.
| File | Description |
|---|---|
| test/Orleans.Core.Tests/Runtime/InvokableObjectManagerTests.cs | Adds the regression test and configurable fixture observer. |
| test/Orleans.Core.Tests/Runtime/DrainTestHelpers.cs | Removes an outdated fast-path comment. |
| src/Orleans.Core/Runtime/InvokableObjectManager.cs | Corrects filter-pipeline selection. |
🧠 Review effort: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Code coverage
Report-only conclusion: regressed. The current-main baseline is commit Coverage combines every CI test matrix job, including providers, CodeGen, .NET 8/10, Linux, Windows, and macOS, using canonical physical source and branch identities. The comparison remains report-only while normal line and branch variance is calibrated. Coverage details |
(cherry picked from commit f1eea86) Upstream-PR: dotnet#11507 Upstream-Commit: f1eea86
Observer-level incoming call filters run through
GrainMethodInvoker, including when no system-wide incoming filters are registered. The pipeline-selection check currently tests theWeakReferencewrapper rather than the observer, causing observer-only filters to be skipped.Check
LocalObject.TargetforIIncomingGrainCallFilterso dispatch selects the filter pipeline for these observers. Add a focused regression test with no system-wide filters which verifies that the observer filter runs once, receives the observer as its target, and transforms the returned result.Reported by Ledjon Behluli (@ledjon-behluli).
Microsoft Reviewers: Open in CodeFlow