Skip to content

Releases

v0.3.1

Choose a tag to compare

@github-actions github-actions released this 24 Nov 04:10
384206f

What's Changed

  • Follow the Actions minutes rules in CI by @mgilardi in #8
  • Add the first test audit by @mgilardi in #9
  • Add the live scenarios to the repo, with two test-only plugins by @mgilardi in #10
  • Live checks for preflight-upgrade, and a refusal that changes nothing by @mgilardi in #11
  • Skip the server app's folder under its new name too (0.3.1) by @mgilardi in #12

Full Changelog: v0.3.0...v0.3.1

Preflight 0.3.0

Choose a tag to compare

@github-actions github-actions released this 08 Nov 15:46
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.

Preflight 0.2.0

Choose a tag to compare

@github-actions github-actions released this 08 Nov 15:13
8a50167

report.xml now says what happened to each plugin, so a tool can decide what to switch off. One example is an upgrade helper that boots a copy of a server on a new Minecraft version.

What's new

  • Per-plugin detail in report.xml. A standard JUnit <properties> block lists:

    • every plugin's state: enabled, disabled or not-loaded
    • its jar files and dependencies
    • which plugins depend on it
    • which checks it failed
    • the server's own error line from the boot log

    It also lists unreadable and non-plugin jars, the Paper build, and the on-failure action used. Field reference: docs/report-format.md.

  • Jars that never loaded show up. Bad api-version, a missing dependency or a missing main class: Preflight reads the jar's own descriptor.

  • New check, Preflight:plugins-loaded (WARNING). It fails when a jar didn't load or couldn't be read, or when an enabled plugin's hard dependency isn't running. Paper 26.x enables such plugins anyway.

  • Skipped tests appear in the report as <skipped/>.

  • Overrides without editing config.yml: -Dpreflight.on-failure=WARN and -Dpreflight.shutdown-after-run=true.

  • The report is written whole, then moved into place, so it's never half-written.

Existing test cases, the failures count and grep 'failures="0"' in CI work as before.

Requirements

  • Paper 26.1 or newer. It won't load on Spigot or on Minecraft 1.21.
  • Java 25.

Install or update

  1. Download Preflight-0.2.0.jar below.
  2. Replace the old Preflight jar in your server's plugins/ folder and restart. Your config.yml keeps working unchanged.
  3. Check plugins/Preflight/report.xml, or run /preflight status (needs preflight.admin, which defaults to ops).

Plugin authors: preflight-api-0.2.0.jar is unchanged from 0.1.0 apart from its version.

What was tested

  • 32 unit tests, including validating the report against a JUnit schema.
  • On throwaway Paper 26.1.2 (build 74), 26.2 (build 135) and 26.3 (build 244) servers, all passing on the exact jar attached here:
    • a clean run that stops the server and deletes the test world
    • a lockdown, then /preflight unlock
    • DISABLE_PLUGIN with a plugin.yml dependency, and again with a paper-plugin.yml dependency (the dependent was disabled first)
    • SHUTDOWN
    • logins refused until the run finished
    • a boot with plugins broken in each way above, plus a corrupt jar and a library jar, with the report checked field by field and against the schema

Logins came from a small protocol bot that only reaches the login step. The servers and plugins were real; nothing was mocked.

What wasn't tested

  • A real game client, including whether non-admins see /preflight in tab completion.
  • A real plugin stack. Try it on a staging copy before a live server.
  • Error wording other than Paper's. The reason field is then left out, not guessed.

Preflight 0.1.0

Choose a tag to compare

@github-actions github-actions released this 08 Nov 06:28
cecb339

First release. Preflight runs smoke tests when a Paper server boots and keeps players out until they pass. Other plugins can add their own tests.

Requirements

  • Paper 26.1 or newer. It won't load on Spigot or on Minecraft 1.21.
  • Java 25.

Install

  1. Download Preflight-0.1.0.jar below.
  2. Put it in your server's plugins/ folder and restart.
  3. Check plugins/Preflight/report.xml, or run /preflight status (needs preflight.admin, which defaults to ops).

The default on-failure setting is LOCKDOWN: if a critical test fails, logins stay refused until an admin runs /preflight unlock. See the README for the other settings.

Plugin authors: preflight-api-0.1.0.jar is the compileOnly dependency for adding tests. The README shows the paper-plugin.yml and plugin.yml setup.

What was tested

Unit tests, plus five live scenarios on throwaway Paper 26.1.2 (build 74), 26.2 (build 135) and 26.3 (build 244) servers, all passing on each:

  • a clean run that stops the server and deletes the test world
  • a lockdown after a plugin throws in onEnable, then /preflight unlock
  • DISABLE_PLUGIN disabling a dependent plugin before the failing one
  • SHUTDOWN
  • every login refused until the tests finished

Logins came from a small protocol bot that only reaches the login step. The servers and plugins were real; nothing was mocked.

What wasn't tested

  • A real game client, including whether non-admins see /preflight in tab completion.
  • A DISABLE_PLUGIN hard dependency declared in paper-plugin.yml rather than plugin.yml.
  • A real plugin stack. Try it on a staging copy before a live server.