elastic / logstash-filter-elastic_integration

The Elastic Integrations filter for Logstash, which enables running Elastic Integrations inside of Logstash pipelines
Other
2 stars 9 forks source link

[Bug]: Adapt to change in ThreadPool constructor signature #120

Closed jsvd closed 9 months ago

jsvd commented 9 months ago

CI is failing with:

454.6 > Task :compileJava
--
  | 454.6 /usr/share/plugins/plugin/src/main/java/co/elastic/logstash/filters/elasticintegration/EventProcessorBuilder.java:240: error: no suitable constructor found for ThreadPool(Settings)
  | 454.6             final ThreadPool threadPool = new ThreadPool(settings);
  | 454.6                                           ^
  | 454.6     constructor ThreadPool.ThreadPool(Settings,MeterRegistry,ExecutorBuilder<?>...) is not applicable
  | 454.6       (actual and formal argument lists differ in length)
  | 454.6     constructor ThreadPool.ThreadPool() is not applicable
  | 454.6       (actual and formal argument lists differ in length)
  | 455.0 1 error
  | 455.0
  | 455.0 > Task :compileJava FAILED

Due to https://github.com/elastic/elasticsearch/commit/764269b39516f6257d6f994e2e8e4fc66ee68b2d#diff-2835e151b1e7435ff4760a9263e0ecbc359597a9ff02005fc7fec099d38549e6R197

-    public ThreadPool(final Settings settings, final ExecutorBuilder<?>... customBuilders) {
+    public ThreadPool(final Settings settings, MeterRegistry meterRegistry, final ExecutorBuilder<?>... customBuilders) {

Possible fix is to use a NOOP meter registry:

-        ThreadPool threadPool = new ThreadPool(settings);
+        ThreadPool threadPool = new ThreadPool(settings, MeterRegistry.NOOP);