Skip to content

build!: leave the gcs: crawler client to the fess-lib-gcs plugin - #203

Merged
marevol merged 1 commit into
masterfrom
feat/unregister-gcs-client
Sep 9, 2026
Merged

marevol merged 1 commit into
masterfrom
feat/unregister-gcs-client

Conversation

@marevol

@marevol marevol commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

crawler/client.xml no longer declares gcsClient or maps gcs:.* to it. GcsClient and the gcs: URL handler stay in this library and still compile against the Google Cloud Storage SDK; what changes is that nothing here names the class, so the SDK is no longer needed to build the container.

Fess 15.9 stops shipping that SDK — around 17 MiB of jars for a protocol most installations never crawl — and moves it to the fess-lib-gcs plugin. The plugin registers the client through crawlerClientCreator, the way fess-crawler-playwright registers playwrightClient, so installing it restores gcs: crawling.

Why the declaration cannot stay here

Both failure modes were reproduced:

  • Without the SDK — the webapp does not start. Lasta Di resolves the class named by a component while it parses the Di xml, not when the component is first used, so the failure lands at container init rather than at the first crawl:

    DiXmlParseFailureException at /components[1]/include[19]
    Caused by: java.lang.NoClassDefFoundError: com/google/cloud/NoCredentials
    SEVERE: Exception starting filter [lastaPrepareFilter]
    SEVERE: Context [] startup failed due to previous errors
    

    This is build!: move the GCS client into the fess-lib-gcs plugin fess#3424's CI, which builds Fess without the SDK against this library as it stands today.

  • With the plugin installed. Both files declare gcsClient, the component key becomes ambiguous, and the first crawl gets TooManyRegistrationComponentException. Reproduced against a running Fess with a fake-gcs-server bucket.

Compatibility

Consumers of this library that relied on the gcs: mapping keep GcsClient itself and can register it in their own container.

Merge order

codelibs/fess#3424 has the matching change and stays red until this one is merged and its snapshot is published — the failure above is exactly what its Run Fess step hits.

crawler/client.xml no longer declares gcsClient or maps gcs:.* to it. GcsClient and the
gcs: URL handler stay in fess-crawler and still compile against the Google Cloud Storage
SDK; what changes is that nothing in this library names the class, so the SDK is no longer
needed to build the container.

Fess 15.9 stops shipping that SDK, which is around 17 MiB of jars for a protocol most
installations never crawl, and moves it to the fess-lib-gcs plugin. The plugin registers
the client through crawlerClientCreator, the way fess-crawler-playwright registers
playwrightClient, so installing it restores gcs: crawling.

Declaring the component here regardless of whether the SDK is present is not an option.
Lasta Di resolves the class named by a component while it parses the Di xml, not when the
component is first used, so an installation without the SDK does not start at all:

    DiXmlParseFailureException at /components[1]/include[19]
    Caused by: java.lang.NoClassDefFoundError: com/google/cloud/NoCredentials
    SEVERE: Exception starting filter [lastaPrepareFilter]
    SEVERE: Context [] startup failed due to previous errors

With the plugin installed it fails differently: both files declare gcsClient, the
component key becomes ambiguous, and the first crawl gets
TooManyRegistrationComponentException. Both were reproduced, the first on CI and the
second against a running Fess with a fake-gcs-server bucket.

Consumers of this library that relied on the gcs: mapping keep GcsClient itself and can
register it in their own container.
@marevol
marevol force-pushed the feat/unregister-gcs-client branch from a66bd7d to c5306ea Compare September 9, 2026 13:47
@marevol marevol self-assigned this Sep 9, 2026
@marevol marevol added this to the 15.9.0 milestone Sep 9, 2026
@marevol
marevol merged commit f0d03bb into master Sep 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant