aneoconsulting / ArmoniK.Core

Task manager for ArmoniK (submission, scheduling, IO data, monitoring). Implements API located in https://github.com/aneoconsulting/ArmoniK.Api
https://aneoconsulting.github.io/ArmoniK.Core/
GNU Affero General Public License v3.0
10 stars 8 forks source link

Tasks cancellation return an error #438

Closed esoubiran-aneo closed 1 year ago

esoubiran-aneo commented 1 year ago

Hello,

I'm using the endpoint cancelTasks from TasksService. Tasks sended are cancelled but an error occurs and no data a returned.

The Error in Seq ``` MongoDB.Driver.Linq.ExpressionNotSupportedException: Expression not supported: new TaskSummary(Convert(data, TaskSummary)) because constructor parameter other does not match any public field or property. at MongoDB.Driver.Linq.Linq3Implementation.Translators.ExpressionToAggregationExpressionTranslators.NewExpressionToAggregationExpressionTranslator.GetMatchingMember(NewExpression expression, String constructorParameterName) at System.Linq.Enumerable.SelectArrayIterator`2.ToList() at MongoDB.Driver.Linq.Linq3Implementation.Translators.ExpressionToAggregationExpressionTranslators.NewExpressionToAggregationExpressionTranslator.Translate(TranslationContext context, NewExpression expression) at MongoDB.Driver.Linq.Linq3Implementation.Translators.ExpressionToAggregationExpressionTranslators.ExpressionToAggregationExpressionTranslator.TranslateLambdaBody(TranslationContext context, LambdaExpression lambdaExpression, IBsonSerializer parameterSerializer, Boolean asRoot) at MongoDB.Driver.Linq.Linq3Implementation.Translators.ExpressionToPipelineTranslators.SelectMethodToPipelineTranslator.Translate(TranslationContext context, MethodCallExpression expression) at MongoDB.Driver.Linq.Linq3Implementation.Translators.ExpressionToExecutableQueryTranslators.ExpressionToExecutableQueryTranslator.Translate[TDocument,TOutput](MongoQueryProvider`1 provider, Expression expression) at MongoDB.Driver.Linq.Linq3Implementation.MongoQuery`2.ToCursorAsync(CancellationToken cancellationToken) at MongoDB.Driver.IAsyncCursorSourceExtensions.ToListAsync[TDocument](IAsyncCursorSource`1 source, CancellationToken cancellationToken) at ArmoniK.Core.Adapters.MongoDB.TaskTable.FindTasksAsync[T](Expression`1 filter, Expression`1 selector, CancellationToken cancellationToken) in /src/Adaptors/MongoDB/src/TaskTable.cs:line 338 at ArmoniK.Core.Common.gRPC.Services.GrpcTasksService.CancelTasks(CancelTasksRequest request, ServerCallContext context) in /src/Common/src/gRPC/Services/GrpcTasksService.cs:line 203 ```
aneojgurhem commented 1 year ago

Thanks! We will investigate

aneojgurhem commented 1 year ago

Which filter did you put ?

esoubiran-aneo commented 1 year ago

no filter, juste a task id