From 5aab7b28cdbbfff66f73b77b6ddf6c92ff69b453 Mon Sep 17 00:00:00 2001 From: bunkrur Date: Fri, 23 Feb 2024 01:46:30 -0800 Subject: [PATCH 1/3] Update README.md Fix spelling and grammer --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7b6d392d..07f1521b 100644 --- a/README.md +++ b/README.md @@ -47,8 +47,8 @@ - :sparkle: Using `Health Check` for `reporting` the `health` of app infrastructure components. - :sparkle: Using `Docker-Compose` and `Kubernetes` for our deployment mechanism. - :sparkle: Using `Kibana` on top of `Serilog` for `logging`. -- :sparkle: Using `OpenTelemetry` for distributed tracing top of `Jaeger`. -- :sparkle: Using `OpenTelemetry` for monitoring top of `Prometteuse` and `Grafana`. +- :sparkle: Using `OpenTelemetry` for distributed tracing on top of `Jaeger`. +- :sparkle: Using `OpenTelemetry` for monitoring on top of `Prometheus` and `Grafana`. - :sparkle: Using `IdentityServer` for authentication and authorization base on `OpenID-Connect` and `OAuth2`. - :sparkle: Using `Yarp` as a microservices `gateway`. - :sparkle: Using `Kubernetes` to achieve efficient `scaling` and ensure `high availability` for each of our microservices. From 04f7f13e542101c844aab8235d125e4dfb613adb Mon Sep 17 00:00:00 2001 From: Meysam Hadeli <35596795+meysamhadeli@users.noreply.github.com> Date: Fri, 23 Feb 2024 23:38:06 +0100 Subject: [PATCH 2/3] chore: Delete pull_request_template.md --- .github/pull_request_template.md | 39 -------------------------------- 1 file changed, 39 deletions(-) delete mode 100644 .github/pull_request_template.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md deleted file mode 100644 index 64cad0ce..00000000 --- a/.github/pull_request_template.md +++ /dev/null @@ -1,39 +0,0 @@ - - -## What does this PR do? - - - -## Why is it important? - - - -## Related issues - - -- - - - - From c49bdfa8988ea8bf8adb4db536155cc7f9a80ed7 Mon Sep 17 00:00:00 2001 From: Pc Date: Wed, 3 Apr 2024 00:55:50 +0330 Subject: [PATCH 3/3] feat: Update all nuget packages to last version. --- .gitignore | 2 +- src/ApiGateway/Dockerfile | 4 +- src/ApiGateway/dev.Dockerfile | 4 +- src/ApiGateway/src/ApiGateway.csproj | 9 - src/BuildingBlocks/BuildingBlocks.csproj | 199 ++++++++---------- src/BuildingBlocks/Web/BaseController.cs | 3 +- src/Services/Booking/Dockerfile | 4 +- src/Services/Booking/dev.Dockerfile | 4 +- .../Booking/src/Booking/Booking.csproj | 4 +- .../Infrastructure/MediatRExtensions.cs | 2 +- .../IntegrationTest/Integration.Test.csproj | 6 +- src/Services/Flight/Dockerfile | 4 +- src/Services/Flight/dev.Dockerfile | 4 +- .../Infrastructure/MediatRExtensions.cs | 2 +- src/Services/Flight/src/Flight/Flight.csproj | 8 +- .../tests/EndToEndTest/EndToEnd.Test.csproj | 6 +- .../IntegrationTest/Integration.Test.csproj | 6 +- .../Flight/tests/UnitTest/Unit.Test.csproj | 6 +- src/Services/Identity/Dockerfile | 4 +- src/Services/Identity/dev.Dockerfile | 4 +- .../src/Identity.Api/Identity.Api.csproj | 6 +- .../Infrastructure/MediatRExtensions.cs | 2 +- .../Identity/src/Identity/Identity.csproj | 2 +- .../IntegrationTest/Integration.Test.csproj | 6 +- src/Services/Passenger/Dockerfile | 4 +- src/Services/Passenger/dev.Dockerfile | 4 +- .../Infrastructure/MediatRExtensions.cs | 2 +- .../Passenger/src/Passenger/Passenger.csproj | 4 +- .../IntegrationTest/Integration.Test.csproj | 6 +- 29 files changed, 148 insertions(+), 173 deletions(-) diff --git a/.gitignore b/.gitignore index bef04b9a..d0684086 100644 --- a/.gitignore +++ b/.gitignore @@ -436,4 +436,4 @@ fabric.properties *.jwk # Monitoring -.grafana-data +**/grafana-data diff --git a/src/ApiGateway/Dockerfile b/src/ApiGateway/Dockerfile index 2103d123..b3f0d4ed 100644 --- a/src/ApiGateway/Dockerfile +++ b/src/ApiGateway/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk:8.0-preview AS builder +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS builder WORKDIR /src # Setup working directory for the project @@ -26,7 +26,7 @@ WORKDIR /src/ApiGateway/src # and no build, as we did it already RUN dotnet publish -c Release --no-build -o out -FROM mcr.microsoft.com/dotnet/aspnet:8.0-preview +FROM mcr.microsoft.com/dotnet/aspnet:8.0 # Setup working directory for the project WORKDIR /app diff --git a/src/ApiGateway/dev.Dockerfile b/src/ApiGateway/dev.Dockerfile index c177a19f..cdf76bb1 100644 --- a/src/ApiGateway/dev.Dockerfile +++ b/src/ApiGateway/dev.Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk:8.0-preview AS builder +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS builder WORKDIR /src # Setup working directory for the project @@ -29,7 +29,7 @@ WORKDIR /src/ApiGateway/src RUN --mount=type=cache,id=gateway_nuget,target=/root/.nuget/packages \ dotnet publish -c Release --no-build -o out -FROM mcr.microsoft.com/dotnet/aspnet:8.0-preview +FROM mcr.microsoft.com/dotnet/aspnet:8.0 # Setup working directory for the project WORKDIR /app diff --git a/src/ApiGateway/src/ApiGateway.csproj b/src/ApiGateway/src/ApiGateway.csproj index f7204b14..6370e598 100644 --- a/src/ApiGateway/src/ApiGateway.csproj +++ b/src/ApiGateway/src/ApiGateway.csproj @@ -9,13 +9,4 @@ - - - - - - - - - diff --git a/src/BuildingBlocks/BuildingBlocks.csproj b/src/BuildingBlocks/BuildingBlocks.csproj index a017c7a7..17089fd1 100644 --- a/src/BuildingBlocks/BuildingBlocks.csproj +++ b/src/BuildingBlocks/BuildingBlocks.csproj @@ -7,149 +7,136 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - + + - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - + + + + + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - + + + + + + - - - - - - - - - + + + + + + + + + - - + + - + - - - + + + - - - - + + + + - + - - - - - + + + + + - - - - - - - - - - - - - + + + + + + + - - - - - + + + + + - - - + + + - - + + - - - - - + + + + + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - + + + - - - - - + + + + + - - - + + - + - - - + + + diff --git a/src/BuildingBlocks/Web/BaseController.cs b/src/BuildingBlocks/Web/BaseController.cs index ec70ecf8..8f7dc5b6 100644 --- a/src/BuildingBlocks/Web/BaseController.cs +++ b/src/BuildingBlocks/Web/BaseController.cs @@ -1,11 +1,12 @@ using Asp.Versioning; -using AutoMapper; using MediatR; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.DependencyInjection; namespace BuildingBlocks.Web; +using MapsterMapper; + [Route(BaseApiPath)] [ApiController] [ApiVersion("1.0")] diff --git a/src/Services/Booking/Dockerfile b/src/Services/Booking/Dockerfile index 9ccec65b..59e02e02 100644 --- a/src/Services/Booking/Dockerfile +++ b/src/Services/Booking/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk:8.0-preview AS builder +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS builder WORKDIR / # Setup working directory for the project @@ -27,7 +27,7 @@ WORKDIR /Services/Booking/src/Booking.Api # and no build, as we did it already RUN dotnet publish -c Release --no-build -o out -FROM mcr.microsoft.com/dotnet/aspnet:8.0-preview +FROM mcr.microsoft.com/dotnet/aspnet:8.0 # Setup working directory for the project WORKDIR / diff --git a/src/Services/Booking/dev.Dockerfile b/src/Services/Booking/dev.Dockerfile index 212ab555..829770f2 100644 --- a/src/Services/Booking/dev.Dockerfile +++ b/src/Services/Booking/dev.Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk:8.0-preview AS builder +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS builder WORKDIR / # Setup working directory for the project @@ -30,7 +30,7 @@ WORKDIR /Services/Booking/src/Booking.Api RUN --mount=type=cache,id=booking_nuget,target=/root/.nuget/packages\ dotnet publish -c Release --no-build -o out -FROM mcr.microsoft.com/dotnet/aspnet:8.0-preview +FROM mcr.microsoft.com/dotnet/aspnet:8.0 # Setup working directory for the project WORKDIR / diff --git a/src/Services/Booking/src/Booking/Booking.csproj b/src/Services/Booking/src/Booking/Booking.csproj index e1c5ef5d..ad28c22c 100644 --- a/src/Services/Booking/src/Booking/Booking.csproj +++ b/src/Services/Booking/src/Booking/Booking.csproj @@ -7,11 +7,11 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Services/Booking/src/Booking/Extensions/Infrastructure/MediatRExtensions.cs b/src/Services/Booking/src/Booking/Extensions/Infrastructure/MediatRExtensions.cs index 042ed3fa..dfda181e 100644 --- a/src/Services/Booking/src/Booking/Extensions/Infrastructure/MediatRExtensions.cs +++ b/src/Services/Booking/src/Booking/Extensions/Infrastructure/MediatRExtensions.cs @@ -9,7 +9,7 @@ public static class MediatRExtensions { public static IServiceCollection AddCustomMediatR(this IServiceCollection services) { - services.AddMediatR(typeof(BookingRoot).Assembly); + services.AddMediatR(cfg => cfg.RegisterServicesFromAssemblies(typeof(BookingRoot).Assembly)); services.AddTransient(typeof(IPipelineBehavior<,>), typeof(ValidationBehavior<,>)); services.AddTransient(typeof(IPipelineBehavior<,>), typeof(LoggingBehavior<,>)); diff --git a/src/Services/Booking/tests/IntegrationTest/Integration.Test.csproj b/src/Services/Booking/tests/IntegrationTest/Integration.Test.csproj index b100fdfd..ee9e2860 100644 --- a/src/Services/Booking/tests/IntegrationTest/Integration.Test.csproj +++ b/src/Services/Booking/tests/IntegrationTest/Integration.Test.csproj @@ -13,9 +13,9 @@ - - - + + + diff --git a/src/Services/Flight/Dockerfile b/src/Services/Flight/Dockerfile index a3aceddd..27ff239a 100644 --- a/src/Services/Flight/Dockerfile +++ b/src/Services/Flight/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk:8.0-preview AS builder +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS builder WORKDIR / # Setup working directory for the project @@ -27,7 +27,7 @@ WORKDIR /Services/Flight/src/Flight.Api # and no build, as we did it already RUN dotnet publish -c Release --no-build -o out -FROM mcr.microsoft.com/dotnet/aspnet:8.0-preview +FROM mcr.microsoft.com/dotnet/aspnet:8.0 # Setup working directory for the project WORKDIR / diff --git a/src/Services/Flight/dev.Dockerfile b/src/Services/Flight/dev.Dockerfile index 11026f0f..cb4feb38 100644 --- a/src/Services/Flight/dev.Dockerfile +++ b/src/Services/Flight/dev.Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk:8.0-preview AS builder +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS builder WORKDIR / # Setup working directory for the project @@ -30,7 +30,7 @@ WORKDIR /Services/Flight/src/Flight.Api RUN --mount=type=cache,id=flight_nuget,target=/root/.nuget/packages \ dotnet publish -c Release --no-build -o out -FROM mcr.microsoft.com/dotnet/aspnet:8.0-preview +FROM mcr.microsoft.com/dotnet/aspnet:8.0 # Setup working directory for the project WORKDIR / diff --git a/src/Services/Flight/src/Flight/Extensions/Infrastructure/MediatRExtensions.cs b/src/Services/Flight/src/Flight/Extensions/Infrastructure/MediatRExtensions.cs index 9b565e4d..b0672b6d 100644 --- a/src/Services/Flight/src/Flight/Extensions/Infrastructure/MediatRExtensions.cs +++ b/src/Services/Flight/src/Flight/Extensions/Infrastructure/MediatRExtensions.cs @@ -11,7 +11,7 @@ public static class MediatRExtensions { public static IServiceCollection AddCustomMediatR(this IServiceCollection services) { - services.AddMediatR(typeof(FlightRoot).Assembly); + services.AddMediatR(cfg => cfg.RegisterServicesFromAssemblies(typeof(FlightRoot).Assembly)); services.AddTransient(typeof(IPipelineBehavior<,>), typeof(ValidationBehavior<,>)); services.AddTransient(typeof(IPipelineBehavior<,>), typeof(LoggingBehavior<,>)); services.AddTransient(typeof(IPipelineBehavior<,>), typeof(EfTxBehavior<,>)); diff --git a/src/Services/Flight/src/Flight/Flight.csproj b/src/Services/Flight/src/Flight/Flight.csproj index 0b9e03c4..56d2560c 100644 --- a/src/Services/Flight/src/Flight/Flight.csproj +++ b/src/Services/Flight/src/Flight/Flight.csproj @@ -6,13 +6,13 @@ - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Services/Flight/tests/EndToEndTest/EndToEnd.Test.csproj b/src/Services/Flight/tests/EndToEndTest/EndToEnd.Test.csproj index 8726caba..6087ec8b 100644 --- a/src/Services/Flight/tests/EndToEndTest/EndToEnd.Test.csproj +++ b/src/Services/Flight/tests/EndToEndTest/EndToEnd.Test.csproj @@ -14,9 +14,9 @@ - - - + + + diff --git a/src/Services/Flight/tests/IntegrationTest/Integration.Test.csproj b/src/Services/Flight/tests/IntegrationTest/Integration.Test.csproj index ca1dc0a0..0be3ce9f 100644 --- a/src/Services/Flight/tests/IntegrationTest/Integration.Test.csproj +++ b/src/Services/Flight/tests/IntegrationTest/Integration.Test.csproj @@ -13,9 +13,9 @@ - - - + + + diff --git a/src/Services/Flight/tests/UnitTest/Unit.Test.csproj b/src/Services/Flight/tests/UnitTest/Unit.Test.csproj index d4c3137d..c1e64047 100644 --- a/src/Services/Flight/tests/UnitTest/Unit.Test.csproj +++ b/src/Services/Flight/tests/UnitTest/Unit.Test.csproj @@ -13,9 +13,9 @@ - - - + + + diff --git a/src/Services/Identity/Dockerfile b/src/Services/Identity/Dockerfile index f18ef44c..2efb6cfa 100644 --- a/src/Services/Identity/Dockerfile +++ b/src/Services/Identity/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk:8.0-preview AS builder +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS builder # Setup working directory for the project WORKDIR / @@ -26,7 +26,7 @@ WORKDIR /Services/Identity/src/Identity.Api # and no build, as we did it already RUN dotnet publish -c Release --no-build -o out -FROM mcr.microsoft.com/dotnet/aspnet:8.0-preview +FROM mcr.microsoft.com/dotnet/aspnet:8.0 # Setup working directory for the project WORKDIR / diff --git a/src/Services/Identity/dev.Dockerfile b/src/Services/Identity/dev.Dockerfile index 5f59253a..80d3fb50 100644 --- a/src/Services/Identity/dev.Dockerfile +++ b/src/Services/Identity/dev.Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk:8.0-preview AS builder +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS builder # Setup working directory for the project WORKDIR / @@ -29,7 +29,7 @@ WORKDIR /Services/Identity/src/Identity.Api RUN --mount=type=cache,id=identity_nuget,target=/root/.nuget/packages \ dotnet publish -c Release --no-build -o out -FROM mcr.microsoft.com/dotnet/aspnet:8.0-preview +FROM mcr.microsoft.com/dotnet/aspnet:8.0 # Setup working directory for the project WORKDIR / diff --git a/src/Services/Identity/src/Identity.Api/Identity.Api.csproj b/src/Services/Identity/src/Identity.Api/Identity.Api.csproj index 0dd41d77..9f655f08 100644 --- a/src/Services/Identity/src/Identity.Api/Identity.Api.csproj +++ b/src/Services/Identity/src/Identity.Api/Identity.Api.csproj @@ -7,11 +7,7 @@ - - - - - <_ContentIncludedByDefault Remove="keys\is-signing-key-C01EF7C986B61650360AFA59291E65BC.json" /> + diff --git a/src/Services/Identity/src/Identity/Extensions/Infrastructure/MediatRExtensions.cs b/src/Services/Identity/src/Identity/Extensions/Infrastructure/MediatRExtensions.cs index 9755c96a..f51af575 100644 --- a/src/Services/Identity/src/Identity/Extensions/Infrastructure/MediatRExtensions.cs +++ b/src/Services/Identity/src/Identity/Extensions/Infrastructure/MediatRExtensions.cs @@ -11,7 +11,7 @@ public static class MediatRExtensions { public static IServiceCollection AddCustomMediatR(this IServiceCollection services) { - services.AddMediatR(typeof(IdentityRoot).Assembly); + services.AddMediatR(cfg => cfg.RegisterServicesFromAssemblies(typeof(IdentityRoot).Assembly)); services.AddTransient(typeof(IPipelineBehavior<,>), typeof(ValidationBehavior<,>)); services.AddTransient(typeof(IPipelineBehavior<,>), typeof(LoggingBehavior<,>)); diff --git a/src/Services/Identity/src/Identity/Identity.csproj b/src/Services/Identity/src/Identity/Identity.csproj index f7fa9d7b..f054d3f4 100644 --- a/src/Services/Identity/src/Identity/Identity.csproj +++ b/src/Services/Identity/src/Identity/Identity.csproj @@ -6,7 +6,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Services/Identity/tests/IntegrationTest/Integration.Test.csproj b/src/Services/Identity/tests/IntegrationTest/Integration.Test.csproj index 67309335..80d95008 100644 --- a/src/Services/Identity/tests/IntegrationTest/Integration.Test.csproj +++ b/src/Services/Identity/tests/IntegrationTest/Integration.Test.csproj @@ -13,9 +13,9 @@ - - - + + + diff --git a/src/Services/Passenger/Dockerfile b/src/Services/Passenger/Dockerfile index d94b450e..c4827b8f 100644 --- a/src/Services/Passenger/Dockerfile +++ b/src/Services/Passenger/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk:8.0-preview AS builder +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS builder WORKDIR / # Setup working directory for the project @@ -27,7 +27,7 @@ WORKDIR /Services/Passenger/src/Passenger.Api # and no build, as we did it already RUN dotnet publish -c Release --no-build -o out -FROM mcr.microsoft.com/dotnet/aspnet:8.0-preview +FROM mcr.microsoft.com/dotnet/aspnet:8.0 # Setup working directory for the project WORKDIR / diff --git a/src/Services/Passenger/dev.Dockerfile b/src/Services/Passenger/dev.Dockerfile index a59b524e..2d92fa7f 100644 --- a/src/Services/Passenger/dev.Dockerfile +++ b/src/Services/Passenger/dev.Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk:8.0-preview AS builder +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS builder WORKDIR / # Setup working directory for the project @@ -30,7 +30,7 @@ WORKDIR /Services/Passenger/src/Passenger.Api RUN --mount=type=cache,id=passenger_nuget,target=/root/.nuget/packages \ dotnet publish -c Release --no-build -o out -FROM mcr.microsoft.com/dotnet/aspnet:8.0-preview +FROM mcr.microsoft.com/dotnet/aspnet:8.0 # Setup working directory for the project WORKDIR / diff --git a/src/Services/Passenger/src/Passenger/Extensions/Infrastructure/MediatRExtensions.cs b/src/Services/Passenger/src/Passenger/Extensions/Infrastructure/MediatRExtensions.cs index ec8ca4fb..eb7468f6 100644 --- a/src/Services/Passenger/src/Passenger/Extensions/Infrastructure/MediatRExtensions.cs +++ b/src/Services/Passenger/src/Passenger/Extensions/Infrastructure/MediatRExtensions.cs @@ -10,7 +10,7 @@ public static class MediatRExtensions { public static IServiceCollection AddCustomMediatR(this IServiceCollection services) { - services.AddMediatR(typeof(PassengerRoot).Assembly); + services.AddMediatR(cfg => cfg.RegisterServicesFromAssemblies(typeof(PassengerRoot).Assembly)); services.AddTransient(typeof(IPipelineBehavior<,>), typeof(ValidationBehavior<,>)); services.AddTransient(typeof(IPipelineBehavior<,>), typeof(LoggingBehavior<,>)); services.AddTransient(typeof(IPipelineBehavior<,>), typeof(EfTxBehavior<,>)); diff --git a/src/Services/Passenger/src/Passenger/Passenger.csproj b/src/Services/Passenger/src/Passenger/Passenger.csproj index 7718fe19..0b369583 100644 --- a/src/Services/Passenger/src/Passenger/Passenger.csproj +++ b/src/Services/Passenger/src/Passenger/Passenger.csproj @@ -7,8 +7,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Services/Passenger/tests/IntegrationTest/Integration.Test.csproj b/src/Services/Passenger/tests/IntegrationTest/Integration.Test.csproj index 9b417a27..f0516569 100644 --- a/src/Services/Passenger/tests/IntegrationTest/Integration.Test.csproj +++ b/src/Services/Passenger/tests/IntegrationTest/Integration.Test.csproj @@ -13,9 +13,9 @@ - - - + + +