From f8270b86225ea2ece378475d6d22343caec78896 Mon Sep 17 00:00:00 2001 From: Dhirender Singh Date: Fri, 25 Oct 2024 14:52:29 +0200 Subject: [PATCH 1/5] fix(process worker): fix the crashing of pod --- .../Processes.Worker.Library/ProcessExecutionService.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/processes/Processes.Worker.Library/ProcessExecutionService.cs b/src/processes/Processes.Worker.Library/ProcessExecutionService.cs index 03aae8ac07..323114992e 100644 --- a/src/processes/Processes.Worker.Library/ProcessExecutionService.cs +++ b/src/processes/Processes.Worker.Library/ProcessExecutionService.cs @@ -106,7 +106,12 @@ public async Task ExecuteAsync(CancellationToken stoppingToken) } _logger.LogInformation("finished processing process {processId}", process.Id); } - catch (Exception ex) when (ex is not SystemException) + catch (SystemException ex) + { + _logger.LogCritical(ex, "Critical error : processing process {processId} type {processType}: {message}", process.Id, process.ProcessTypeId, ex.Message); + executorRepositories.Clear(); + } + catch (Exception ex) { _logger.LogInformation(ex, "error processing process {processId} type {processType}: {message}", process.Id, process.ProcessTypeId, ex.Message); executorRepositories.Clear(); From 297a030d2f5e960ab84e4260cea21fccd69ca052 Mon Sep 17 00:00:00 2001 From: Dhirender Singh Date: Fri, 25 Oct 2024 15:08:08 +0200 Subject: [PATCH 2/5] update process worker test --- .../ProcessExecutionServiceTests.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/processes/Processes.Worker.Library.Tests/ProcessExecutionServiceTests.cs b/tests/processes/Processes.Worker.Library.Tests/ProcessExecutionServiceTests.cs index b9a8d18465..38a9b33a5d 100644 --- a/tests/processes/Processes.Worker.Library.Tests/ProcessExecutionServiceTests.cs +++ b/tests/processes/Processes.Worker.Library.Tests/ProcessExecutionServiceTests.cs @@ -507,11 +507,10 @@ public async Task ExecuteAsync_WithSystemException_Exits() await _service.ExecuteAsync(CancellationToken.None); // Assert - Environment.ExitCode.Should().Be(1); - A.CallTo(() => _mockLogger.Log(LogLevel.Information, A.That.IsNull(), A.That.Matches(x => x.StartsWith("start processing process")))).MustHaveHappenedOnceExactly(); + A.CallTo(() => _mockLogger.Log(LogLevel.Information, A.That.IsNull(), A.That.Matches(x => x.StartsWith("start processing process")))).MustHaveHappened(3, Times.Exactly); A.CallTo(() => _mockLogger.Log(LogLevel.Information, A.That.IsNotNull(), A._)).MustNotHaveHappened(); A.CallTo(() => _mockLogger.Log(LogLevel.Information, A.That.IsNull(), A.That.Matches(x => x.StartsWith("finished processing process")))).MustNotHaveHappened(); - A.CallTo(() => _mockLogger.Log(LogLevel.Error, A.That.Matches(e => e != null && e.Message == error.Message), $"processing failed with following Exception {error.Message}")).MustHaveHappenedOnceExactly(); + A.CallTo(() => _mockLogger.Log(LogLevel.Critical, A.That.Matches(e => e != null && e.Message == error.Message), A.That.StartsWith($"Critical error : processing process"))).MustHaveHappened(3, Times.Exactly); A.CallTo(() => _portalRepositories.SaveAsync()).MustNotHaveHappened(); } } From 88000ecd0415f9e7e11aaa0dbf7c7ce628d5b2a1 Mon Sep 17 00:00:00 2001 From: Dhirender Singh Date: Fri, 25 Oct 2024 16:43:07 +0200 Subject: [PATCH 3/5] updated nuget package versions --- src/framework/Framework.Async/Directory.Build.props | 2 +- src/framework/Framework.Cors/Directory.Build.props | 2 +- src/framework/Framework.DBAccess/Directory.Build.props | 2 +- src/framework/Framework.DateTimeProvider/Directory.Build.props | 2 +- .../Framework.DependencyInjection/Directory.Build.props | 2 +- .../Framework.ErrorHandling.Controller/Directory.Build.props | 2 +- src/framework/Framework.ErrorHandling.Web/Directory.Build.props | 2 +- src/framework/Framework.ErrorHandling/Directory.Build.props | 2 +- .../Framework.HttpClientExtensions/Directory.Build.props | 2 +- src/framework/Framework.IO/Directory.Build.props | 2 +- src/framework/Framework.Linq/Directory.Build.props | 2 +- src/framework/Framework.Logging/Directory.Build.props | 2 +- src/framework/Framework.Models/Directory.Build.props | 2 +- src/framework/Framework.Seeding/Directory.Build.props | 2 +- src/framework/Framework.Swagger/Directory.Build.props | 2 +- src/framework/Framework.Token/Directory.Build.props | 2 +- src/framework/Framework.Web/Directory.Build.props | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/framework/Framework.Async/Directory.Build.props b/src/framework/Framework.Async/Directory.Build.props index 8fa21cbd24..6e30a7b3ec 100644 --- a/src/framework/Framework.Async/Directory.Build.props +++ b/src/framework/Framework.Async/Directory.Build.props @@ -19,7 +19,7 @@ - 2.12.0 + 2.13.0 diff --git a/src/framework/Framework.Cors/Directory.Build.props b/src/framework/Framework.Cors/Directory.Build.props index 8fa21cbd24..6e30a7b3ec 100644 --- a/src/framework/Framework.Cors/Directory.Build.props +++ b/src/framework/Framework.Cors/Directory.Build.props @@ -19,7 +19,7 @@ - 2.12.0 + 2.13.0 diff --git a/src/framework/Framework.DBAccess/Directory.Build.props b/src/framework/Framework.DBAccess/Directory.Build.props index 8fa21cbd24..6e30a7b3ec 100644 --- a/src/framework/Framework.DBAccess/Directory.Build.props +++ b/src/framework/Framework.DBAccess/Directory.Build.props @@ -19,7 +19,7 @@ - 2.12.0 + 2.13.0 diff --git a/src/framework/Framework.DateTimeProvider/Directory.Build.props b/src/framework/Framework.DateTimeProvider/Directory.Build.props index 8fa21cbd24..6e30a7b3ec 100644 --- a/src/framework/Framework.DateTimeProvider/Directory.Build.props +++ b/src/framework/Framework.DateTimeProvider/Directory.Build.props @@ -19,7 +19,7 @@ - 2.12.0 + 2.13.0 diff --git a/src/framework/Framework.DependencyInjection/Directory.Build.props b/src/framework/Framework.DependencyInjection/Directory.Build.props index 8fa21cbd24..6e30a7b3ec 100644 --- a/src/framework/Framework.DependencyInjection/Directory.Build.props +++ b/src/framework/Framework.DependencyInjection/Directory.Build.props @@ -19,7 +19,7 @@ - 2.12.0 + 2.13.0 diff --git a/src/framework/Framework.ErrorHandling.Controller/Directory.Build.props b/src/framework/Framework.ErrorHandling.Controller/Directory.Build.props index 8fa21cbd24..6e30a7b3ec 100644 --- a/src/framework/Framework.ErrorHandling.Controller/Directory.Build.props +++ b/src/framework/Framework.ErrorHandling.Controller/Directory.Build.props @@ -19,7 +19,7 @@ - 2.12.0 + 2.13.0 diff --git a/src/framework/Framework.ErrorHandling.Web/Directory.Build.props b/src/framework/Framework.ErrorHandling.Web/Directory.Build.props index 8fa21cbd24..6e30a7b3ec 100644 --- a/src/framework/Framework.ErrorHandling.Web/Directory.Build.props +++ b/src/framework/Framework.ErrorHandling.Web/Directory.Build.props @@ -19,7 +19,7 @@ - 2.12.0 + 2.13.0 diff --git a/src/framework/Framework.ErrorHandling/Directory.Build.props b/src/framework/Framework.ErrorHandling/Directory.Build.props index 8fa21cbd24..6e30a7b3ec 100644 --- a/src/framework/Framework.ErrorHandling/Directory.Build.props +++ b/src/framework/Framework.ErrorHandling/Directory.Build.props @@ -19,7 +19,7 @@ - 2.12.0 + 2.13.0 diff --git a/src/framework/Framework.HttpClientExtensions/Directory.Build.props b/src/framework/Framework.HttpClientExtensions/Directory.Build.props index 8fa21cbd24..6e30a7b3ec 100644 --- a/src/framework/Framework.HttpClientExtensions/Directory.Build.props +++ b/src/framework/Framework.HttpClientExtensions/Directory.Build.props @@ -19,7 +19,7 @@ - 2.12.0 + 2.13.0 diff --git a/src/framework/Framework.IO/Directory.Build.props b/src/framework/Framework.IO/Directory.Build.props index 8fa21cbd24..6e30a7b3ec 100644 --- a/src/framework/Framework.IO/Directory.Build.props +++ b/src/framework/Framework.IO/Directory.Build.props @@ -19,7 +19,7 @@ - 2.12.0 + 2.13.0 diff --git a/src/framework/Framework.Linq/Directory.Build.props b/src/framework/Framework.Linq/Directory.Build.props index 8fa21cbd24..6e30a7b3ec 100644 --- a/src/framework/Framework.Linq/Directory.Build.props +++ b/src/framework/Framework.Linq/Directory.Build.props @@ -19,7 +19,7 @@ - 2.12.0 + 2.13.0 diff --git a/src/framework/Framework.Logging/Directory.Build.props b/src/framework/Framework.Logging/Directory.Build.props index 8fa21cbd24..6e30a7b3ec 100644 --- a/src/framework/Framework.Logging/Directory.Build.props +++ b/src/framework/Framework.Logging/Directory.Build.props @@ -19,7 +19,7 @@ - 2.12.0 + 2.13.0 diff --git a/src/framework/Framework.Models/Directory.Build.props b/src/framework/Framework.Models/Directory.Build.props index 8fa21cbd24..6e30a7b3ec 100644 --- a/src/framework/Framework.Models/Directory.Build.props +++ b/src/framework/Framework.Models/Directory.Build.props @@ -19,7 +19,7 @@ - 2.12.0 + 2.13.0 diff --git a/src/framework/Framework.Seeding/Directory.Build.props b/src/framework/Framework.Seeding/Directory.Build.props index 8fa21cbd24..6e30a7b3ec 100644 --- a/src/framework/Framework.Seeding/Directory.Build.props +++ b/src/framework/Framework.Seeding/Directory.Build.props @@ -19,7 +19,7 @@ - 2.12.0 + 2.13.0 diff --git a/src/framework/Framework.Swagger/Directory.Build.props b/src/framework/Framework.Swagger/Directory.Build.props index 8fa21cbd24..6e30a7b3ec 100644 --- a/src/framework/Framework.Swagger/Directory.Build.props +++ b/src/framework/Framework.Swagger/Directory.Build.props @@ -19,7 +19,7 @@ - 2.12.0 + 2.13.0 diff --git a/src/framework/Framework.Token/Directory.Build.props b/src/framework/Framework.Token/Directory.Build.props index 8fa21cbd24..6e30a7b3ec 100644 --- a/src/framework/Framework.Token/Directory.Build.props +++ b/src/framework/Framework.Token/Directory.Build.props @@ -19,7 +19,7 @@ - 2.12.0 + 2.13.0 diff --git a/src/framework/Framework.Web/Directory.Build.props b/src/framework/Framework.Web/Directory.Build.props index 8fa21cbd24..6e30a7b3ec 100644 --- a/src/framework/Framework.Web/Directory.Build.props +++ b/src/framework/Framework.Web/Directory.Build.props @@ -19,7 +19,7 @@ - 2.12.0 + 2.13.0 From 09f891b4b7a6df0795e1114a751df4412ba12825 Mon Sep 17 00:00:00 2001 From: Dhirender Singh Date: Mon, 28 Oct 2024 16:47:34 +0100 Subject: [PATCH 4/5] revert the framework changes --- src/framework/Framework.Async/Directory.Build.props | 2 +- src/framework/Framework.Cors/Directory.Build.props | 2 +- src/framework/Framework.DBAccess/Directory.Build.props | 2 +- src/framework/Framework.DateTimeProvider/Directory.Build.props | 2 +- .../Framework.DependencyInjection/Directory.Build.props | 2 +- .../Framework.ErrorHandling.Controller/Directory.Build.props | 2 +- src/framework/Framework.ErrorHandling.Web/Directory.Build.props | 2 +- src/framework/Framework.ErrorHandling/Directory.Build.props | 2 +- .../Framework.HttpClientExtensions/Directory.Build.props | 2 +- src/framework/Framework.IO/Directory.Build.props | 2 +- src/framework/Framework.Linq/Directory.Build.props | 2 +- src/framework/Framework.Logging/Directory.Build.props | 2 +- src/framework/Framework.Models/Directory.Build.props | 2 +- src/framework/Framework.Seeding/Directory.Build.props | 2 +- src/framework/Framework.Swagger/Directory.Build.props | 2 +- src/framework/Framework.Token/Directory.Build.props | 2 +- src/framework/Framework.Web/Directory.Build.props | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/framework/Framework.Async/Directory.Build.props b/src/framework/Framework.Async/Directory.Build.props index 6e30a7b3ec..8fa21cbd24 100644 --- a/src/framework/Framework.Async/Directory.Build.props +++ b/src/framework/Framework.Async/Directory.Build.props @@ -19,7 +19,7 @@ - 2.13.0 + 2.12.0 diff --git a/src/framework/Framework.Cors/Directory.Build.props b/src/framework/Framework.Cors/Directory.Build.props index 6e30a7b3ec..8fa21cbd24 100644 --- a/src/framework/Framework.Cors/Directory.Build.props +++ b/src/framework/Framework.Cors/Directory.Build.props @@ -19,7 +19,7 @@ - 2.13.0 + 2.12.0 diff --git a/src/framework/Framework.DBAccess/Directory.Build.props b/src/framework/Framework.DBAccess/Directory.Build.props index 6e30a7b3ec..8fa21cbd24 100644 --- a/src/framework/Framework.DBAccess/Directory.Build.props +++ b/src/framework/Framework.DBAccess/Directory.Build.props @@ -19,7 +19,7 @@ - 2.13.0 + 2.12.0 diff --git a/src/framework/Framework.DateTimeProvider/Directory.Build.props b/src/framework/Framework.DateTimeProvider/Directory.Build.props index 6e30a7b3ec..8fa21cbd24 100644 --- a/src/framework/Framework.DateTimeProvider/Directory.Build.props +++ b/src/framework/Framework.DateTimeProvider/Directory.Build.props @@ -19,7 +19,7 @@ - 2.13.0 + 2.12.0 diff --git a/src/framework/Framework.DependencyInjection/Directory.Build.props b/src/framework/Framework.DependencyInjection/Directory.Build.props index 6e30a7b3ec..8fa21cbd24 100644 --- a/src/framework/Framework.DependencyInjection/Directory.Build.props +++ b/src/framework/Framework.DependencyInjection/Directory.Build.props @@ -19,7 +19,7 @@ - 2.13.0 + 2.12.0 diff --git a/src/framework/Framework.ErrorHandling.Controller/Directory.Build.props b/src/framework/Framework.ErrorHandling.Controller/Directory.Build.props index 6e30a7b3ec..8fa21cbd24 100644 --- a/src/framework/Framework.ErrorHandling.Controller/Directory.Build.props +++ b/src/framework/Framework.ErrorHandling.Controller/Directory.Build.props @@ -19,7 +19,7 @@ - 2.13.0 + 2.12.0 diff --git a/src/framework/Framework.ErrorHandling.Web/Directory.Build.props b/src/framework/Framework.ErrorHandling.Web/Directory.Build.props index 6e30a7b3ec..8fa21cbd24 100644 --- a/src/framework/Framework.ErrorHandling.Web/Directory.Build.props +++ b/src/framework/Framework.ErrorHandling.Web/Directory.Build.props @@ -19,7 +19,7 @@ - 2.13.0 + 2.12.0 diff --git a/src/framework/Framework.ErrorHandling/Directory.Build.props b/src/framework/Framework.ErrorHandling/Directory.Build.props index 6e30a7b3ec..8fa21cbd24 100644 --- a/src/framework/Framework.ErrorHandling/Directory.Build.props +++ b/src/framework/Framework.ErrorHandling/Directory.Build.props @@ -19,7 +19,7 @@ - 2.13.0 + 2.12.0 diff --git a/src/framework/Framework.HttpClientExtensions/Directory.Build.props b/src/framework/Framework.HttpClientExtensions/Directory.Build.props index 6e30a7b3ec..8fa21cbd24 100644 --- a/src/framework/Framework.HttpClientExtensions/Directory.Build.props +++ b/src/framework/Framework.HttpClientExtensions/Directory.Build.props @@ -19,7 +19,7 @@ - 2.13.0 + 2.12.0 diff --git a/src/framework/Framework.IO/Directory.Build.props b/src/framework/Framework.IO/Directory.Build.props index 6e30a7b3ec..8fa21cbd24 100644 --- a/src/framework/Framework.IO/Directory.Build.props +++ b/src/framework/Framework.IO/Directory.Build.props @@ -19,7 +19,7 @@ - 2.13.0 + 2.12.0 diff --git a/src/framework/Framework.Linq/Directory.Build.props b/src/framework/Framework.Linq/Directory.Build.props index 6e30a7b3ec..8fa21cbd24 100644 --- a/src/framework/Framework.Linq/Directory.Build.props +++ b/src/framework/Framework.Linq/Directory.Build.props @@ -19,7 +19,7 @@ - 2.13.0 + 2.12.0 diff --git a/src/framework/Framework.Logging/Directory.Build.props b/src/framework/Framework.Logging/Directory.Build.props index 6e30a7b3ec..8fa21cbd24 100644 --- a/src/framework/Framework.Logging/Directory.Build.props +++ b/src/framework/Framework.Logging/Directory.Build.props @@ -19,7 +19,7 @@ - 2.13.0 + 2.12.0 diff --git a/src/framework/Framework.Models/Directory.Build.props b/src/framework/Framework.Models/Directory.Build.props index 6e30a7b3ec..8fa21cbd24 100644 --- a/src/framework/Framework.Models/Directory.Build.props +++ b/src/framework/Framework.Models/Directory.Build.props @@ -19,7 +19,7 @@ - 2.13.0 + 2.12.0 diff --git a/src/framework/Framework.Seeding/Directory.Build.props b/src/framework/Framework.Seeding/Directory.Build.props index 6e30a7b3ec..8fa21cbd24 100644 --- a/src/framework/Framework.Seeding/Directory.Build.props +++ b/src/framework/Framework.Seeding/Directory.Build.props @@ -19,7 +19,7 @@ - 2.13.0 + 2.12.0 diff --git a/src/framework/Framework.Swagger/Directory.Build.props b/src/framework/Framework.Swagger/Directory.Build.props index 6e30a7b3ec..8fa21cbd24 100644 --- a/src/framework/Framework.Swagger/Directory.Build.props +++ b/src/framework/Framework.Swagger/Directory.Build.props @@ -19,7 +19,7 @@ - 2.13.0 + 2.12.0 diff --git a/src/framework/Framework.Token/Directory.Build.props b/src/framework/Framework.Token/Directory.Build.props index 6e30a7b3ec..8fa21cbd24 100644 --- a/src/framework/Framework.Token/Directory.Build.props +++ b/src/framework/Framework.Token/Directory.Build.props @@ -19,7 +19,7 @@ - 2.13.0 + 2.12.0 diff --git a/src/framework/Framework.Web/Directory.Build.props b/src/framework/Framework.Web/Directory.Build.props index 6e30a7b3ec..8fa21cbd24 100644 --- a/src/framework/Framework.Web/Directory.Build.props +++ b/src/framework/Framework.Web/Directory.Build.props @@ -19,7 +19,7 @@ - 2.13.0 + 2.12.0 From b62273bda23cfb40d48cfe10e973950fcc6e240f Mon Sep 17 00:00:00 2001 From: Norbert Truchsess Date: Tue, 29 Oct 2024 12:49:02 +0100 Subject: [PATCH 5/5] handle SocketException and IOException explicitly in external system calls. terminate processworker only when running out of memory. update framework version --- src/framework/Framework.Async/Directory.Build.props | 2 +- src/framework/Framework.Cors/Directory.Build.props | 2 +- src/framework/Framework.DBAccess/Directory.Build.props | 2 +- .../Framework.DateTimeProvider/Directory.Build.props | 2 +- .../Directory.Build.props | 2 +- .../Directory.Build.props | 2 +- .../Framework.ErrorHandling.Web/Directory.Build.props | 2 +- .../Framework.ErrorHandling/Directory.Build.props | 2 +- .../Directory.Build.props | 2 +- .../HttpAsyncResponseMessageExtension.cs | 10 ++++++++-- src/framework/Framework.IO/Directory.Build.props | 2 +- src/framework/Framework.Linq/Directory.Build.props | 2 +- src/framework/Framework.Logging/Directory.Build.props | 2 +- src/framework/Framework.Models/Directory.Build.props | 2 +- src/framework/Framework.Seeding/Directory.Build.props | 2 +- src/framework/Framework.Swagger/Directory.Build.props | 2 +- src/framework/Framework.Token/Directory.Build.props | 2 +- src/framework/Framework.Web/Directory.Build.props | 2 +- .../ProcessExecutionService.cs | 4 ++-- 19 files changed, 27 insertions(+), 21 deletions(-) diff --git a/src/framework/Framework.Async/Directory.Build.props b/src/framework/Framework.Async/Directory.Build.props index 8fa21cbd24..6e30a7b3ec 100644 --- a/src/framework/Framework.Async/Directory.Build.props +++ b/src/framework/Framework.Async/Directory.Build.props @@ -19,7 +19,7 @@ - 2.12.0 + 2.13.0 diff --git a/src/framework/Framework.Cors/Directory.Build.props b/src/framework/Framework.Cors/Directory.Build.props index 8fa21cbd24..6e30a7b3ec 100644 --- a/src/framework/Framework.Cors/Directory.Build.props +++ b/src/framework/Framework.Cors/Directory.Build.props @@ -19,7 +19,7 @@ - 2.12.0 + 2.13.0 diff --git a/src/framework/Framework.DBAccess/Directory.Build.props b/src/framework/Framework.DBAccess/Directory.Build.props index 8fa21cbd24..6e30a7b3ec 100644 --- a/src/framework/Framework.DBAccess/Directory.Build.props +++ b/src/framework/Framework.DBAccess/Directory.Build.props @@ -19,7 +19,7 @@ - 2.12.0 + 2.13.0 diff --git a/src/framework/Framework.DateTimeProvider/Directory.Build.props b/src/framework/Framework.DateTimeProvider/Directory.Build.props index 8fa21cbd24..6e30a7b3ec 100644 --- a/src/framework/Framework.DateTimeProvider/Directory.Build.props +++ b/src/framework/Framework.DateTimeProvider/Directory.Build.props @@ -19,7 +19,7 @@ - 2.12.0 + 2.13.0 diff --git a/src/framework/Framework.DependencyInjection/Directory.Build.props b/src/framework/Framework.DependencyInjection/Directory.Build.props index 8fa21cbd24..6e30a7b3ec 100644 --- a/src/framework/Framework.DependencyInjection/Directory.Build.props +++ b/src/framework/Framework.DependencyInjection/Directory.Build.props @@ -19,7 +19,7 @@ - 2.12.0 + 2.13.0 diff --git a/src/framework/Framework.ErrorHandling.Controller/Directory.Build.props b/src/framework/Framework.ErrorHandling.Controller/Directory.Build.props index 8fa21cbd24..6e30a7b3ec 100644 --- a/src/framework/Framework.ErrorHandling.Controller/Directory.Build.props +++ b/src/framework/Framework.ErrorHandling.Controller/Directory.Build.props @@ -19,7 +19,7 @@ - 2.12.0 + 2.13.0 diff --git a/src/framework/Framework.ErrorHandling.Web/Directory.Build.props b/src/framework/Framework.ErrorHandling.Web/Directory.Build.props index 8fa21cbd24..6e30a7b3ec 100644 --- a/src/framework/Framework.ErrorHandling.Web/Directory.Build.props +++ b/src/framework/Framework.ErrorHandling.Web/Directory.Build.props @@ -19,7 +19,7 @@ - 2.12.0 + 2.13.0 diff --git a/src/framework/Framework.ErrorHandling/Directory.Build.props b/src/framework/Framework.ErrorHandling/Directory.Build.props index 8fa21cbd24..6e30a7b3ec 100644 --- a/src/framework/Framework.ErrorHandling/Directory.Build.props +++ b/src/framework/Framework.ErrorHandling/Directory.Build.props @@ -19,7 +19,7 @@ - 2.12.0 + 2.13.0 diff --git a/src/framework/Framework.HttpClientExtensions/Directory.Build.props b/src/framework/Framework.HttpClientExtensions/Directory.Build.props index 8fa21cbd24..6e30a7b3ec 100644 --- a/src/framework/Framework.HttpClientExtensions/Directory.Build.props +++ b/src/framework/Framework.HttpClientExtensions/Directory.Build.props @@ -19,7 +19,7 @@ - 2.12.0 + 2.13.0 diff --git a/src/framework/Framework.HttpClientExtensions/HttpAsyncResponseMessageExtension.cs b/src/framework/Framework.HttpClientExtensions/HttpAsyncResponseMessageExtension.cs index 1a841ab0de..f4110e507b 100644 --- a/src/framework/Framework.HttpClientExtensions/HttpAsyncResponseMessageExtension.cs +++ b/src/framework/Framework.HttpClientExtensions/HttpAsyncResponseMessageExtension.cs @@ -18,6 +18,7 @@ ********************************************************************************/ using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling; +using System.Net.Sockets; namespace Org.Eclipse.TractusX.Portal.Backend.Framework.HttpClientExtensions; @@ -64,6 +65,10 @@ public static async ValueTask CatchingIntoServiceExceptionF ? new ServiceException($"call to external system {systemName} failed", e, (recoverOptions & RecoverOptions.REQUEST_EXCEPTION) == RecoverOptions.REQUEST_EXCEPTION) : new ServiceException($"call to external system {systemName} failed with statuscode {(int)e.StatusCode.Value}", e, e.StatusCode.Value, (recoverOptions & RecoverOptions.REQUEST_EXCEPTION) == RecoverOptions.REQUEST_EXCEPTION); } + catch (SystemException e) when (e is SocketException or IOException) + { + throw new ServiceException($"call to external system {systemName} failed due to network io", e, (recoverOptions & RecoverOptions.NETWORK) == RecoverOptions.NETWORK); + } catch (TaskCanceledException e) { throw new ServiceException($"call to external system {systemName} failed due to timeout", e, (recoverOptions & RecoverOptions.TIMEOUT) == RecoverOptions.TIMEOUT); @@ -82,7 +87,8 @@ public enum RecoverOptions REQUEST_EXCEPTION = 0b_0000_0010, TIMEOUT = 0b_0000_0100, OTHER_EXCEPTION = 0b_0000_1000, - INFRASTRUCTURE = REQUEST_EXCEPTION | TIMEOUT, - ALLWAYS = RESPONSE_RECEIVED | REQUEST_EXCEPTION | TIMEOUT | OTHER_EXCEPTION + NETWORK = 0b_0001_0000, + INFRASTRUCTURE = REQUEST_EXCEPTION | TIMEOUT | NETWORK, + ALLWAYS = RESPONSE_RECEIVED | REQUEST_EXCEPTION | TIMEOUT | NETWORK | OTHER_EXCEPTION } } diff --git a/src/framework/Framework.IO/Directory.Build.props b/src/framework/Framework.IO/Directory.Build.props index 8fa21cbd24..6e30a7b3ec 100644 --- a/src/framework/Framework.IO/Directory.Build.props +++ b/src/framework/Framework.IO/Directory.Build.props @@ -19,7 +19,7 @@ - 2.12.0 + 2.13.0 diff --git a/src/framework/Framework.Linq/Directory.Build.props b/src/framework/Framework.Linq/Directory.Build.props index 8fa21cbd24..6e30a7b3ec 100644 --- a/src/framework/Framework.Linq/Directory.Build.props +++ b/src/framework/Framework.Linq/Directory.Build.props @@ -19,7 +19,7 @@ - 2.12.0 + 2.13.0 diff --git a/src/framework/Framework.Logging/Directory.Build.props b/src/framework/Framework.Logging/Directory.Build.props index 8fa21cbd24..6e30a7b3ec 100644 --- a/src/framework/Framework.Logging/Directory.Build.props +++ b/src/framework/Framework.Logging/Directory.Build.props @@ -19,7 +19,7 @@ - 2.12.0 + 2.13.0 diff --git a/src/framework/Framework.Models/Directory.Build.props b/src/framework/Framework.Models/Directory.Build.props index 8fa21cbd24..6e30a7b3ec 100644 --- a/src/framework/Framework.Models/Directory.Build.props +++ b/src/framework/Framework.Models/Directory.Build.props @@ -19,7 +19,7 @@ - 2.12.0 + 2.13.0 diff --git a/src/framework/Framework.Seeding/Directory.Build.props b/src/framework/Framework.Seeding/Directory.Build.props index 8fa21cbd24..6e30a7b3ec 100644 --- a/src/framework/Framework.Seeding/Directory.Build.props +++ b/src/framework/Framework.Seeding/Directory.Build.props @@ -19,7 +19,7 @@ - 2.12.0 + 2.13.0 diff --git a/src/framework/Framework.Swagger/Directory.Build.props b/src/framework/Framework.Swagger/Directory.Build.props index 8fa21cbd24..6e30a7b3ec 100644 --- a/src/framework/Framework.Swagger/Directory.Build.props +++ b/src/framework/Framework.Swagger/Directory.Build.props @@ -19,7 +19,7 @@ - 2.12.0 + 2.13.0 diff --git a/src/framework/Framework.Token/Directory.Build.props b/src/framework/Framework.Token/Directory.Build.props index 8fa21cbd24..6e30a7b3ec 100644 --- a/src/framework/Framework.Token/Directory.Build.props +++ b/src/framework/Framework.Token/Directory.Build.props @@ -19,7 +19,7 @@ - 2.12.0 + 2.13.0 diff --git a/src/framework/Framework.Web/Directory.Build.props b/src/framework/Framework.Web/Directory.Build.props index 8fa21cbd24..6e30a7b3ec 100644 --- a/src/framework/Framework.Web/Directory.Build.props +++ b/src/framework/Framework.Web/Directory.Build.props @@ -19,7 +19,7 @@ - 2.12.0 + 2.13.0 diff --git a/src/processes/Processes.Worker.Library/ProcessExecutionService.cs b/src/processes/Processes.Worker.Library/ProcessExecutionService.cs index 323114992e..d2a00a32d0 100644 --- a/src/processes/Processes.Worker.Library/ProcessExecutionService.cs +++ b/src/processes/Processes.Worker.Library/ProcessExecutionService.cs @@ -106,12 +106,12 @@ public async Task ExecuteAsync(CancellationToken stoppingToken) } _logger.LogInformation("finished processing process {processId}", process.Id); } - catch (SystemException ex) + catch (SystemException ex) when (ex is not OutOfMemoryException) { _logger.LogCritical(ex, "Critical error : processing process {processId} type {processType}: {message}", process.Id, process.ProcessTypeId, ex.Message); executorRepositories.Clear(); } - catch (Exception ex) + catch (Exception ex) when (ex is not SystemException) { _logger.LogInformation(ex, "error processing process {processId} type {processType}: {message}", process.Id, process.ProcessTypeId, ex.Message); executorRepositories.Clear();