sillsdev / sillsdev/languageforge-lexbox

delete project fails during tests

Open
#486 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

📦 Lexbox ASP.NET testing
Dominant language
C#
Stars
9
Forks
8
Avg merge
2d 13h
Merged PRs (30d)
49

Description

This issue shows up for the SendNewProject test

server logs:

      => TraceId:be66dfd1be55d694a2810bb68a93e69a => ConnectionId:0HMVT8UTGD489 => RequestPath:/api/project/project/9b48e54b-0b3e-49ac-b333-ac021ef79bb9 RequestId:0HMVT8UTGD489:00000001
      Executed action LexBoxApi.Controllers.ProjectController.DeleteProject (LexBoxApi) in 149.3174ms
info: Microsoft.AspNetCore.Routing.EndpointMiddleware[1]
      => TraceId:be66dfd1be55d694a2810bb68a93e69a => ConnectionId:0HMVT8UTGD489 => RequestPath:/api/project/project/9b48e54b-0b3e-49ac-b333-ac021ef79bb9 RequestId:0HMVT8UTGD489:00000001
      Executed endpoint 'LexBoxApi.Controllers.ProjectController.DeleteProject (LexBoxApi)'
info: Microsoft.AspNetCore.HttpLogging.HttpLoggingMiddleware[2]
      => TraceId:be66dfd1be55d694a2810bb68a93e69a => ConnectionId:0HMVT8UTGD489 => RequestPath:/api/project/project/9b48e54b-0b3e-49ac-b333-ac021ef79bb9 RequestId:0HMVT8UTGD489:00000001
      Response:
      StatusCode: 200
      lexbox-version: v2023-12-15-fc398df8
fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[1]
      => TraceId:be66dfd1be55d694a2810bb68a93e69a => ConnectionId:0HMVT8UTGD489 => RequestPath:/api/project/project/9b48e54b-0b3e-49ac-b333-ac021ef79bb9 RequestId:0HMVT8UTGD489:00000001
      An unhandled exception has occurred while executing the request.
      System.IO.IOException: Directory not empty : '/hg-repos/kevin-test-01/.hg/store/data'
         at System.IO.FileSystem.RemoveDirectoryRecursive(String fullPath)
         at LexBoxApi.Services.HgService.<>c__DisplayClass8_0.<DeleteRepo>b__0() in /LexBoxApi/Services/HgService.cs:line 77
         at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
      --- End of stack trace from previous location ---
         at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
         at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
      --- End of stack trace from previous location ---
         at LexBoxApi.Services.HgService.DeleteRepo(String code) in /LexBoxApi/Services/HgService.cs:line 77
         at LexBoxApi.Controllers.ProjectController.DeleteProject(Guid id) in /LexBoxApi/Controllers/ProjectController.cs:line 119
         at lambda_method1360(Closure, Object)
         at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
         at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Logged|12_1(ControllerActionInvoker invoker)
         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>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
         at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
         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|7_0(Endpoint endpoint, Task requestTask, ILogger logger)
         at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
         at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
         at LexSyncReverseProxy.ProxyKernel.<>c.<<UseResumableStatusHack>b__4_0>d.MoveNext() in /SyncReverseProxy/ProxyKernel.cs:line 143
      --- End of stack trace from previous location ---
         at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
         at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
         at Microsoft.AspNetCore.HttpLogging.HttpLoggingMiddleware.InvokeInternal(HttpContext context, HttpLoggingOptions options, HttpLoggingAttribute loggingAttribute, HttpLoggingFields loggingFields)
         at Microsoft.AspNetCore.HttpLogging.HttpLoggingMiddleware.InvokeInternal(HttpContext context, HttpLoggingOptions options, HttpLoggingAttribute loggingAttribute, HttpLoggingFields loggingFields)
         at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.<Invoke>g__Awaited|10_0(ExceptionHandlerMiddlewareImpl middleware, HttpContext context, Task task)
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
      => TraceId:be66dfd1be55d694a2810bb68a93e69a => ConnectionId:0HMVT8UTGD489 => RequestPath:/api/project/project/9b48e54b-0b3e-49ac-b333-ac021ef79bb9 RequestId:0HMVT8UTGD489:00000001
      Request finished HTTP/1.1 DELETE https://staging.languagedepot.org/api/project/project/9b48e54b-0b3e-49ac-b333-ac021ef79bb9 - 500 - application/problem+json;+charset=utf-8 154.4664ms

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the SendNewProject test and inspect LexBoxApi/Services/HgService.cs at line 77, then trace the deletion call from LexBoxApi/Controllers/ProjectController.cs at line 119. Run the test and investigate why repository deletion leaves the .hg/store/data directory non-empty; done means the test completes without the logged IOException.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.