Skip to content

Conversation

@giovanninocco
Copy link
Member

No description provided.

Streamlined service registration in Program.cs by calling AddGenocs directly on the builder object and introducing a Setup method for IGenocsBuilder configuration. Enabled CORS and reordered AddControllers call. Consolidated configuration logic in Extensions.cs by adding a Setup method. Updated RabbitMQOptions to make properties nullable with default values. Upgraded System.Linq.Dynamic.Core to version 1.4.9 in Genocs.QueryBuilder.UnitTests.csproj.
Updated RabbitMQ client implementation to use asynchronous methods and interfaces, improving performance and scalability. Replaced `Send` with `SendAsync` in `IRabbitMQClient`. Updated `RabbitMQClient`, `RabbitMqExchangeInitializer`, `RabbitMqBackgroundService`, and `Extensions` classes to use async methods. Renamed `IRabbitMqSerializer` to `IRabbitMQSerializer` for consistency. Updated `ConcurrentDictionary` to use `IChannel` instead of `IModel`. Upgraded `RabbitMQ.Client` package to 7.0.0. Improved null safety with nullable reference types. Made minor logging and formatting improvements. Ensured consistent camel casing for RabbitMQ-related names.
Refactored constructors for better readability by placing each parameter on a new line and replacing `var` with explicit types where applicable. Modified `Startup.cs` to change `ConfigureServicesAsync` to a synchronous `ConfigureServices` method. Simplified `OrdersController.Get` method using a ternary operator. Updated `Program.cs` to remove `UseCore` and `UseGenocs` method calls, added `app.MapDefaultEndpoints()`, `app.Run()`, `app.UseHttpsRedirection()`, and `app.UseStaticFiles()`, and reformatted `builder` configuration for better readability.
Upgraded Swashbuckle.AspNetCore in Genocs.Core.Demo.WebApi.csproj to 7.1.0.
Upgraded OpenTelemetry packages in Genocs.Tracing.csproj to 1.10.0.
Upgraded Swashbuckle.AspNetCore packages in Genocs.WebApi.Swagger.csproj to 7.1.0.
Changed NotificationId property in NotificationPosted.cs to a regular property.
Refactored multiple methods for better readability and updated several methods to return nullable types. Added XML documentation to `IFabioHttpClient` and updated `README_NUGET.md` to reflect new load balancing focus. Introduced new `BindRequestFromRoute` property in `WebApiOptions`. Removed outdated configurations from `appsettings.development.json` and added new `webApi` section to `appsettings.json`.

Refactor methods and update configurations

Refactored multiple methods for better readability and null safety. Updated `CreateConsulAgentRegistration`, `GetServiceAgentsAsync`, and `DeserializeJsonFromStream` to return nullable types. Refactored `HttpResult` class to use a primary constructor. Added XML documentation to `IFabioHttpClient`. Updated `README_NUGET.md` to reflect new package focus. Added `BindRequestFromRoute` property to `WebApiOptions`. Improved null handling in `ReadJsonAsync`. Removed `prometheus` and `vault` configurations and the empty `appsettings.Development.json`. Added `webApi` section to `appsettings.json`.
Updated solution to include Docker files and local env file. Replaced `application-docker-compose.yml` with `docker-compose.override.yml` and `docker-compose.yml`. Modified `appsettings.json` for new endpoints, Consul, Fabio, logging, metrics, MongoDB, RabbitMQ, and other services. Updated health check endpoints in `Extensions.cs`. Upgraded Dockerfiles to .NET 9.0. Removed versioning and service definitions for API gateway in Docker Compose files. Changed service ports in `docker-compose.yml`. Updated project files to reference new projects and packages. Configured Consul and Fabio in `Program.cs`. Extensively modified `appsettings.json` for orders and identity services. Updated `.dockerignore` to include various patterns.
Extensive modifications to `appsettings.json`:
- Enabled and configured services: seq, consul, fabio, httpClient, jaeger, jwt, metrics, mongodb, outbox, rabbitMq, redis, restEase, swagger, security, and vault.
- Updated logger settings: changed logging level to `debug`, updated excluded paths and properties, added Azure and ELK configurations.

Code refactoring:
- Removed conditional check for `VaultOptions.Enabled` in `Extensions.cs`.
- Refactored `ProductServiceClient.cs` to use `ArgumentNullException.ThrowIfNull` for null checks.
The `azure` logging configuration has been disabled by setting `"enabled": false` in the `appsettings.json` file. Additionally, the `connectionString` for Azure has been cleared, changing from a specific Instrumentation Key and endpoints to an empty string.
- Updated `Microsoft.NET.Test.Sdk` to `17.12.0` in multiple test projects.
- Changed `GetMongoQueryable` return type to `IQueryable<TEntity>` in `IMongoDbBaseRepository.cs` and corresponding implementations.
- Removed unused `using` directives and wrapped commented code in `AzureInitializer.cs`.
- Updated `MongoDB.Driver` to `3.0.0` and `MongoDB.Driver.Core.Extensions.DiagnosticSources` to `2.0.0` in `Genocs.Persistence.MongoDb.csproj`.
- Changed `collection` parameter type to `IQueryable<T>` in `Pagination.cs` methods.
- Updated `OpenTelemetry.Instrumentation.Http` to `1.10.0` in `Genocs.Tracing.csproj`.
Update packages and refactor MongoDB repository methods
@gitguardian
Copy link

gitguardian bot commented Nov 29, 2024

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
6236294 Triggered Generic High Entropy Secret b9e6e8c src/apps/signalr/Genocs.SignalR.WebApi/appsettings.json View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@giovanninocco giovanninocco merged commit 3c4e3fd into master Nov 29, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants