Skip to content
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

Net9 upgrade #283

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Net9 upgrade #283

wants to merge 4 commits into from

Conversation

vdboots
Copy link

@vdboots vdboots commented Feb 6, 2025

User description

Net 9.0 clean upgrade.


PR Type

Enhancement, Bug fix, Tests


Description

  • Upgraded project to .NET 9.0, including dependencies and configurations.

  • Replaced GeneratedRegex with RegexOptions.Compiled for performance improvements.

  • Updated default dashboard image version to 9.0.

  • Added missing using directives in test files for better clarity and functionality.


Changes walkthrough 📝

Relevant files
Enhancement
12 files
JsonExpressionProcessor.cs
Replaced `GeneratedRegex` with `RegexOptions.Compiled`     
+3/-5     
KubeCtlService.cs
Replaced `GeneratedRegex` with `RegexOptions.Compiled`     
+3/-4     
ComposeExtensions.cs
Added missing `using` directive                                                   
+2/-0     
AspireLiterals.cs
Updated default dashboard image version to 9.0                     
+1/-1     
Aspirate.Cli.csproj
Upgraded target framework to .NET 9.0                                       
+1/-1     
Aspirate.Commands.csproj
Upgraded target framework to .NET 9.0                                       
+1/-1     
Aspirate.Processors.csproj
Upgraded target framework to .NET 9.0                                       
+1/-1     
Aspirate.Secrets.csproj
Upgraded target framework to .NET 9.0                                       
+1/-1     
Aspirate.Services.csproj
Upgraded target framework to .NET 9.0                                       
+1/-1     
Aspirate.Shared.csproj
Upgraded target framework to .NET 9.0                                       
+1/-1     
Aspirate.Tests.csproj
Upgraded target framework to .NET 9.0                                       
+1/-1     
TestApp.csproj
Upgraded target framework to .NET 9.0                                       
+1/-1     
Formatting
1 files
ContainerCompositionService.cs
Removed unnecessary blank line                                                     
+0/-1     
Documentation
1 files
IShellExecutionService.cs
Clarified XML documentation for `ExecuteCommand`                 
+1/-1     
Tests
26 files
ActionExecutorTests.cs
Added missing `using` directives                                                 
+4/-0     
BaseActionTests.cs
Added missing `using` directive                                                   
+2/-0     
InitializeConfigurationActionTests.cs
Added missing `using` directives                                                 
+3/-0     
LoadConfigurationActionTests.cs
Added missing `using` directives                                                 
+2/-0     
PopulateContainerDetailsForProjectsActionTests.cs
Added missing `using` directives                                                 
+5/-0     
ApplyManifestsToClusterActionTests.cs
Added missing `using` directives                                                 
+4/-0     
GenerateAspireManifestActionTests.cs
Added missing `using` directives                                                 
+5/-0     
GenerateDockerComposeManifestActionTests.cs
Added missing `using` directives                                                 
+2/-0     
GenerateKustomizeManifestsActionTests.cs
Added missing `using` directives                                                 
+2/-0     
LoadAspireManifestActionTests.cs
Added missing `using` directives                                                 
+5/-0     
RemoveManifestsToClusterActionTests.cs
Added missing `using` directives                                                 
+4/-0     
PopulateInputsActionTests.cs
Added missing `using` directives                                                 
+4/-0     
SaveSecretsActionTests.cs
Added missing `using` directives                                                 
+4/-0     
DockerComposeBuilderTests.cs
Added missing `using` directives                                                 
+4/-0     
KubernetesDeploymentDataExtensionTests.cs
Added missing `using` directives                                                 
+3/-1     
ContainerProcessorTests.cs
Added missing `using` directives                                                 
+3/-0     
SecretProviderTests.cs
Added missing `using` directives                                                 
+3/-0     
AspirateConfigurationServiceTest.cs
Added missing `using` directives                                                 
+3/-0     
BaseServiceTests.cs
Added missing `using` directive                                                   
+2/-0     
ContainerCompositionServiceTest.cs
Added missing `using` directives                                                 
+6/-0     
ContainerDetailsServiceTests.cs
Added missing `using` directives                                                 
+5/-0     
ContainerOptionsTests.cs
Added missing `using` directives                                                 
+5/-0     
KubeCtlServiceTests.cs
Added missing `using` directives                                                 
+3/-0     
ManifestFileParserServiceTests.cs
Added missing `using` directives                                                 
+6/-0     
ProjectPropertyServiceTests.cs
Added missing `using` directives                                                 
+3/-0     
SecretServiceTests.cs
Added missing `using` directive                                                   
+2/-0     
Configuration changes
2 files
main.yaml
Updated .NET version in CI pipeline                                           
+1/-1     
pull-requests.yaml
Updated .NET version in CI pipeline                                           
+1/-1     
Dependencies
1 files
Directory.Packages.props
Updated package versions for .NET 9.0 compatibility           
+11/-11 

Need help?
  • Type /help how to ... in the comments thread for any questions about Qodo Merge usage.
  • Check out the documentation for more information.
  • vdboots and others added 4 commits January 29, 2025 21:44
    - Change main versions
    - Fix Regex .NET Issues
    - Update packages
    - Update default dashboard version
    - Update pipeline
    Copy link

    qodo-merge-pro bot commented Feb 6, 2025

    Qodo Merge was enabled for this repository. To continue using it, please link your Git account with your Qodo account here.

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
    🧪 PR contains tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Performance

    The new regex pattern is now compiled once and stored in a static field, but consider making it readonly to prevent potential thread-safety issues

    private static readonly Regex PlaceholderPatternRegex = new(@"{([\w.-]+)}", RegexOptions.Compiled);

    Copy link

    qodo-merge-pro bot commented Feb 6, 2025

    Qodo Merge was enabled for this repository. To continue using it, please link your Git account with your Qodo account here.

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Impact
    General
    Add culture-invariant regex matching

    Consider using a thread-safe approach for handling the regex pattern by making
    the regex instance static readonly and thread-safe with RegexOptions.Compiled,
    as it's already implemented.

    src/Aspirate.Processors/Transformation/Json/JsonExpressionProcessor.cs [84]

    -private static readonly Regex PlaceholderPatternRegex = new(@"{([\w.-]+)}", RegexOptions.Compiled);
    +private static readonly Regex PlaceholderPatternRegex = new(@"{([\w.-]+)}", RegexOptions.Compiled | RegexOptions.CultureInvariant);
    • Apply this suggestion
    Suggestion importance[1-10]: 6

    __

    Why: Adding RegexOptions.CultureInvariant improves the robustness of the regex pattern by ensuring consistent behavior across different cultures and locales, which is important for a JSON processor.

    Low

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    1 participant