-
Notifications
You must be signed in to change notification settings - Fork 0
align bridge to yaauie/elasticsearch@94d58d47cd #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
align bridge to yaauie/elasticsearch@94d58d47cd #1
Conversation
There was a problem hiding this 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" |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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;
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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
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