refactor: update package versions, remove deprecated endpoints, and c…#90
Conversation
…lean up unused code
|
Caution Review failedThe pull request is closed. WalkthroughThis update removes the "GetOrderState" API endpoint, its supporting query, handler, and related tests from the Finance service. Associated OpenAPI specs, documentation, and deprecation notices are updated. Several package references are removed or updated, and various middleware, logging, and dashboard features are stripped from the app host and service registration. Some constructors and extension points are simplified, focusing the Finance service on core persistence and saga state machine functionality. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant FinanceAPI
participant (Removed) GetOrderStateEndpoint
participant (Removed) GetOrderStateHandler
%% Old flow (now removed)
Client->>FinanceAPI: GET /order-state-machine
FinanceAPI->>GetOrderStateEndpoint: HandleAsync()
GetOrderStateEndpoint->>GetOrderStateHandler: Handle(query)
GetOrderStateHandler-->>GetOrderStateEndpoint: DOT string
GetOrderStateEndpoint-->>FinanceAPI: 200 OK (DOT string)
FinanceAPI-->>Client: Response
%% New flow (after removal)
Client->>FinanceAPI: GET /order-state-machine
FinanceAPI-->>Client: 404 Not Found (Endpoint deprecated/removed)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested labels
Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (17)
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Pull Request Overview
This PR performs a comprehensive cleanup by removing deprecated endpoints, updating package versions, and eliminating unused code dependencies. The primary focus is on removing the GetOrderStateMachine feature from the Finance service and cleaning up related infrastructure.
Key Changes:
- Removed the deprecated GetOrderStateMachine endpoint and its associated query handler from the Finance service
- Eliminated unused package dependencies (HtmlSanitizer, MassTransit.StateMachineVisualizer)
- Updated Marten.AspNetCore package version from 8.3.3 to 8.4.0
- Streamlined service configurations by removing redundant middleware and endpoint mappings
Reviewed Changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| RequestManager.cs | Removed unused logger dependency and HtmlSanitizer usage, simplified error handling |
| Finance/Program.cs | Removed redundant middleware configurations and endpoint mappings |
| Finance/Infrastructure/Extensions.cs | Deleted entire file containing persistence service configuration |
| GetOrderStateQuery.cs | Removed deprecated query handler for order state machine visualization |
| GetOrderStateEndpoint.cs | Removed deprecated REST endpoint for order state machine |
| Finance/Extensions/Extensions.cs | Consolidated persistence services configuration and removed unused dependencies |
| Finance project files | Removed MassTransit.StateMachineVisualizer package reference and associated unit tests |
| BookWorm.Chassis.csproj | Removed HtmlSanitizer package reference |
| RateLimiterExtensions.cs | Removed HtmlSanitizer usage from rate limiting logging |
| DashboardExtensions.cs | Removed custom dashboard configuration |
| AppHost.cs | Removed Finance API from OpenAPI configuration and custom dashboard setup |
| Documentation files | Marked GetOrderStateMachine endpoint as deprecated in OpenAPI specs and EventCatalog |
| Directory.Packages.props | Updated Marten version and removed unused package references |
| @@ -1,4 +1,4 @@ | |||
| using BookWorm.Chassis.Mediator; | |||
| using BookWorm.Constants.Aspire; | |||
There was a problem hiding this comment.
The using statement for BookWorm.Chassis.Mediator was removed but several related services that likely depend on it (like CommandHandlerMetrics, QueryHandlerMetrics, IActivityScope) were also removed. However, GlobalExceptionHandler is still being registered but its dependency chain should be verified to ensure it doesn't require the removed mediator services.
✅ Deploy Preview for bookwormdev canceled.
|
|



…lean up unused code
Pull Request Description
Checklist
Summary by CodeRabbit
Deprecations
Removals
Bug Fixes
Chores