Skip to content

Fix docker scaling and show loading MOTD#529

Open
Lenart12 wants to merge 4 commits intoitzg:mainfrom
Lenart12:main
Open

Fix docker scaling and show loading MOTD#529
Lenart12 wants to merge 4 commits intoitzg:mainfrom
Lenart12:main

Conversation

@Lenart12
Copy link
Contributor

@Lenart12 Lenart12 commented Feb 25, 2026

Fixes:

Also included in this PR is a new configuration option for docker containers --auto-scale-loading-motd which will enable configuring showing a specific motd when a server is loading, if not configured it will fallback to the asleep-motd behaviour.

Copilot AI review requested due to automatic review settings February 25, 2026 17:13
Copy link

Copilot AI left a 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 adds support for displaying a loading MOTD while Docker containers are waking up, and fixes a regression introduced in PR #512 where servers would auto-scale down even when a player was connected. The fix ensures that container monitoring is refreshed after scaling operations to maintain route consistency.

Changes:

  • Added LoadingMOTD configuration option for Docker auto-scaling to show a specific message while servers are waking up
  • Fixed Docker sleeper to call monitorContainers after stopping a container, ensuring routes are refreshed
  • Added wake tracking infrastructure to distinguish between asleep and loading states

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
server/connector.go Added wake tracking with wakingServers, loading MOTD support, and logic to show loading state during wake operations
server/routes.go Added loadingMOTD field to mapping struct and GetLoadingMOTD method
server/docker.go Added loading MOTD label support and sleeper now calls monitorContainers to refresh routes after stopping
server/k8s.go Updated function signatures to include empty loading MOTD parameters
server/configs.go Added LoadingMOTD field to AutoScale configuration
server/routes_test.go Added test for loading MOTD functionality
server/connector_test.go Added tests for wake tracking and loading MOTD retrieval
server/k8s_test.go Updated mock expectations to include loading MOTD parameter
server/routes_config_loader.go Updated function calls to include empty loading MOTD parameter
server/api_server.go Updated function calls to include empty loading MOTD parameters
server/docker_swarm.go Updated function calls to include empty loading MOTD parameters
server/server.go Added call to configure loading MOTD on connector
README.md Documented new loading MOTD configuration option

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Lenart12
Copy link
Contributor Author

This is ready for intelligent review...

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.

Server autoscales down when waking player maintains initial connection

2 participants