Reduce sonar issues in server.py
What does this MR do and why?
- Consolidate modded installs to their own class. This will allow for maintainability and scalability in the future
- Reduce cognitive complexity of server starts, server updates, backups.
- Use proper catching on errors/reraises
- While cleaning up fix regex that was problematic for update center. Sonar wanted it changed and I realized it was logically flawed while doing that.
- Append
_to delineate methods that should only be called in server.py...maintainability. - Move much of the backup and update logic to their existing classes.
- Complete TODO that was previously accepted where terminal websockets were being sent to ALL users who had access to the server when in reality we only want users with access to the server who ALSO have terminal permissions to be able to access that websocket communication.
Screenshots or screen recordings
How to set up and validate locally
TESTING
Server Creation:
- Forge
- Neoforge
- Traditional
- Hytale
- Bedrock
Server Starts:
- Forge
- Neoforge
- Traditional
- Hytale
- Bedrock
Server Update:
- Traditional
- Bedrock
- Hytale
General:
- Webhook function
- Crash detection
- Import status
- Terminal output
- Server stats
- Auto Start
- Update Checking
- Archive Backups
- Snapshot Backups
- Dashboard Game Port Accuracy
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
- Have you checked this doesn't interfere/conflict/duplicate someone elses work?
- Have you fully tested your changes?
- Have you resolved any lint issues?
- Have you assigned a reviewer?
- Have you applied correct labels?
Edited by Andrew