@@ -228,26 +228,31 @@ def __init__(self, params, x_pack_config, distribution_version):
228
228
])
229
229
230
230
def runnable (self , race_config ):
231
+ major , minor , _ , _ = components (self .distribution_version )
232
+
231
233
# Do not run 1g benchmarks at all at the moment. Earlier versions of ES OOM.
232
234
if race_config .car == "1gheap" :
233
235
return False
234
236
# transport-nio has been introduced in Elasticsearch 7.0.
235
- if int ( self . distribution_version [ 0 ]) < 7 and "transport-nio" in race_config .plugins :
237
+ if major < 7 and "transport-nio" in race_config .plugins :
236
238
return False
237
239
# Currently transport-nio does not support HTTPS
238
240
if self .x_pack_config and "transport-nio" in race_config .plugins :
239
241
return False
240
- # Do not run with special x-pack configs. We run either the whole suite with or without x-pack.
241
- if race_config .x_pack :
242
+ # Do not run with special x-pack security configs. We run either the whole suite with or without x-pack.
243
+ if race_config .x_pack and "security" in race_config .x_pack :
244
+ return False
245
+ # ML has been introduced in 5.4.0
246
+ if race_config .x_pack and "ml" in race_config .x_pack and (major < 5 or (major == 5 and minor < 4 )):
242
247
return False
243
248
# noaa does not work on older versions. This should actually be specified in track.json and not here...
244
- if int ( self . distribution_version [ 0 ]) < 5 and race_config .track == "noaa" :
249
+ if major < 5 and race_config .track == "noaa" :
245
250
return False
246
251
# ingest pipelines were added in 5.0
247
- if int ( self . distribution_version [ 0 ]) < 5 and "ingest-pipeline" in race_config .challenge :
252
+ if major < 5 and "ingest-pipeline" in race_config .challenge :
248
253
return False
249
254
# cannot run "sorted" challenges - it's a 6.0+ feature
250
- if int ( self . distribution_version [ 0 ]) < 6 and "sorted" in race_config .challenge :
255
+ if major < 6 and "sorted" in race_config .challenge :
251
256
return False
252
257
return True
253
258
@@ -403,19 +408,21 @@ class XPackParams:
403
408
Extracts all parameters that are relevant for benchmarking with x-pack. Before Elasticsearch 6.3.0 x-pack is considered a plugin.
404
409
For later versions it is treated as module.
405
410
"""
406
- def __init__ (self , distribution_version , override_x_pack = None ):
411
+ def __init__ (self , distribution_version , additional_modules = None ):
412
+ if additional_modules is None :
413
+ additional_modules = []
407
414
if distribution_version == "master" :
408
415
self .treat_as_car = True
409
416
else :
410
417
major , minor , _ , _ = components (distribution_version )
411
418
self .treat_as_car = major > 6 or (major == 6 and minor >= 3 )
412
419
413
420
self .distribution_version = distribution_version
414
- self .override_x_pack = override_x_pack
421
+ self .additional_modules = additional_modules
415
422
416
423
def __call__ (self , race_config ):
417
424
params = {}
418
- x_pack = self .override_x_pack if self . override_x_pack else race_config .x_pack
425
+ x_pack = self .additional_modules + race_config .x_pack
419
426
add_if_present (params , "client-options" , self .client_options (x_pack ))
420
427
add_if_present (params , "elasticsearch-plugins" , self .elasticsearch_plugins (x_pack ))
421
428
add_if_present (params , "car" , self .car (x_pack ))
@@ -487,7 +494,7 @@ def track_params(self):
487
494
488
495
@property
489
496
def x_pack (self ):
490
- return self .configuration .get ("x-pack" )
497
+ return self .configuration .get ("x-pack" , [] )
491
498
492
499
@property
493
500
def target_hosts (self ):
0 commit comments