dotnet / dotnet/orleans

Can't move grain interface to another assembly (Orleans 8.2.0)

Open
#9,672 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
10.9k
Forks
2.1k
Avg merge
13h 56m
Merged PRs (30d)
351

Description

Historically I had the interface `IFooGrain` and its implementation `FooGrain` in the same assembly (Foo.dll).
Then I moved `IFooGrain` to another assembly (FooAbstractions.dll) without changing its name and namespace (only assembly has changed).
I have rebuilt the client, but the silo remained the old one.

I was hoping I will be able to communicate to the silo using this grain interface which is the same but moved to another assembly.

I was wrong.

At first I was getting the `System.TypeLoadException` - `"Unable to parse or load type Foo.IFooGrain,FooAbstractions"` on the silo side. Understandable.

I applied `GrainInterfaceTypeAttribute` with the old name in the format "TypeName,Assembly" like "Foo.IFooGrain,Foo" but it did not helped either.
Now I was getting `System.ArgumentException` - `"Could not find an implementation for interface Foo.IFooGrain,Foo"` on the client side. I do not know why. Which implementation is the client is looking for?

So I did not managed to solve the issue without redeploying the silo (I do not want to redeploy it on the production cluster though).

Contributor guide

Open the contributing guide

Research direction

No source files or tests are identified. Start by reproducing the Orleans 8.2.0 scenario with an old silo and a rebuilt client, then trace grain-interface type resolution for the reported TypeLoadException and implementation lookup error. Done means determining whether cross-assembly compatibility is supported and documenting the required deployment behavior or a concrete regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.