neuroglia-io / framework Goto Github PK
View Code? Open in Web Editor NEWA collection of libraries to extend the .NET Framework
License: Apache License 2.0
A collection of libraries to extend the .NET Framework
License: Apache License 2.0
Is your feature request related to a problem? Please describe.
The Jint package used by Neuroglia.Data.Expressions.JavaScript
is in pre-release
Describe the solution you'd like
Update Jint package to latest stable (3.0.0 at the time of the issue's creation), which has breaking changes
When testing an implementation using the CloudEventBus, a null ref exception was throw.
Queue appeared to be null because the background service wasn't provided by the host.
A more explicit error should be displayed throw instead of the null ref.
Describe the bug
When Test Data.Repositories are run in the test workflows the step run endlessly.
Expected behavior
I expected the Test Data.Repositories to run, then return the test result.
Additional context
If we remove .UntilCommandIsCompleted($"mongo {MongoDBContainer.DefaultDatabase}")
from the MongoDBContainerBuilder
and we replace :
- name: Test Data.Repositories
run: dotnet test "${{ env.SOLUTION }}" --no-restore --verbosity normal --filter "FullyQualifiedName~Data.Repositories"
By
- name: Test Data.Repositories.DistributedCacheRepositoryTests
run: dotnet test "${{ env.SOLUTION }}" --no-restore --verbosity normal --filter "FullyQualifiedName~Data.Repositories.DistributedCacheRepositoryTests"
- name: Test Data.Repositories.EFCoreRepositoryTests
run: dotnet test "${{ env.SOLUTION }}" --no-restore --verbosity normal --filter "FullyQualifiedName~Data.Repositories.EFCoreRepositoryTests"
- name: Test Data.Repositories.EventSourcingRepositoryTests
run: dotnet test "${{ env.SOLUTION }}" --no-restore --verbosity normal --filter "FullyQualifiedName~Data.Repositories.EventSourcingRepositoryTests"
- name: Test Data.Repositories.MongoRepositoryTests
run: dotnet test "${{ env.SOLUTION }}" --no-restore --verbosity normal --filter "FullyQualifiedName~Data.Repositories.MongoRepositoryTests"
The tests run 'properly'.
Currently, in DomainException, they have only a method ArgumentMustBeEarlierThan how take only TimeSpan, it will be nice to have one how can take DateTime and one how take DateTimeOffset.
It will be also nice to have a ArgumentMustBeLaterThan how can take DateTimeOffset (currently only TimeSpan and DateTime).
Describe the solution you'd like
Implement sessions in Mongo repository, thus enabling transactions, commited/rolled-back when the (now useless) SaveChangesAsync
method is invoked.
Describe the bug
It seems that the type 'Dynamic' was removed in the new version.
Is there any reason, or is there any replacement?
It is quite useful when serialize the dynamic data to database.
If a Feature
has no Reducer
, it won't be created and it's access will fail. Either allow feature without reducer or log a warning in Neuroglia.Data.Flux
Describe the solution you'd like
Add a StateVersion
property to the IDomainEvent
interface, to allow consumers to achieve idempotency.
Currently, the StateVersion
property of projections is simply incremented each time an event is consumed, breaking optimistic concurrency whenever duplicate events are handled.
As a matter of fact, an hypothetical UserPreferenceChangedDomainEvent
, when duplicated and handled twice, will result in the StateVersion
property of related projections to change, even though the projections did not.
I think they are a redundancy between ArgumentMustBeHigherOrLowerThan and ArgumentMustBeLowerOrHigherThan in Data DomainException.
ArgumentMustBeLowerOrHigherThan should drop because he exists only for int.
Describe the bug
When I update an assembly who defined an event if a change the assembly version the code will throw an exception System.IO.FileNotFoundException: Could not load file or assembly 'assembly, Version=x.x.x, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified..
And your assembly is now at version y.y.y
Expected behavior
Do not try to load a specific assembly version, but only try to load the assembly.
Microsoft.AspNetCore.Server.Kestrel[13]
Connection id "0HMLALECPS4R7", Request id "0HMLALECPS4R7:0000009A": An unhandled exception was thrown by the application.
System.InvalidOperationException: The exception handler configured on ExceptionHandlerOptions produced a 404 status response. This InvalidOperationException containing the original exception was thrown since this is often due to a misconfigured ExceptionHandlingPath. If the exception handler is expected to return 404 status responses then set AllowStatusCode404Response to true.
---> System.IO.FileNotFoundException: Could not load file or assembly 'Souche.Domain, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
File name: 'Souche.Domain, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, StackCrawlMarkHandle stackMark, ObjectHandleOnStack assemblyLoadContext, ObjectHandleOnStack type, ObjectHandleOnStack keepalive)
at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, StackCrawlMark& stackMark, AssemblyLoadContext assemblyLoadContext)
at System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, StackCrawlMark& stackMark)
at System.Type.GetType(String typeName, Boolean throwOnError)
at Neuroglia.Data.EventSourcing.ESEventStore.UnwrapsStoredEventAsync(ResolvedEvent resolvedEvent, CancellationToken cancellationToken)
at Neuroglia.Data.EventSourcing.ESEventStore.ReadEventsForwardAsync(String streamId, Int64 offset, Int64 length, CancellationToken cancellationToken)
at Neuroglia.Data.EventSourcing.ESEventStore.ReadAllEventsForwardAsync(String streamId, CancellationToken cancellationToken)
at Neuroglia.Data.EventSourcing.Services.EventSourcingRepository`2.FindAsync(TKey key, CancellationToken cancellationToken)
at Souche.Application.Commands.Projects.CreateProjectCommandHandler.HandleAsync(CreateProjectCommand command, CancellationToken cancellationToken) in /src/src/Souche.Application/Commands/Projects/CreateProjectCommand.cs:line 184
at Neuroglia.Mediation.FluentValidationMiddleware`2.HandleAsync(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken)
at Neuroglia.Mediation.DomainExceptionHandlingMiddleware`2.HandleAsync(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken)
at Neuroglia.Mediation.RequestPipeline`2.HandleAsync(IRequest`1 request, IServiceProvider serviceProvider, CancellationToken cancellationToken)
at Neuroglia.Mediation.Mediator.ExecuteAsync[TResult](IRequest`1 request, CancellationToken cancellationToken)
at Souche.Api.Controllers.ProjectsController.Create(CreateProjectCommandDto command) in /src/src/Souche.Api/Controllers/ProjetsController.cs:line 54
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
at Microsoft.AspNetCore.Authorization.Policy.AuthorizationMiddlewareResultHandler.HandleAsync(RequestDelegate next, HttpContext context, AuthorizationPolicy policy, PolicyAuthorizationResult authorizeResult)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)
--- End of inner exception stack trace ---
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.HandleException(HttpContext context, ExceptionDispatchInfo edi)
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)
at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)
Is your feature request related to a problem? Please describe.
When an IntegrationEvent is sent over the wire, serialized as JSON for instance, the object type is lost.
Describe the solution you'd like
Add a Type
property.
Describe alternatives you've considered
Most of the time, the IntegrationEvent
will be sent as a CloudEvent, therefore carrying a type, but it might not always be the case.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.