fix(cloudnet): bind address from service properties + clean stdin shutdown#141
Merged
Merged
Conversation
…clean shutdown CloudNet assigns the bind host/port per service via system properties and stops services by writing "stop" to stdin; hardcoded bind addresses and the lack of a stdin listener meant CloudNet could start but never cleanly manage the game/setup services. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Contributor
Test results120 files 120 suites 48s ⏱️ Results for commit 0c50be4. ♻️ This comment has been updated with latest results. |
…yers Bootstraps LuckPerms via net.luckperms:minestom-loader in both the game and setup services, so the "stop" command (introduced for CloudNet's stdin-based shutdown) can also be run by a player holding cygnus.command.stop, instead of only console/CloudNet. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
theEvilReaper
requested changes
Jul 25, 2026
theEvilReaper
left a comment
Contributor
There was a problem hiding this comment.
For me, the code looks good. However, I would prefer to add documentation to the methods in ServiceBootstrap and StopCommand. Additionally, the header documentation should include the author, version and since tags. If possible, adding tests would also be great
Adds @author/@version/@SInCE headers and method-level javadoc matching the project convention, plus unit tests for bind-address resolution and the stop command's console/non-player condition. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…emProperty Skips the default-value assertions instead of failing them if service.bind.host/service.bind.port happen to already be set externally (e.g. the JVM actually running under CloudNet), per JUnit5's system-property conditional execution. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Summary
ServiceBootstrapliestservice.bind.host/service.bind.port(Fallbacklocalhost:25565für Standalone-Runs), statt die Bind-Adresse hart zu kodieren — CloudNet weist diese pro Service dynamisch zu und konnte sie bisher nie erreichen.ServiceBootstrap.installShutdownHandling()startet einen Daemon-Thread, der stdin liest und Zeilen an denCommandManagerweiterleitet, plus einstop-Command dasMinecraftServer.stopCleanly()+System.exit(0)auf einem separaten Thread ausführt — CloudNet stoppt Services über stdin, nicht per Signal; ohne diesen Listener killt der Node den Prozess nach Timeout.game(CygnusLoader) undsetup(SetupLoader) nutzen beideServiceBootstrapbeim Start.net.luckperms:minestom-loader(JarInJar-Loader, kein Extension-Mechanismus). Derstop-Command ist standardmäßig nur für Nicht-Player-Sender (Konsole/CloudNet) erlaubt, zusätzlich aber auch für Spieler mit der Permissioncygnus.command.stop.implementationergänzt (wird von LuckPerms unrelocated benötigt, kam bisher nur transitiv über CloudNet, das jetztcompileOnlyist).minestom-loaderaus dem Test-Runtime-Classpath ausgeschlossen (bundled, veraltetes Gson bricht sonst Minestoms Registry-Init in Tests).data/(LuckPerms' Runtime-Verzeichnis: Config, H2-DB, relocated libs) zur.gitignorehinzugefügt.minestom-loader:5.6-SNAPSHOTist nur über den privaten OneLiteFeather-Proxy verfügbar, nicht über Maven Central/Sonatype — das ist bereits als Repository konfiguriert.Nicht Teil dieser PR: Umstieg auf
ExtensionBootstrap/extension.json(die CloudNet-Bridge wird weiterhin direkt per Aerogel-DI geladen, das funktioniert bereits) — das wäre eine separate Architekturentscheidung.Test plan
./gradlew :common:compileJava :game:compileJava :setup:compileJava— erfolgreich./gradlew :common:test :game:test :setup:test— alle Tests grünstop-Signal über den Service-Lifecycle prüfen)cygnus.command.stopkann/stopausführen, Spieler ohne Permission nicht🤖 Generated with Claude Code