Raise better error messages on mismatching Fabric version
revoltez opened this issue · 4 comments
revoltez commented
after adding StreamPrinter.cs
and calling it in deploy.cs
: await PerperContext.CallAsync("StreamPrinter");
running the project should print:
Hello world from Deploy!
Hello world from StreamPrinter!
but executing dotnet run will result in the following Error:
info: Perper.Application.PerperBuilder[0]
APACHE_IGNITE_ENDPOINT: 127.0.0.1:10800
info: Perper.Application.PerperBuilder[0]
PERPER_FABRIC_ENDPOINT: http://127.0.0.1:40400
info: Perper.Application.PerperBuilder[0]
X_PERPER_AGENT: (null)
info: Perper.Application.PerperBuilder[0]
X_PERPER_INSTANCE: (null)
Hello world from Deploy!
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Production
info: Microsoft.Hosting.Lifetime[0]
Content root path: /home/ezio/Desktop/DotnetProjects/MyFirstAgent
fail: Microsoft.Extensions.Hosting.Internal.Host[9]
BackgroundService failed
System.AggregateException: One or more errors occurred. (Status(StatusCode="Unimplemented", Detail="Method not found: perper.Fabric/ReservedExecutions"))
---> Grpc.Core.RpcException: Status(StatusCode="Unimplemented", Detail="Method not found: perper.Fabric/ReservedExecutions")
at Perper.Protocol.FabricService.<>c__DisplayClass35_0.<<Perper-Model-IPerperExecutions-ListenAsync>g__Helper|0>d.MoveNext()
--- End of stack trace from previous location ---
at Perper.Protocol.FabricService.<>c__DisplayClass35_0.<<Perper-Model-IPerperExecutions-ListenAsync>g__Helper|0>d.System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult(Int16 token)
at Perper.Protocol.FabricService.Perper.Model.IPerperExecutions.ListenAsync(PerperExecutionFilter filter, CancellationToken cancellationToken)+MoveNext()
at Perper.Protocol.FabricService.Perper.Model.IPerperExecutions.ListenAsync(PerperExecutionFilter filter, CancellationToken cancellationToken)+MoveNext()
at Perper.Protocol.FabricService.Perper.Model.IPerperExecutions.ListenAsync(PerperExecutionFilter filter, CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult()
at System.Linq.AsyncEnumerable.SelectEnumerableAsyncIterator`2.MoveNextCore() in /_/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Select.cs:line 199
at System.Linq.AsyncIteratorBase`1.MoveNextAsync() in /_/Ix.NET/Source/System.Linq.Async/System/Linq/AsyncIterator.cs:line 70
at System.Linq.AsyncIteratorBase`1.MoveNextAsync() in /_/Ix.NET/Source/System.Linq.Async/System/Linq/AsyncIterator.cs:line 75
at System.Linq.AsyncEnumerable.<ForEachAsync>g__Core|295_0[TSource](IAsyncEnumerable`1 source, Action`1 action, CancellationToken cancellationToken) in /_/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ForEach.cs:line 41
at System.Linq.AsyncEnumerable.<ForEachAsync>g__Core|295_0[TSource](IAsyncEnumerable`1 source, Action`1 action, CancellationToken cancellationToken) in /_/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ForEach.cs:line 41
--- End of inner exception stack trace ---
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
crit: Microsoft.Extensions.Hosting.Internal.Host[10]
The HostOptions.BackgroundServiceExceptionBehavior is configured to StopHost. A BackgroundService has thrown an unhandled exception, and the IHost instance is stopping. To avoid this behavior, configure this to Ignore; however the BackgroundService will not be restarted.
System.AggregateException: One or more errors occurred. (Status(StatusCode="Unimplemented", Detail="Method not found: perper.Fabric/ReservedExecutions"))
---> Grpc.Core.RpcException: Status(StatusCode="Unimplemented", Detail="Method not found: perper.Fabric/ReservedExecutions")
at Perper.Protocol.FabricService.<>c__DisplayClass35_0.<<Perper-Model-IPerperExecutions-ListenAsync>g__Helper|0>d.MoveNext()
--- End of stack trace from previous location ---
at Perper.Protocol.FabricService.<>c__DisplayClass35_0.<<Perper-Model-IPerperExecutions-ListenAsync>g__Helper|0>d.System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult(Int16 token)
at Perper.Protocol.FabricService.Perper.Model.IPerperExecutions.ListenAsync(PerperExecutionFilter filter, CancellationToken cancellationToken)+MoveNext()
at Perper.Protocol.FabricService.Perper.Model.IPerperExecutions.ListenAsync(PerperExecutionFilter filter, CancellationToken cancellationToken)+MoveNext()
at Perper.Protocol.FabricService.Perper.Model.IPerperExecutions.ListenAsync(PerperExecutionFilter filter, CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult()
at System.Linq.AsyncEnumerable.SelectEnumerableAsyncIterator`2.MoveNextCore() in /_/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Select.cs:line 199
at System.Linq.AsyncIteratorBase`1.MoveNextAsync() in /_/Ix.NET/Source/System.Linq.Async/System/Linq/AsyncIterator.cs:line 70
at System.Linq.AsyncIteratorBase`1.MoveNextAsync() in /_/Ix.NET/Source/System.Linq.Async/System/Linq/AsyncIterator.cs:line 75
at System.Linq.AsyncEnumerable.<ForEachAsync>g__Core|295_0[TSource](IAsyncEnumerable`1 source, Action`1 action, CancellationToken cancellationToken) in /_/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ForEach.cs:line 41
at System.Linq.AsyncEnumerable.<ForEachAsync>g__Core|295_0[TSource](IAsyncEnumerable`1 source, Action`1 action, CancellationToken cancellationToken) in /_/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ForEach.cs:line 41
--- End of inner exception stack trace ---
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
info: Microsoft.Hosting.Lifetime[0]
Application is shutting down...
Using:
Perper version 0.8.0-rc1 (previous versions do not implement ConfigurePerper() extension for HostBuilder)
bojidar-bg commented
Make sure the Fabric version you are using matches the version of the agent library. E.g. use perper-fabric:0.8.0-rc1
(:
revoltez commented
Make sure the Fabric version you are using matches the version of the agent library. E.g. use
perper-fabric:0.8.0-rc1
(:
working now, thanks
bojidar-bg commented
Sweet! Going to repurpose the issue to be about error messages, if you don't mind 😁
revoltez commented
@bojidar-bg sounds great