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

#2219 Upgrade Docker, CircleCI and update to net8.0, net9.0 target frameworks #2230

Merged
merged 22 commits into from
Dec 6, 2024

Conversation

raman-m
Copy link
Member

@raman-m raman-m commented Dec 4, 2024

Closes #2219:1-2

Proposed Changes

  • Updated Docker images to be split by framework, aiming to reduce the image size.
  • Updated the target frameworks in project files, particularly the .csproj files.
  • Bumped all packages.
  • Fixed errors, warnings, and messages.
  • Added BDDfy workarounds to reduce the size of both CircleCI and local build logs.

1. to the most recent versions available
2. ideally to version 9.0.*
CS0618: 'DiscoveryApplicationBuilderExtensions.UseDiscoveryClient(IApplicationBuilder)' is obsolete: 'This method call is no longer needed, you should remove it.'

MSB3270: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "C:\Users\rmaks\.nuget\packages\microsoft.servicefabric.data\7.1.2493\lib\netstandard2.0\Microsoft.ServiceFabric.Data.dll", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.

SYSLIB0057: 'X509Certificate2.X509Certificate2(string, string?, X509KeyStorageFlags)' is obsolete: 'Loading certificate data through the constructor or Import is obsolete. Use X509CertificateLoader instead to load certificates.'

Ignore NU1902: Package 'IdentityServer4' 4.1.2 has a known moderate severity vulnerability
The 'Should_be_able_to_use_token_from_ocelot_a_on_ocelot_b' test related to IdentityServer4 requires migration to .NET 9 or removing
@raman-m raman-m changed the title Raman m/2219 docker #2219 Upgrade Docker images, CircleCI configuration and update to net8.0, net9.0 target frameworks Dec 4, 2024
@raman-m raman-m changed the title #2219 Upgrade Docker images, CircleCI configuration and update to net8.0, net9.0 target frameworks #2219 Upgrade Docker, CircleCI configuration and update to net8.0, net9.0 target frameworks Dec 4, 2024
@raman-m raman-m requested review from RaynaldM and ggnaegi December 4, 2024 23:38
@raman-m raman-m self-assigned this Dec 4, 2024
@raman-m raman-m added Core Ocelot Core related or system upgrade (not a public feature) NET9 .NET 9 release labels Dec 4, 2024
@raman-m raman-m added this to the .NET 9 milestone Dec 4, 2024
@raman-m raman-m added the high High priority label Dec 4, 2024
…ucture, expected "Ocelot.AcceptanceTests.Properties"

Where -> \test\Ocelot.AcceptanceTests\Properties\BddfyConfig.cs L4
Warning: Unexpected character sequence in array element value.
Where: samples\Administration\Issue645.postman_collection.json L135+145
…C.SuppressFinalize; or a method that is not an implementation of Dispose calls GC.SuppressFinalize; or a method calls GC.SuppressFinalize and passes something other than this (Me in Visual Basic).

Where: test\Ocelot.AcceptanceTests\HeaderTests.cs L460
…d and enables inlining.

Change type of variable 'client' from 'Ocelot.WebSockets.IClientWebSocket' to 'Ocelot.WebSockets.ClientWebSocketProxy' for improved performance
Where: test\Ocelot.AcceptanceTests\WebSocketTests.cs L128+180
…t thread-safe. Access to such a field must be carefully controlled and requires advanced programming techniques to synchronize access to the class object.

Where: src\Ocelot.Administration\IdentityServerMiddlewareConfigurationProvider.cs L10
Where: test\Ocelot.AcceptanceTests\Properties\BddfyConfig.cs L21
…kely indicate redundant value computations. If the value computation is not redundant and you intend to retain the assignment, then change the assignment target to a local variable whose name starts with an underscore and is optionally followed by an integer, such as '_', '_1', '_2', etc. These are treated as special discard symbol names.
@raman-m raman-m changed the title #2219 Upgrade Docker, CircleCI configuration and update to net8.0, net9.0 target frameworks #2219 Upgrade Docker, CircleCI and update to net8.0, net9.0 target frameworks Dec 5, 2024
@raman-m raman-m merged commit a80fe9d into develop Dec 6, 2024
1 check passed
@raman-m raman-m deleted the raman-m/2219-docker branch December 6, 2024 11:37
@raman-m raman-m mentioned this pull request Dec 6, 2024
5 tasks
raman-m added a commit that referenced this pull request Dec 6, 2024
…t frameworks (#2230)

* Update Docker

* Upgrade all packages and Microsoft artifacts:
1. to the most recent versions available
2. ideally to version 9.0.*

* Fix compilation errors

* Fix warnings except NU1902:

CS0618: 'DiscoveryApplicationBuilderExtensions.UseDiscoveryClient(IApplicationBuilder)' is obsolete: 'This method call is no longer needed, you should remove it.'

MSB3270: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "C:\Users\rmaks\.nuget\packages\microsoft.servicefabric.data\7.1.2493\lib\netstandard2.0\Microsoft.ServiceFabric.Data.dll", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.

SYSLIB0057: 'X509Certificate2.X509Certificate2(string, string?, X509KeyStorageFlags)' is obsolete: 'Loading certificate data through the constructor or Import is obsolete. Use X509CertificateLoader instead to load certificates.'

Ignore NU1902: Package 'IdentityServer4' 4.1.2 has a known moderate severity vulnerability

* Fix IDE messages

* Fix integration tests:
The 'Should_be_able_to_use_token_from_ocelot_a_on_ocelot_b' test related to IdentityServer4 requires migration to .NET 9 or removing

* Build using the Docker image version 9.24.0 (Linux OS, double SDKs)

* Add `BddfyConfig` class to override the default BDDfy report behavior in `Steps`

* Disable BatchProcessors

* IDE0130: Namespace "Ocelot.AcceptanceTests" does not match folder structure, expected "Ocelot.AcceptanceTests.Properties"
Where -> \test\Ocelot.AcceptanceTests\Properties\BddfyConfig.cs L4

* Raynald is refactoring super star!
Warning: Unexpected character sequence in array element value.
Where: samples\Administration\Issue645.postman_collection.json L135+145

* CA1816: A method that is an implementation of Dispose does not call GC.SuppressFinalize; or a method that is not an implementation of Dispose calls GC.SuppressFinalize; or a method calls GC.SuppressFinalize and passes something other than this (Me in Visual Basic).
Where: test\Ocelot.AcceptanceTests\HeaderTests.cs L460

* CA1859: Using concrete types avoids virtual or interface call overhead and enables inlining.
Change type of variable 'client' from 'Ocelot.WebSockets.IClientWebSocket' to 'Ocelot.WebSockets.ClientWebSocketProxy' for improved performance
Where: test\Ocelot.AcceptanceTests\WebSocketTests.cs L128+180

* CA2211: Static fields that are neither constants nor read-only are not thread-safe. Access to such a field must be carefully controlled and requires advanced programming techniques to synchronize access to the class object.
Where: src\Ocelot.Administration\IdentityServerMiddlewareConfigurationProvider.cs L10

* IDE0044: Make field readonly
Where: test\Ocelot.AcceptanceTests\Properties\BddfyConfig.cs L21

* IDE0039 Use local function

* IDE0059 Avoid unnecessary value assignments in your code, as these likely indicate redundant value computations. If the value computation is not redundant and you intend to retain the assignment, then change the assignment target to a local variable whose name starts with an underscore and is optionally followed by an integer, such as '_', '_1', '_2', etc. These are treated as special discard symbol names.

* IDE1006 Naming rule violation: These words must begin with upper case characters

* IDE0079 Remove unnecessary suppression

* IDE0330 Use 'System.Threading.Lock'

* IDE1006 Naming rule violation: These words must begin with upper case characters:
Fix compilation error

* Ignore xUnit1004: Test methods should not be skipped

* Disable Uploading test coverage to https://coveralls.io/github/ThreeMammals/Ocelot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core Ocelot Core related or system upgrade (not a public feature) high High priority NET9 .NET 9 release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

.NET 9: Upgrade plan
2 participants