File tree Expand file tree Collapse file tree
cli/services/configurators Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -354,7 +354,7 @@ def interpolate_env(self, conf: RunConfigurationT):
354354 password = interpolator .interpolate_or_error (conf .registry_auth .password ),
355355 )
356356 if isinstance (conf , ServiceConfiguration ):
357- for probe in conf .probes :
357+ for probe in conf .probes or [] :
358358 for header in probe .headers :
359359 header .value = interpolator .interpolate_or_error (header .value )
360360 if probe .url :
Original file line number Diff line number Diff line change @@ -394,7 +394,7 @@ def _service_port(self) -> Optional[int]:
394394
395395 def _probes (self ) -> list [ProbeSpec ]:
396396 if isinstance (self .run_spec .configuration , ServiceConfiguration ):
397- return list (map (_probe_config_to_spec , self .run_spec .configuration .probes ))
397+ return list (map (_probe_config_to_spec , self .run_spec .configuration .probes or [] ))
398398 return []
399399
400400
Original file line number Diff line number Diff line change @@ -94,13 +94,13 @@ def validate_run_spec_and_set_defaults(
9494 raise ServerClientError (
9595 "Scheduled services with autoscaling to zero are not supported"
9696 )
97- if len (run_spec .configuration .probes ) > settings .MAX_PROBES_PER_JOB :
97+ if len (run_spec .configuration .probes or [] ) > settings .MAX_PROBES_PER_JOB :
9898 raise ServerClientError (
9999 f"Cannot configure more than { settings .MAX_PROBES_PER_JOB } probes"
100100 )
101101 if any (
102102 p .timeout is not None and p .timeout > settings .MAX_PROBE_TIMEOUT
103- for p in run_spec .configuration .probes
103+ for p in ( run_spec .configuration .probes or [])
104104 ):
105105 raise ServerClientError (
106106 f"Probe timeout cannot be longer than { settings .MAX_PROBE_TIMEOUT } s"
You can’t perform that action at this time.
0 commit comments