@@ -38,6 +38,7 @@ def __init__(self, stack_version: str, project_type: str) -> None:
3838 Returns:
3939 Validates and sets stack version, project type and resolves elastic package distro based on running OS (sys.platform)
4040 """
41+ print (f"Stack version: { stack_version } " )
4142 self .stack_version = stack_version
4243 self .__validate_and_set_project_type (project_type )
4344 self .__resolve_distro ()
@@ -160,9 +161,33 @@ def __reload_container(self) -> None:
160161 "Error occurred while reloading Logstash container, see logs for details." )
161162 time .sleep (20 ) # give a time Logstash pipeline to fully start
162163
164+ def __is_version_gte (self , version : str , target_major : int , target_minor : int ) -> bool :
165+ # Remove -SNAPSHOT suffix if present
166+ clean_version = version .replace ("-SNAPSHOT" , "" )
167+ parts = clean_version .split ("." )
168+ if len (parts ) < 2 :
169+ return False
170+
171+ try :
172+ major = int (parts [0 ])
173+ minor = int (parts [1 ])
174+ if major > target_major :
175+ return True
176+ elif major == target_major :
177+ return minor >= target_minor
178+ else :
179+ return False
180+ except ValueError :
181+ return False
182+
163183 def __update_pipeline_config (self ) -> None :
164184 local_config_file_path = ".buildkite/scripts/e2e-pipeline/config/"
165- config_file = "serverless_pipeline.conf" if self .project_type == "serverless" else "pipeline.conf"
185+ if self .__is_version_gte (self .stack_version , 9 , 3 ):
186+ config_file = "pipeline-ea-without-ssl.conf"
187+ elif self .project_type == "serverless" :
188+ config_file = "serverless_pipeline.conf"
189+ else :
190+ config_file = "pipeline.conf"
166191 local_config_file = local_config_file_path + config_file
167192 container_config_file_path = "/usr/share/logstash/pipeline/logstash.conf"
168193 # python docker client (internally uses subprocess) requires special TAR header with tar operations
0 commit comments