Skip to content

Feat/upgrade net9 #42

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

thiagolunardi
Copy link
Collaborator

Upgrade DevStore to .NET9

@EduardoPires EduardoPires marked this pull request as ready for review July 25, 2025 19:10
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request upgrades the DevStore microservices e-commerce application from .NET 6 to .NET 9, modernizing the codebase with updated dependencies, improved configuration patterns, and enhanced Docker infrastructure.

  • Updates all projects to target .NET 9.0 with corresponding package upgrades
  • Modernizes messaging infrastructure by replacing EasyNetQ with MassTransit for RabbitMQ integration
  • Enhances Docker Compose setup with improved health checks, consolidated databases, and better service orchestration

Reviewed Changes

Copilot reviewed 81 out of 341 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
Various Dockerfile files Updated base images from .NET 6.0 to 9.0
Multiple .csproj files Upgraded target framework and NuGet packages to .NET 9 versions
appsettings files Reformatted JSON arrays and updated RabbitMQ configuration structure
Docker compose files Consolidated infrastructure with shared resources and improved orchestration
Core building blocks Updated namespace declarations and modernized C# syntax patterns
Configuration classes Replaced EasyNetQ with MassTransit and simplified API configuration

#endregion

#region Actions
return;
Copy link
Preview

Copilot AI Jul 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The return; statement makes the MapActions method unreachable. This will prevent API endpoints from being registered, breaking the application functionality.

Suggested change
return;

Copilot uses AI. Check for mistakes.

await Task.Delay(delay);
}
// after a few attemps we give up
throw new DatabaseNotFoundException("Error waiting database. Check ConnectionString and ensure database exist");
Copy link
Preview

Copilot AI Jul 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error message contains a grammatical error. 'database exist' should be 'database exists'.

Suggested change
throw new DatabaseNotFoundException("Error waiting database. Check ConnectionString and ensure database exist");
throw new DatabaseNotFoundException("Error waiting database. Check ConnectionString and ensure database exists");

Copilot uses AI. Check for mistakes.

@@ -28,7 +21,7 @@ public ProviderConfiguration(string connString)
options => options.UseSqlServer(_connectionString, sql => sql.MigrationsAssembly(MigrationAssembly));

public Action<DbContextOptionsBuilder> MySql =>
options => options.UseMySql(_connectionString, ServerVersion.AutoDetect(_connectionString), sql => sql.MigrationsAssembly(MigrationAssembly));
options => options.UseMySQL(_connectionString, sql => sql.MigrationsAssembly(MigrationAssembly));
Copy link
Preview

Copilot AI Jul 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The change from UseMySql with ServerVersion.AutoDetect to UseMySQL removes automatic server version detection. This could cause compatibility issues if the MySQL server version requires specific features or syntax.

Suggested change
options => options.UseMySQL(_connectionString, sql => sql.MigrationsAssembly(MigrationAssembly));
options => options.UseMySql(_connectionString, ServerVersion.AutoDetect(_connectionString), sql => sql.MigrationsAssembly(MigrationAssembly));

Copilot uses AI. Check for mistakes.

Copy link
Member

@EduardoPires EduardoPires left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything is fine

@thiagolunardi thiagolunardi deleted the feat/upgrade-net9 branch July 29, 2025 10:38
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.

3 participants