feat: Server library cleanup on paper install#4046
Conversation
Defaults to true, do we want this or default to false?
…ERVER_LIBRARIES Split direct call to mc-image-helper on custom paper url to append --clean-libraries flag
|
One thing of note, i found the warn on "Failed to read installed libraries" when initially installing noisy and unnecessary I realised however a check can be performed if the manifest exists from a previous install. That way the warn can be removed, which isn't really helpfull. |
Yep, I was wondering about some of these scenarios. Yes, a PR to address that first would be great. I hadn't yet cut a release for Purpur library cleaning, so that can be included at same time. |
The way you have it, true by default makes sense to me. Then setting it to false can be a way to mitigate any unexpected behavior.
I like the non-specific variable name you introduced since it can be utilized across server types. As such, yeah that misc options area seems good. |
|
|
Just added documentation under Anything further needed for the PR? |
|
Ah, java8 test fails because I maintain a separate mc-image-helper branch and have pinned the compiler at Java 8 there. I now realize it makes a mess of functional changes like this. In this case, cherry picking into https://github.com/itzg/mc-image-helper/tree/java8 and bumping the release for that will ultimately work out. It seems annoying for me to do it that way... |
|
Maybe the image also needs a slow changing, maintenance java8 branch. |
How does the versioning system of the Java8 branch actually work? I can see in the build CI pipeline the pinned version, but how is this version differentiated from master releases? From my understanding, pinning the version at I feel like it would be more appropriate to follow |
Sorry, I just now noticed this. I like this idea. |
|
Do you need anything further for the pull into master? itzg/mc-image-helper#766 was merged and the java8 version bump #4056, so if CI re-runs should pass all builds. Otherwise i'm happy to continue further supporting other jar types |
All image variants are built from the same mainline branch. Previously I got lucky and there weren't any features that were affected. Yours and another coming up for OCI support have caused my luck to run out 😄 To address that, I have added a new subcommand in https://github.com/itzg/mc-image-helper/releases/tag/1.51.3-java8 and https://github.com/itzg/mc-image-helper/releases/tag/1.58.0 : https://github.com/itzg/mc-image-helper#has-feature that will allow for a single mainline branch in https://github.com/itzg/docker-minecraft-server but allow the scripts to query if a feature is available, such as the new subcommand in this PR. For the Java 8 - 16 image variants, using the https://github.com/itzg/mc-image-helper/releases/tag/1.51.3-java8 type releases, that query will return exit code 1 since we won't backport things that required Java 17. I'm thinking the script call point can gracefully fail the startup indicating that the requested feature isn't available for that image java variant. |
|
...I can make that change in a separate PR or push to yours, since this is a newly added thing. |
…/feat/serverLibraryCleanupPaper
nm, all this. I forgot that you had cherry picked the feature over to java8 branch of mc-image-helper. |
|
Remaining build failure is just GitHub rate limit since I end up with so many concurrent builds with this image. |
Adds support for itzg/mc-image-helper#748
Adds flag
$CLEAN_SERVER_LIBRARIESwhich defaults to true. When set appends--clean-librariesto mc-image-helper call.master already sets
MC_HELPER_VERSION=1.57.2> minimum 1.57.1 for the feature.Two questions, do you want the feature true or false by default? And should documentation be added iteratively on each jar type support, or done at the end? if iteratively, added under Misc Options or would you suggest a better location?