Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ task shadeElasticsearchIngestGeoIpModule(type: com.github.jengelman.gradle.plugi

dependsOn buildElasticsearchLocalDistro

from(buildElasticsearchLocalDistro.module("ingest-geoip").orElse(objects.fileCollection()))
from(buildElasticsearchLocalDistro.module("ip-location").orElse(objects.fileCollection()))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

do we need everything, or can we get only the geoip dependencies?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, as per my analysis (correct me if I am wrong), we need all (ip-location, ip-location-api and ingest-ip-location) need to exist in the JARs but we have to only shade the ip-location since others are references by the logstash-bridge:

  • IpLocationServiceAdapter from ingest-ip-location
  • no-op IpLocationService from ip-location-api


archiveFileName = 'ingest-geoip-shaded.jar'
destinationDirectory = file("${buildDir}/shaded")
Expand Down Expand Up @@ -453,6 +453,7 @@ task importMinimalElasticsearch() {
include jarPackageNamed("elasticsearch-x-content")
include jarPackageNamed("elasticsearch-geo")
include jarPackageNamed("elasticsearch-user-agent-api")
include jarPackageNamed("elasticsearch-ip-location-api")
include jarPackageNamed("lucene-core")
include jarPackageNamed("lucene-analysis-common")
include jarPackageNamed("hppc")
Expand All @@ -472,6 +473,11 @@ task importMinimalElasticsearch() {
}

from(shadeElasticsearchIngestGeoIpModule)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
from(shadeElasticsearchIngestGeoIpModule)
from(shadeElasticsearchIpLocationModule)


from(buildElasticsearchLocalDistro.module("ingest-ip-location")) {
include jarPackageNamed("ingest-ip-location")
}

from(shadeElasticsearchRedactPlugin)

from(buildElasticsearchLocalDistro.module("lang-mustache")) {
Expand Down Expand Up @@ -1008,4 +1014,5 @@ task unitSpecs(dependsOn: bundleInstall) {
clean {
delete "${projectDir}/*.gem"
delete "build"
delete "vendor/jar-dependencies"
}
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
LOGSTASH_PATH=../../logstash
ELASTICSEARCH_TREEISH=main
ELASTICSEARCH_REPO=eyalkoren/elasticsearch
ELASTICSEARCH_TREEISH=refactor-geoip
Loading