Skip to content

Make implementation of IExecutionContext independent from DLL #336

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

Make implementation of IExecutionContext independent from DLL #336

wants to merge 12 commits into from

Conversation

mtyrolski
Copy link
Contributor

@mtyrolski mtyrolski commented Apr 23, 2021

Written additional possibility for getting build version of the running service.

  • Deducing manifest file and getting build version:
protected static string? GetBuildVersionFromServiceManifest()

@mtyrolski mtyrolski requested a review from a team as a code owner April 23, 2021 14:10
@mtyrolski mtyrolski requested review from AndreyTretyak, aszczepanski, dyllew3 and dimeehan and removed request for aszczepanski April 30, 2021 15:32
@mtyrolski
Copy link
Contributor Author

 System.TypeInitializationException: The type initializer for 
'Microsoft.Omex.Extensions.Hosting.Services.UnitTests.MockServiceFabricServices' threw an exception. ---> 
System.IO.FileNotFoundException: Could not load file or assembly 'C:\Program Files\Microsoft Service 
Fabric\bin\Fabric\Fabric.Code\NS_8\Microsoft.ServiceFabric.Data.Impl.dll'. The system cannot find the path specified.

    Test method Microsoft.Omex.Extensions.Hosting.Services.Remoting.UnitTests.HostBuilderExtensionsTests.AddRemotingListener_ToStatelessServiceUsingIServiceTypeThatHasRegisteredDependencies_BuildDoesNotThrow threw exception: 
    System.TypeInitializationException: The type initializer for 'Microsoft.Omex.Extensions.Hosting.Services.UnitTests.MockServiceFabricServices' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code\NS_8\Microsoft.ServiceFabric.Data.Impl.dll'. The system cannot find the path specified.
  Stack Trace: 
    AssemblyLoadContext.LoadFromPath(IntPtr ptrNativeAssemblyLoadContext, String ilPath, String niPath, ObjectHandleOnStack retAssembly)
    AssemblyLoadContext.LoadFromAssemblyPath(String assemblyPath)
    Assembly.LoadFrom(String assemblyFile)
    ReliableStateManager.ctor(StatefulServiceContext serviceContext, ReliableStateManagerConfiguration configuration)
    StatefulService.ctor(StatefulServiceContext serviceContext)
    OmexStatefulService.ctor(OmexStatefulServiceRegistrator serviceRegistrator, StatefulServiceContext serviceContext) line 24
    MockServiceFabricServices.cctor() line 28
    --- End of inner exception stack trace ---
    MockServiceFabricServices.get_MockOmexStatelessService() line 17
    HostBuilderExtensionsTests.AddRemotingListener_ToStatelessServiceUsingIServiceTypeThatHasRegisteredDependencies_BuildDoesNotThrow() line 114

@mtyrolski mtyrolski closed this May 12, 2021
@mtyrolski mtyrolski reopened this May 12, 2021
@AndreyTretyak
Copy link
Contributor

This change was started to handle a possible scenario of making SF service build number independent from dll build number.
Currently, there is no plan of making the service version independent, so I think we should not merge this change as it reduces replayability due to dependency on the SF cluster folder structure. But we can leave it for future reference if the need ever arises.

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.

5 participants