Skip to content

Conversation

@yaauie
Copy link

@yaauie yaauie commented Aug 29, 2025

This aligns to my upstream changes in mashhurs/elasticsearch#2

It:

  • restores the relocation of previously-shaded dependencies, since Logstash plugins are also known to load joni, jackson, and maxmind libraries that are not necessarily the same version

  • uses entirely externalized/bridged types

  • removes an unused exception unwrapping function (that could never have worked)

  • Closes: Review move to bridge PRs. elastic/logstash-filter-elastic_integration#366

Copy link
Owner

@mashhurs mashhurs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - Really appreciate your review, especially, mitigating the risk of geoip version conflict case.


workingDir esSource
commandLine "./gradlew", "localDistro"
commandLine "./gradlew", "--stacktrace", "localDistro"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

import org.elasticsearch.ingest.geoip.shaded.com.maxmind.db.CHMCache;
import org.elasticsearch.ingest.geoip.shaded.com.maxmind.db.NoCache;
import org.elasticsearch.ingest.geoip.shaded.com.maxmind.db.NodeCache;
import org.elasticsearch.ingest.geoip.shaded.com.maxmind.db.Reader;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, this was my confusion that we fully move to the ES logstash-bridge w/o embedding the JARs but after analyzing the risk of conflict, as we took offline discussion, our original approach is the right one.

This indicates we DON'T NEED maxmind dependencies in

  • libs/logstash-bridge/build.gradle -> compileOnly('com.maxmind.db:maxmind-db:3.1.1')
  • and libs/logstash-bridge/src/main/java/module-info.java -> requires com.maxmind.db;

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will remove these dependencies, just noting here to remind myself while reviewing.

String processorTag,
String description,
Map<String, Object> config,
ProjectIdBridge projectIdBridge) throws Exception {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup sounds reasonable that we have separate constructors.

 - `new ${BRIDGE}(...)` -> `${BRIDGE}.create(...)`: use bridge-provided
   factory methods
 - `${INTERNAL}Bridge.${NESTED}` -> `${INTERNAL}${NESTED}Bridge`: extract
   nested bridges to top-level
 - `${BRIDGE}.AbstractExternal` -> `AbstractExternal${BRIDGE}`: extract
   nested "AbstractExternal" base implementations to top-level
@mashhurs mashhurs merged commit 7c0b6c7 into mashhurs:move-to-es-bridge-investigation Sep 3, 2025
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.

2 participants