@@ -74,7 +74,7 @@ def build_full_docker_command(test_step: TestStep, config: PipelineGeneratorConf
7474 docker_command = build_docker_command_fastcheck (test_step , config )
7575 else : # CI mode
7676 docker_command = build_docker_command_ci (test_step , config )
77-
77+
7878 working_dir = test_step .working_dir or DEFAULT_WORKING_DIR
7979 return f"{ ShellCommands .CHECK_NVIDIA_GPU } && { ShellCommands .SETUP_DEPRECATED_BEAM_SEARCH } && cd { working_dir } && { docker_command } "
8080
@@ -116,12 +116,12 @@ def build_environment(test_step: TestStep, config: PipelineGeneratorConfig) -> D
116116def build_docker_plugin (test_step : TestStep , container_image : str , config : PipelineGeneratorConfig ) -> Dict :
117117 """Build standard Docker plugin configuration."""
118118 full_command = build_full_docker_command (test_step , config )
119-
119+
120120 # CI mode adds trailing space; Fastcheck doesn't
121121 if config .pipeline_mode == PipelineMode .CI :
122122 if full_command and not full_command .endswith (" " ):
123123 full_command += " "
124-
124+
125125 bash_flags = "-xce" if config .fail_fast else "-xc"
126126
127127 # Build environment configuration (mode-aware)
@@ -132,9 +132,9 @@ def build_docker_plugin(test_step: TestStep, container_image: str, config: Pipel
132132
133133 # Determine if mount_buildkite_agent is needed
134134 if config .pipeline_mode == PipelineMode .FASTCHECK :
135- mount_agent = test_step .label == TestLabels .BENCHMARKS or test_step .mount_buildkite_agent
135+ mount_agent = test_step .label == TestLabels .BENCHMARKS or bool ( test_step .mount_buildkite_agent )
136136 else : # CI mode
137- mount_agent = test_step .label == TestLabels .BENCHMARKS or test_step .mount_buildkite_agent or config .cov_enabled
137+ mount_agent = test_step .label == TestLabels .BENCHMARKS or bool ( test_step .mount_buildkite_agent ) or config .cov_enabled
138138
139139 docker_config = StandardDockerConfig (
140140 image = container_image ,
@@ -152,12 +152,12 @@ def build_docker_plugin(test_step: TestStep, container_image: str, config: Pipel
152152def build_special_gpu_plugin (test_step : TestStep , container_image : str , config : PipelineGeneratorConfig ) -> Dict :
153153 """Build Docker plugin for special GPUs (H200, B200)."""
154154 full_command = build_full_docker_command (test_step , config )
155-
155+
156156 # CI mode adds trailing space
157157 if config .pipeline_mode == PipelineMode .CI :
158158 if full_command and not full_command .endswith (" " ):
159159 full_command += " "
160-
160+
161161 bash_flags = "-xce" if config .fail_fast else "-xc"
162162
163163 gpu_type = test_step .gpu .value if test_step .gpu else "h200"
@@ -191,7 +191,7 @@ def build_special_gpu_plugin(test_step: TestStep, container_image: str, config:
191191def build_fastcheck_a100_kubernetes_plugin (test_step : TestStep , container_image : str ) -> Dict :
192192 """Build Kubernetes plugin for A100 in fastcheck mode (fastcheck-specific)."""
193193 # Build command without coverage
194- commands = flatten_commands (test_step .commands )
194+ commands = flatten_commands (test_step .commands or [] )
195195 commands = normalize_commands (commands )
196196 docker_command = " && " .join (commands )
197197 working_dir = test_step .working_dir or DEFAULT_WORKING_DIR
@@ -282,7 +282,7 @@ def build_plugin_for_test_step(test_step: TestStep, container_image: str, config
282282 return build_fastcheck_a100_kubernetes_plugin (test_step , container_image )
283283 # All other GPUs (H100, H200, B200, etc.) use standard Docker in fastcheck
284284 return build_docker_plugin (test_step , container_image , config )
285-
285+
286286 # CI mode: special handling for multiple GPU types
287287 # CI mode uses Kubernetes for H100 and A100
288288 if test_step .gpu in [GPUType .H100 , GPUType .A100 ]:
@@ -294,4 +294,3 @@ def build_plugin_for_test_step(test_step: TestStep, container_image: str, config
294294
295295 # Standard Docker for all others
296296 return build_docker_plugin (test_step , container_image , config )
297-
0 commit comments