when updating a step to canceled status, we can skip terminal status check when is_last = true (#524)

This commit is contained in:
Shuchang Zheng
2024-06-26 17:58:10 -07:00
committed by GitHub
parent 6fa95dd7d2
commit b7af52d037

View File

@@ -66,6 +66,9 @@ class Step(BaseModel):
if status and not old_status.can_update_to(status):
raise ValueError(f"invalid_status_transition({old_status},{status},{self.step_id})")
if status == StepStatus.canceled:
return
if status and status.requires_output() and output is None:
raise ValueError(f"status_requires_output({status},{self.step_id})")