Skip to content

Preflight 0.3.0

Choose a tag to compare

@github-actions github-actions released this 08 Nov 15:46
· 7 commits to main since this release
9422162

This release adds preflight-upgrade, a command-line tool for moving a Paper server to a new Minecraft version:

  1. It boots a throwaway copy of your server on the new Paper jar with Preflight.
  2. It lists the plugins that won't start there, and everything that needs them.
  3. With your yes, it switches those plugins off on the real server, after a restore point.

It can switch each one back on later. It never deletes a jar: it renames it to .jar.disabled. You don't need Preflight installed on the server to use it. The plugin itself is unchanged from 0.2.0 apart from its version.

java -jar preflight-upgrade-0.3.0.jar check --server /path/to/server --paper paper-26.3-244.jar

Every command and option is in docs/upgrade.md.

What it does

  • check copies the server and boots the copy on the new jar. The copy is kept from touching anything outside:

    • its own port on 127.0.0.1, with RCON and query off
    • Discord bridges, vote listeners, map uploaders, proxies and Geyser switched off, and anything needing them reported as not checked

    Your real server isn't changed and can keep running. The check stops, and says why, if a plugin uses an outside database the copy would share. --allow-shared-database runs it anyway.

  • apply switches off what the check found. It runs only on a stopped server, only after you type yes, only if every jar is unchanged since the check, and only after a restore point of every plugin jar that's been read back and verified.

  • restore puts plugins back on one at a time. It never overwrites a newer jar you've put in their place.

  • Never-off rules: list plugins in plugins/Preflight/upgrade/rules.json that must never go off. If one would have to, the plan says to wait.

  • --json and exit codes, for tools such as Leaf Juice.

A Preflight pass means a plugin starts, not that it works. The restore point covers plugin jars only: take a full backup before the upgrade itself.

Requirements

  • Paper 26.1 or newer, on the server and as the target.
  • Java 25 or newer.

Install

  • Server owners: download preflight-upgrade-0.3.0.jar and run it with Java. Check it against preflight-upgrade-0.3.0.jar.sha256 if you like.
  • Plugin: Preflight-0.3.0.jar replaces an older Preflight in plugins/. Your config keeps working.
  • Plugin authors: preflight-api-0.3.0.jar is unchanged.

What was tested

  • 60 unit tests. These include end-to-end checks with a stand-in server jar, and tests ported from Leaf Juice's helper.

  • On made-up servers on Paper 26.1.2 (build 74), 26.2 (build 135) and 26.3 (build 244), all 164 checks passed on the exact jar attached here, with one test server at a time:

    • check with real boots of the copy, including a copy made by the caller
    • apply refused while the server ran
    • apply, then a real boot showing the plugins stayed off
    • restore one at a time, with a newer jar left alone
    • a never-off plugin making the plan wait
    • a jar that isn't Paper refused

    The made-up plugins were broken in every way the report covers, plus stand-ins for an outside-facing plugin and its addon.

What was mocked

"The server is running while the check copies it." A port listener and a held world lock stood in for a running server, so two servers didn't run at once. Real Paper was confirmed separately to hold the world lock while it runs.

What wasn't tested

  • A real plugin stack.
  • A server large enough to exercise the disk-space check.
  • A real game client.