Closed mashhurs closed 5 months ago
The org.elasticsearch.ingest.LogstashInternalBridge
is not dependent on org.elasticsearch.painless.spi
, so it won't be as simple as adding a method as an API boundary and back-porting an implementation that calls through to PainlessPlugin::BASE_WHITELIST
.
I think we have two options:
PainlessPlugin.baseWhiteList()
to Elasticsearch 8.13 that falls through to its own PainlessPlugin.BASE_WHITELISTS
The
org.elasticsearch.ingest.LogstashInternalBridge
is not dependent onorg.elasticsearch.painless.spi
, so it won't be as simple as adding a method as an API boundary and back-porting an implementation that calls through toPainlessPlugin::BASE_WHITELIST
.I think we have two options:
- use reflection in our code to tolerate the breaking change use reflection to get past breaking change in PainlessPluginĀ #137
- back-port the interface of
PainlessPlugin.baseWhiteList()
to Elasticsearch 8.13 that falls through to its ownPainlessPlugin.BASE_WHITELISTS
Ah, thank for the investigation Ry! My opinion: from the ES issue description (... saves about 1.4M of heap, fixes concurrency issue), it sounds it is worth to backport. If backport is not possible (due to some reason), +1 for reflection approach.
Description
Recent Elasticsearch source changes of Painless whitelists arrangement broke the plugin, see BK CI: https://buildkite.com/elastic/logstash-filter-elastic-integration-build/builds/138 The error we get:
Now, Elasticsearch eagerly loads the base whitelists (
PainlessPlugin.baseWhiteList()
) and I have just tried with draft PR if we have an access for thebaseWhiteList()
but it seems we do not have. So it seems this requires againLogstashInternalBridge.java
to access.