Skip to content

Commit c6b7313

Browse files
ci: fix infinite loop edge case bug in deploy script (#96)
1 parent e086005 commit c6b7313

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

stackDeploy.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -848,15 +848,12 @@ def main() -> None:
848848

849849
if parallel:
850850
# All configs with state_code awaiting_validation can be validated
851-
deployed_configs = []
852851
error_occurred = False
853-
while len(deployed_configs) < len(config_ids) and not error_occurred:
852+
while config_ids and not error_occurred:
854853
ready_to_deploy = []
855854
# identify all configs that can be deployed
856855
for config in config_ids:
857856
# skip already deployed configs
858-
if config in deployed_configs:
859-
continue
860857
config_name = get_config_name(project_id, list(config.values())[0]['config_id'])
861858

862859
try:
@@ -868,6 +865,7 @@ def main() -> None:
868865

869866
current_state = get_config_state(project_id, list(config.values())[0]['config_id'])
870867
if current_state == State.DEPLOYED:
868+
config_ids.remove(config)
871869
continue
872870

873871
logging.info(f"Checking for config {config_name} ID: {list(config.values())[0]['config_id']} "
@@ -912,8 +910,7 @@ def main() -> None:
912910
error_messages.append(str(future.exception()))
913911
error_occurred = True
914912
break
915-
else:
916-
deployed_configs.append(future.result())
913+
917914
else:
918915
for config in config_ids:
919916
try:

0 commit comments

Comments
 (0)