-
Notifications
You must be signed in to change notification settings - Fork 13
Description
In Elasticsearch core we introduced StableAPIBridge so that Logstash can rely on unchanging code (elastic/elasticsearch#108171), but we need to migrate to the stable wrappers to gain the benefit and stabilize our reliance on Elasticsearch internals.
Number of sequential tasks:
-
Elasticsearch scope: evaluate current status of Stable API based on plugin usage
- introduce bridge API for
ProjectId: it recently came into play (with this change) - introduce bridge API for
org.elasticsearch.core.Releasable(used byIntegrationBatch.java): it seems it was missed - introduce bridge API for
org.elasticsearch.action.support.RefCountingRunnable(used byEventProcessor.java): it seems it was missed - introduce bridge API for
org.elasticsearch.ingest.common.FailProcessorException: it seems it was missed
- introduce bridge API for
-
Plugin scope: make Bridge API available in the plugin
- the plugin builds minimal Elasticsearch (with
gradlew localDistro) so logstash-bridge will not be built during this process. We need to have a task to build the module (./gradlew :libs:logstash-bridge:build) and add (shade like we haveshadeElasticsearchIngestGeoIpModule) the module as a dependency to the project.
- the plugin builds minimal Elasticsearch (with
-
Elasticsearch scope: Came from evaluation task that we need to introduce modular descriptors for the redact, wildcard & spatial plugins to make them available in logstash-bridge
-
Plugin scope: move to Bridge API
- Replace all classes with its bridges (e.g:
Settings->SettingsBridge) - Consider simplifications: some of the classes such as
ScriptServicehas simplification logics so that plugin can remove unnecessary logica and utilize them. I will add more specific details once I start working on this.
- Replace all classes with its bridges (e.g:
-
Elasticsearch scope: Based on the
evaluate current status of Stable APIinvestigation outcome, introduce or modify the wrapper(s)- Migrate all Bridges to "interface pattern", using factory methods instead of constructors.
- Extract implementations to package-private (so that we have a clear boundary of what is "externalized" to the logstash plugin
-
Elasticsearch scope: introduce Bridge and proxies for GeoIP
- include geoip ingest module to logstash-bridge (somehow commented
compileOnly project(':modules:ingest-geoip'))
- include geoip ingest module to logstash-bridge (somehow commented
-
Plugin scope: move GeoIP to Bridge API
-
Elasticsearch scope: deprecate/remove if unused classes left
- Such as
LogstashInternalBridgewill be no longer used by the plugin but used internally in the bridge, do we need to replace and remove?!
- Such as