-
Notifications
You must be signed in to change notification settings - Fork 759
Refactor Console Server Architecture #685
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
Conversation
There was a problem hiding this 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 PR refactors the console server architecture by consolidating console functionality from a separate standalone server into the main HTTP server infrastructure. The console now runs on the same HTTP server as the S3 API when enabled, simplifying the architecture and improving code organization.
Key Changes:
- Removed the standalone console server implementation and integrated console functionality into the main HTTP server
- Moved console-related code from
servermodule toadminmodule for better organization - Updated
main.rsto use a unified HTTP server approach, eliminating the need for separate console server startup logic
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| rustfs/src/server/console.rs | Deleted - entire standalone console server implementation removed (410 lines) |
| rustfs/src/admin/console.rs | Enhanced with consolidated console logic including middleware, routing, and utility functions moved from deleted server/console.rs |
| rustfs/src/server/mod.rs | Removed console module exports and test module references |
| rustfs/src/server/http.rs | Integrated console initialization and routing logic into main HTTP server, added conditional console path handling |
| rustfs/src/main.rs | Simplified to use unified start_http_server approach for both S3 and console instead of separate console server |
| rustfs/src/admin/router.rs | Updated to use consolidated console functions and moved CONSOLE_PREFIX constant to admin/console.rs |
| rustfs/src/admin/mod.rs | Added console_test module reference |
| rustfs/src/admin/console_test.rs | Updated import paths to reference admin::console instead of server::console |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Pull Request: Refactor Console Server Architecture
Summary
This PR refactors the console server architecture by consolidating console-related functionality from the
servermodule into theadminmodule, improving code organization and maintainability.The console interface can be started independently, separate from the S3 API. #419
Port 9000 no longer serves the console; the console web server is now run on port 9001, use config
Changes Made
🔄 Architecture Refactoring
rustfs/src/server/console.rstorustfs/src/admin/console.rs📁 File Changes
rustfs/src/server/console.rs(410 lines removed)rustfs/src/admin/console.rs(424 lines modified, +344 additions, -683 deletions)console_test.rsfromserver/toadmin/directory🛠 Code Improvements
🔧 Technical Details
Impact
Files Modified
rustfs/src/admin/console.rs- Enhanced with consolidated console logicrustfs/src/admin/mod.rs- Added console test modulerustfs/src/admin/router.rs- Updated console routingrustfs/src/main.rs- Simplified console server startuprustfs/src/server/http.rs- Improved console integrationrustfs/src/server/mod.rs- Removed console modulerustfs/src/admin/console_test.rs- Moved from server directoryTesting
Type: Refactoring
Scope: Console Server Architecture
Breaking Changes: Port 9000 no longer serves the console; the console web server is now run on port 9001, use config
Dependencies: None