Open
Conversation
There was a problem hiding this comment.
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
LoadingMOTDconfiguration option for Docker auto-scaling to show a specific message while servers are waking up - Fixed Docker sleeper to call
monitorContainersafter 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.
Contributor
Author
|
This is ready for intelligent review... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes:
Also included in this PR is a new configuration option for docker containers
--auto-scale-loading-motdwhich will enable configuring showing a specific motd when a server is loading, if not configured it will fallback to theasleep-motdbehaviour.