docker-minecraft-server icon indicating copy to clipboard operation
docker-minecraft-server copied to clipboard

Narrow Paper versions by release channel

Open itzg opened this issue 1 year ago • 0 comments

Newer releases of Paper are designated with a release channel "experimental" and that should be taken into consideration to ensure users are opt'ing into an experimental version.

The builds API endpoint should be used rather than just the project versions/{version} endpoint. With that the channel field of each build object should be evaluated:

{
  "project_id": "paper",
  "project_name": "Paper",
  "version": "1.20.5",
  "builds": [
    {
      "build": 4,
      "time": "2024-04-28T01:51:29.789Z",
      "channel": "experimental",
      "promoted": false,
      "changes": [
        {
          "commit": "f187fd696aa2bec774b1199b2e3c6937dd12937f",
          "summary": "Only scan `org.bukkit.craftbukkit.inventory` in `MetaHandledTagsTest`",
          "message": "Only scan `org.bukkit.craftbukkit.inventory` in `MetaHandledTagsTest`\n\nfixes tests OOMing\n"
        }
      ],
      "downloads": {
        "application": {
          "name": "paper-1.20.5-4.jar",
          "sha256": "4ac179edcef5726e85a20948284181097a05028188648749d77da3094f4b554e"
        }
      }
    },

A new image env var PAPER_RELEASE_CHANNEL should be introduced that defaults to "default" and allows for the value "experimental". If the user provides PAPERBUILD, then the release channel choice is ignored since the user had selected a specific build in that case.

Most of the code changes will actually be in https://github.com/itzg/mc-image-helper/tree/master/src/main/java/me/itzg/helpers/paper

More discussion in Discord

itzg avatar Apr 30 '24 00:04 itzg