@@ -310,12 +310,12 @@ async def _on_schedule_event(self, schedule_id: ScheduleId) -> None:
310310 return
311311
312312 # 3. all steps are in a final state, process them
313- _logger .debug ("Operation completed: steps_statuses=%s" , steps_statuses )
313+ _logger .debug ("steps_statuses=%s in final state in operation " , steps_statuses )
314314
315315 if step_group .repeat_steps is True and is_creating :
316316 # Meaning check:
317- # A1 . if any of the repeating steps was cancelled -> move to revert
318- # A2 . otherwise restart all steps in the group
317+ # 3A1 . if any of the repeating steps was cancelled -> move to revert
318+ # 3A2 . otherwise restart all steps in the group
319319 await self ._continue_as_repeating_group (
320320 schedule_data_proxy ,
321321 schedule_id ,
@@ -326,9 +326,9 @@ async def _on_schedule_event(self, schedule_id: ScheduleId) -> None:
326326 )
327327 elif is_creating :
328328 # Meaning check:
329- # B1 . if all steps in group in SUUCESS -> move to next group
330- # B2 . if manual intervention is required -> do nothing else
331- # B3 . if any step in CANCELLED or FAILED(and not in manual intervention) -> move to revert
329+ # 3B1 . if all steps in group in SUUCESS -> move to next group
330+ # 3B2 . if manual intervention is required -> do nothing else
331+ # 3B3 . if any step in CANCELLED or FAILED(and not in manual intervention) -> move to revert
332332 await self ._continue_as_creation (
333333 steps_statuses ,
334334 schedule_data_proxy ,
@@ -340,9 +340,9 @@ async def _on_schedule_event(self, schedule_id: ScheduleId) -> None:
340340 )
341341 else :
342342 # Meaning check:
343- # C1 . if all steps in gorup in SUUCESS -> go back to previous group untill done
344- # C2 . it is unexpected to have a FAILED step -> do nothing else
345- # C3 . it is unexpected to have a CANCELLED step -> do nothing else
343+ # 3C1 . if all steps in gorup in SUUCESS -> go back to previous group untill done
344+ # 3C2 . it is unexpected to have a FAILED step -> do nothing else
345+ # 3C3 . it is unexpected to have a CANCELLED step -> do nothing else
346346 await self ._continue_as_reverting (
347347 steps_statuses ,
348348 schedule_data_proxy ,
@@ -375,14 +375,14 @@ async def _continue_as_repeating_group(
375375 # since a cancellation request might have been requested
376376 steps_stauses = await get_steps_statuses (step_proxies )
377377
378- # A1 . if any of the repeating steps was cancelled -> move to revert
378+ # 3A1 . if any of the repeating steps was cancelled -> move to revert
379379 if any (status == StepStatus .CANCELLED for status in steps_stauses .values ()):
380380 # NOTE:
381381 await schedule_data_proxy .set ("is_creating" , value = False )
382382 await enqueue_schedule_event (self .app , schedule_id )
383383 return
384384
385- # A2 . otherwise restart all steps in the group
385+ # 3A2 . otherwise restart all steps in the group
386386 await limited_gather (
387387 * (x .remove () for x in step_proxies ), limit = PARALLEL_STATUS_REQUESTS
388388 )
@@ -406,7 +406,7 @@ async def _continue_as_creation(
406406 current_step_group : BaseStepGroup ,
407407 operation : Operation ,
408408 ) -> None :
409- # B1 . if all steps in group in SUUCESS -> move to next group
409+ # 3B1 . if all steps in group in SUUCESS -> move to next group
410410 if all (status == StepStatus .SUCCESS for status in steps_statuses .values ()):
411411 try :
412412 next_group_index = group_index + 1
@@ -422,7 +422,7 @@ async def _continue_as_creation(
422422
423423 return
424424
425- # B2 . if manual intervention is required -> do nothing else
425+ # 3B2 . if manual intervention is required -> do nothing else
426426 manual_intervention_step_names : set [StepName ] = set ()
427427 current_step_group .get_step_subgroup_to_run ()
428428 for step in current_step_group .get_step_subgroup_to_run ():
@@ -452,7 +452,7 @@ async def _continue_as_creation(
452452 )
453453 return
454454
455- # B3 . if any step in CANCELLED or FAILED(and not in manual intervention) -> move to revert
455+ # 3B3 . if any step in CANCELLED or FAILED(and not in manual intervention) -> move to revert
456456 if any (
457457 s in {StepStatus .FAILED , StepStatus .CANCELLED }
458458 for s in steps_statuses .values ()
@@ -479,7 +479,7 @@ async def _continue_as_reverting(
479479 group_index : NonNegativeInt ,
480480 current_step_group : BaseStepGroup ,
481481 ) -> None :
482- # C1 . if all steps in gorup in SUUCESS -> go back to previous group untill done
482+ # 3C1 . if all steps in gorup in SUUCESS -> go back to previous group untill done
483483 if all (s == StepStatus .SUCCESS for s in steps_statuses .values ()):
484484 previous_group_index = group_index - 1
485485 if previous_group_index < 0 :
@@ -493,7 +493,7 @@ async def _continue_as_reverting(
493493 await enqueue_schedule_event (self .app , schedule_id )
494494 return
495495
496- # C2 . it is unexpected to have a FAILED step -> do nothing else
496+ # 3C2 . it is unexpected to have a FAILED step -> do nothing else
497497 if failed_step_names := [
498498 n for n , s in steps_statuses .items () if s == StepStatus .FAILED
499499 ]:
@@ -527,7 +527,7 @@ async def _continue_as_reverting(
527527 )
528528 return
529529
530- # C3 . it is unexpected to have a CANCELLED step -> do nothing else
530+ # 3C3 . it is unexpected to have a CANCELLED step -> do nothing else
531531 if cancelled_step_names := [
532532 n for n , s in steps_statuses .items () if s == StepStatus .CANCELLED
533533 ]:
0 commit comments