Skip to content

Conversation

satano
Copy link
Contributor

@satano satano commented Apr 7, 2025

Old Ocelot does not support streaming. If big request is routed thorugh Ocelot, it will load all data from downstream into memory and then send it to client. This was fixed in Ocelot 23.

Summary by CodeRabbit

  • Chores

    • Upgraded core projects to .NET 8.0 to harness the latest platform features and performance improvements.
    • Refreshed and streamlined dependency packages, removing obsolete ones for enhanced stability.
  • Tests

    • Updated test tooling dependencies to ensure continued reliability and compatibility.

Copy link

update-docs bot commented Apr 7, 2025

Thanks for opening this pull request! If you have implemented new functions, write about them in the readme file.

Copy link

coderabbitai bot commented Apr 7, 2025

Walkthrough

The changes update several project files to target .NET 8.0 and introduce new package versions. Multiple demo projects have upgraded their target frameworks and modified package references—updating dependencies such as Swashbuckle.AspNetCore and removing the Ocelot reference in some cases. The source project consolidates target frameworks and refreshes several dependency versions. Test projects also have dependency updates for benchmarking and unit test libraries. The modifications are confined to project configuration files.

Changes

File(s) Change Summary
demo/ApiGateway/ApiGateway.csproj TargetFramework: net7.0net8.0; Microsoft.VisualStudio.Web.CodeGeneration.Design updated (7.0.8 → 9.0.0); MMLib.Ocelot.Provider.AppConfiguration updated (2.0.0 → 3.0.0); Ocelot package removed; Swashbuckle.AspNetCore updated (6.5.0 → 8.1.0)
demo/ApiGatewayWithEndpointInterceptor.csproj, demo/ApiGatewayWithPath/ApiGatewayWithPath.csproj TargetFramework: net7.0net8.0; Ocelot package removed; Swashbuckle.AspNetCore updated (6.5.0 → 8.1.0)
demo/ContactService/ContactService.csproj, demo/OrderService/OrderService.csproj, demo/ProjectService/ProjectService.csproj TargetFramework: net7.0net8.0; Swashbuckle.AspNetCore updated (6.5.0 → 8.1.0); (ProjectService maintains MMLib.RapidPrototyping unchanged)
demo/PetstoreService/PetstoreService.csproj TargetFramework: net7.0net8.0
src/MMLib.SwaggerForOcelot/MMLib.SwaggerForOcelot.csproj Consolidated TargetFrameworks to net8.0; Version updated (8.3.2 → 9.0.0); Kros.Utils (2.1.0 → 3.0.2); Microsoft.Extensions.Http (7.0.0 → 9.0.3); Ocelot updated (range → 23.4.3); Swashbuckle.AspNetCore.SwaggerGen & SwaggerUI updated (6.5.0 → 8.1.0)
tests/MMLib.SwaggerForOcelot.BenchmarkTests/MMLib.SwaggerForOcelot.BenchmarkTests.csproj BenchmarkDotNet updated (0.13.6 → 0.14.0)
tests/MMLib.SwaggerForOcelot.Tests/MMLib.SwaggerForOcelot.Tests.csproj Package updates: FluentAssertions (6.11.0 → 8.2.0), Microsoft.NET.Test.Sdk (17.6.3 → 17.13.0), Moq (4.18.4 → 4.20.72), NSubstitute (5.0.0 → 5.3.0), xunit (2.5.0 → 2.9.3), xunit.runner.visualstudio (2.5.0 → 3.0.2)

Poem

Oh, I'm a rabbit, hopping with glee,
Upgrading frameworks as nimble as can be.
Dependencies dance in versions so new,
With every change, our projects renew.
A joyful leap into .NET eight,
CodeRabbit cheers—let's celebrate!
🐰🎉


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 349e2dc and 615d9a4.

📒 Files selected for processing (10)
  • demo/ApiGateway/ApiGateway.csproj (1 hunks)
  • demo/ApiGatewayWithEndpointInterceptor/ApiGatewayWithEndpointInterceptor.csproj (1 hunks)
  • demo/ApiGatewayWithPath/ApiGatewayWithPath.csproj (1 hunks)
  • demo/ContactService/ContactService.csproj (1 hunks)
  • demo/OrderService/OrderService.csproj (2 hunks)
  • demo/PetstoreService/PetstoreService.csproj (1 hunks)
  • demo/ProjectService/ProjectService.csproj (1 hunks)
  • src/MMLib.SwaggerForOcelot/MMLib.SwaggerForOcelot.csproj (2 hunks)
  • tests/MMLib.SwaggerForOcelot.BenchmarkTests/MMLib.SwaggerForOcelot.BenchmarkTests.csproj (1 hunks)
  • tests/MMLib.SwaggerForOcelot.Tests/MMLib.SwaggerForOcelot.Tests.csproj (1 hunks)
🔇 Additional comments (19)
demo/PetstoreService/PetstoreService.csproj (1)

4-4: Framework Upgrade Verification.
The <TargetFramework> has been successfully updated to net8.0, aligning with the new requirements and overall upgrade objectives. Please ensure that all dependencies and project configurations (such as referenced packages and NuGet dependencies) are compatible with .NET 8.0.

demo/ContactService/ContactService.csproj (2)

4-4: Upgrade to .NET 8.0
The target framework has been updated to net8.0, which aligns with the project's modernization efforts and should help leverage the improvements in the new runtime.


8-8: Swashbuckle Package Version Bump
Updating the Swashbuckle.AspNetCore package to version 8.1.0 is consistent with similar changes across the codebase and ensures improved compatibility with .NET 8.0.

demo/OrderService/OrderService.csproj (2)

4-4: Target Framework Upgrade to .NET 8.0
The change to net8.0 ensures that this service is in sync with the other demo projects. This upgrade is critical for utilizing .NET 8.0 features and performance improvements.


13-13: Updated Swashbuckle Reference
The Swashbuckle.AspNetCore package has been updated to version 8.1.0, which is appropriate given the new target framework and should provide better documentation support.

demo/ProjectService/ProjectService.csproj (2)

4-4: Consistent Framework Update
Changing the target framework to net8.0 across demo projects improves consistency and takes advantage of the enhancements available in the newer .NET runtime.


9-9: Swashbuckle Package Update
The update to Swashbuckle.AspNetCore 8.1.0 matches the dependency upgrades in other services, ensuring that API documentation tooling is modernized and compatible with .NET 8.0.

demo/ApiGatewayWithPath/ApiGatewayWithPath.csproj (2)

4-4: Framework Upgrade to .NET 8.0
Upgrading the target framework to net8.0 here is consistent with the overall project update and prepares this service for improved performance and new features.


8-8: Swashbuckle Package Updated
The updated package reference to Swashbuckle.AspNetCore version 8.1.0 ensures that the API documentation functionality remains current and compatible with .NET 8.0.

demo/ApiGateway/ApiGateway.csproj (4)

4-4: Target Framework Modernized to .NET 8.0
The transition to net8.0 is pivotal for adopting the latest .NET features and performance optimizations, and it aligns with the rest of the demo projects.


8-8: Updated Code Generation Tooling
The upgrade of Microsoft.VisualStudio.Web.CodeGeneration.Design to version 9.0.0 indicates improved scaffolding support, which is important when working with the latest framework version.


9-9: Enhanced Ocelot Provider Reference
Updating MMLib.Ocelot.Provider.AppConfiguration from an older version to 3.0.0 reflects progress towards supporting streaming capabilities. This change replaces traditional Ocelot package dependency and should help reduce memory consumption when handling large requests.


10-10: Swashbuckle Package Alignment
Bumping the Swashbuckle.AspNetCore package to version 8.1.0 is a necessary step to maintain consistency across services and to fully benefit from .NET 8.0 enhancements.

tests/MMLib.SwaggerForOcelot.BenchmarkTests/MMLib.SwaggerForOcelot.BenchmarkTests.csproj (1)

15-15: Update BenchmarkDotNet Dependency
The BenchmarkDotNet package reference has been updated to version 0.14.0. Please verify that this new version is fully compatible with the existing benchmark tests and that any necessary configuration changes have been applied.

demo/ApiGatewayWithEndpointInterceptor/ApiGatewayWithEndpointInterceptor.csproj (2)

4-4: Upgrade Target Framework
The target framework has been updated to .NET 8.0. Confirm that all project references and custom code within the project are compatible with .NET 8.0.


9-9: Update Swashbuckle.AspNetCore Package
The package reference for Swashbuckle.AspNetCore has been updated to version 8.1.0. Ensure that any Swagger configurations or customizations are reviewed against potential breaking changes introduced in this newer version.

tests/MMLib.SwaggerForOcelot.Tests/MMLib.SwaggerForOcelot.Tests.csproj (1)

67-74: Update Test Dependencies
Multiple test-related dependencies have been updated:

  • FluentAssertions is now at version 8.2.0.
  • Microsoft.NET.Test.Sdk has been upgraded to 17.13.0.
  • Moq is updated to version 4.20.72.
  • NSubstitute is now at version 5.3.0.
  • xunit has been upgraded to 2.9.3, and xunit.runner.visualstudio to 3.0.2.

Please ensure that these updates do not introduce regressions in the test suite and that all tests run correctly under .NET 8.0.

src/MMLib.SwaggerForOcelot/MMLib.SwaggerForOcelot.csproj (2)

3-4: Consolidate Target Framework and Version Update
The project now targets only net8.0, and the version has been bumped to 9.0.0. This consolidation simplifies the support matrix but may be a breaking change for downstream consumers. Ensure that all related documentation and dependency consumers are made aware of this upgrade.


27-31: Update Package References for Modernization and Streaming Support
The following package references have been updated:

  • Kros.Utils to 3.0.2
  • Microsoft.Extensions.Http to 9.0.3
  • Ocelot to 23.4.3 (this update is critical as it introduces streaming support, addressing previous memory usage issues)
  • Swashbuckle.AspNetCore.SwaggerGen and SwaggerUI to 8.1.0

Please run integration tests to validate that the new Ocelot version and other dependency updates do not introduce unexpected behavior.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@Burgyn Burgyn merged commit 6a6cee3 into Burgyn:master Apr 7, 2025
4 checks 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