Skip to content
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

Raise better error messages on mismatching Fabric version #108

Open
revoltez opened this issue Nov 20, 2022 · 4 comments
Open

Raise better error messages on mismatching Fabric version #108

revoltez opened this issue Nov 20, 2022 · 4 comments
Labels
enhancement New feature or request
Milestone

Comments

@revoltez
Copy link

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
Copy link
Collaborator

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
Copy link
Author

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 bojidar-bg added the enhancement New feature or request label Nov 20, 2022
@bojidar-bg bojidar-bg changed the title gRPC Error following examples in the docs (Adding and calling another function) Better error messages when Fabric version is mismatched Nov 20, 2022
@bojidar-bg bojidar-bg changed the title Better error messages when Fabric version is mismatched Raise better error messages on mismatching Fabric version Nov 20, 2022
@bojidar-bg
Copy link
Collaborator

Sweet! Going to repurpose the issue to be about error messages, if you don't mind 😁

@bojidar-bg bojidar-bg added this to the Release 0.9 milestone Nov 20, 2022
@revoltez
Copy link
Author

@bojidar-bg sounds great

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants