Giter VIP home page Giter VIP logo

framework's People

Contributors

0nary avatar cdavernas avatar jbbianchi avatar neuroglia-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

framework's Issues

Update Jint package to latest stable

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

Be more explicit when a background service is missing.

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.

Test Data.Repositories run endlessly

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'.

Implement Sessions in Mongo repository

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.

Reducer vs Feature in Flux

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

Add `StateVersion` property to IDomainEvent and implementations

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.

Event throw exception when the assembly version is updated.

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.

Screenshots
image

 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)

Add a `Type` to an `IntegrationEvent`

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.

Additional context

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.