Repository navigation
feat(servers): read and install plugin files through the AMP API - #235
ryanbarlow97 wants to merge 1 commit into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
With the AMP login file the helper no longer needs the bind-mounted instance folders. It mirrors plugin jars, the Maintenance config and recent logs through AMP's file manager into its state directory, so the existing checks run on real bytes, and installs by uploading, checking MD5, renaming and trashing the old jar. Backup times come from AMP. The controller tests now run against both the mounts and a fake AMP file manager. A failed local install also removes its temporary jar. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
c132074 to
7108d66
Compare
|
Closing: its only purpose was to let the host administrator remove the helper's bind mounts, ACLs and sudo wrapper afterwards, and that root step isn't available. The helper keeps using the mounts for files; #234 moves the AMP login to the site instead of a root-created file. |
Stacked on #234. With
/etc/tfmc-server-control/amp-login.jsonpresent, the restart helper now does all its file work through AMP's file manager asTFWeb, so it no longer needs the root-set bind mounts, ACLs or the sudo console wrapper.How
_paths()returns a private copy understate/mirror/<server>/refreshed through the API: plugin jars (andplugins/update), the Maintenance config,latest.logand the newest rotated logs. A jar is re-downloaded only when AMP's MD5 changes;latest.logis appended while the server's file only grows and replaced (new inode) when it starts over, so the existing boot/save detection is unchanged. All existing checks (snapshot,read_startup, boot errors, Dev evidence) run on these real bytes.plugins/.control-<plan>, compare AMP's MD5, rename to the release name, andTrashFilethe old jar (Java keeps the open inode; AMP keeps it in.trash). Failures restore the recorded old jars the same way..control-<plan>temp file inpluginsafter a checksum failure.Tests
The
controllerfixture now runs every controller test twice: against the mounts and against a fake AMP file manager over the same folders (237 passed). Three tests that monkeypatch local file mechanics got AMP equivalents; the symlink case is local-only.Live, read-only on tf-hetzner with the TFWeb account: mirror jar hashes equal the mounted jars on Main (74) and Dev (75); first sync 5.1 s / 2.4 s, then ~0.6 s; startup parse, maintenance state and last backup match;
plan(main|dev, restart)returns in ~1 s. Upload/MD5/rename/trash were exercised live on Dev withamp-api.Docs: TF-Minecraft/Docs (linked below), stacked on Docs #276.
🤖 Generated with Claude Code