feat(fess): install the plugins 15.9 unbundled, with bin/fess-setup - #80
Merged
Merged
Conversation
Fess 15.9 moved the Groovy script engine, the S3 and GCS storage backends and the four SSO authenticators out of the war. Each is a plugin now, so an image built from a 15.9 distribution alone quietly loses behaviour the 15.8 images had: a data store, job or crawler script that leaves script_type unset still resolves to groovy, and s3:, gcs: and every sso.type stop working. The three snapshot images install all seven at build time with `bin/fess-setup install plugin`. It resolves the version that fits the build -- for a -SNAPSHOT, the latest timestamped build in the snapshot repository -- and checks each jar against the SHA-1 the repository publishes. An unresolvable name exits 1, so a missing plugin fails the build instead of producing an image that is short a feature with nothing in the log to say so. The seven jars add 36,392,732 bytes. Verified by building all three variants with docker build, standing the post-fess#3429 fess-setup.jar in for the one today's published snapshot still carries. Each image ends with seven jars in app/WEB-INF/plugin under their timestamped Maven names, owned fess:fess, and `fess-setup list installed` sees all seven. `install plugin fess-sso-nosuchthing` exits 1, which is the claim the comment makes. bin/fess-setup resolves java through JAVA_HOME in all three bases, which matters for amazoncorretto:21-al2023: it ships no `which`, so the launcher's fallback branch would not have worked there. run.sh rejected the new names. FESS_PLUGINS accepts a fixed set of artifact prefixes, and fess-sso- and fess-storage- were not among them, so FESS_PLUGINS=fess-sso-saml:15.9.0 was reported as unrecognized and skipped. Both are added, and with them fess-thumbnail-, which was already missing before 15.9 -- fess-thumbnail-playwright is published and was being rejected. The prefix list, the error message and the README table all have to agree, so all three are updated together.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fess 15.9 moved the Groovy script engine, the S3 and GCS storage backends and the four SSO authenticators out of the war. Each is a plugin now, so an image built from a 15.9 distribution alone quietly loses behaviour the 15.8 images had. The three snapshot images install all seven at build time.
script_type=groovy— and any data store, job or crawler script that leavesscript_typeunset, which still resolves to groovyfess-script-groovys3:crawling and the S3 storage backendfess-storage-s3gcs:crawling and the GCS storage backendfess-storage-gcssso.type=saml/spnego/entraid(and the legacyaad) /oicfess-sso-saml/-spnego/-entraid/-oidcoicis the one place the plugin name and the value differ, so the README table spells it out rather than leaving a reader to installfess-sso-oic.Why
bin/fess-setuprather than morecurlinrun.shrun.shalready resolves a snapshot by hand — fetchmaven-metadata.xml, scrape<timestamp>and<buildNumber>, rebuild the file name.bin/fess-setup install plugindoes that, picks the version that fits the build, verifies the published SHA-1, and exits 1 when a plugin cannot be resolved. That last part is the reason it belongs in aRUN: a missing plugin fails the build instead of producing an image that is short a feature with nothing but an ERROR line in the boot log to say so. The seven jars add 36,392,732 bytes.Verified by building all three variants
docker buildon each ofsnapshot,snapshot-nobleandsnapshot-al2023, with the post-codelibs/fess#3429fess-setup.jarstanding in for the one today's published snapshot still carries. Each image ends with seven jars inapp/WEB-INF/pluginunder their timestamped Maven names, ownedfess:fess, andfess-setup list installedsees all seven.install plugin fess-sso-nosuchthingexits 1, which is the claim the comment makes.One thing that had to be checked rather than assumed:
bin/fess-setupresolvesjavathrough$JAVA_HOME/bin/javaand falls back towhich.amazoncorretto:21-al2023ships nowhich— but it does setJAVA_HOME, as do both temurin bases, so the fallback is never reached in any of the three.run.shwas rejecting the new namesFESS_PLUGINSaccepts a fixed set of artifact prefixes, andfess-sso-andfess-storage-were not among them, soFESS_PLUGINS=fess-sso-saml:15.9.0was reported as unrecognized and skipped. Both are added.fess-thumbnail-is added with them. It was already missing before 15.9 —fess-thumbnail-playwrightis published and was being rejected — so it is not part of the 15.9 change; drop it from this PR if you would rather it went separately. The prefix list, the error message it prints and the README table all have to agree, which is why all three move together.Before merging
bin/fess-setupin the rpm and the deb. Today it is in the zip only: the jdebbindata set and the rpmbinmapping each list exactlyfess,fess.in.shandgenerate-thumbnail, confirmed against the built packages. The Alpine image installs from the zip and is unaffected;snapshot-nobleandsnapshot-al2023cannot call fess-setup until that lands.fess-setupto read the snapshot repository. The jar in the currently published snapshot predates it.105e876d2) but not yet in a published snapshot — the newest is the 03:04Z build. Installing an SSO plugin into a war that still declares the same authenticator registers it twice. I compared the component names in that published war against the plugin jars: the four*Authenticatornames collide, and so dos3StorageClientands3_compatStorageClient(#3428 fixed those, so the same next snapshot clears them).fess-script-groovyandfess-storage-gcscollide with nothing and would be safe even against today's build.All three come down to the same thing: build these images from the next published Fess snapshot, not the current one.
Not included
compose/playwright/is pinned to15.8.0-nobleand unaffected, but it will needbin/fess-setup install nodejswhen it moves to 15.9:driver-bundle-1.60.0.jar, the 216 MB of Node.js binaries Playwright's bundle carried, is gone from the distribution whilefess-crawler-playwrightitself is still in the war. Baking Node.js into every image would undo the size decision that removed it, so it belongs in that image, not these.When 15.9.0 releases and
fess/15.9*is created from these files, the plugin step comes with it and needs no change —fess-setupwill resolve releases instead of snapshots on its own.