Skip to content

fix(mlops): stop PipelineExecution.wait() on a Stopped execution - #6423

Open
AkshayShah03 wants to merge 1 commit into
aws:masterfrom
AkshayShah03:fix/pipeline-execution-wait-stopped
Open

AkshayShah03 wants to merge 1 commit into
aws:masterfrom
AkshayShah03:fix/pipeline-execution-wait-stopped

Conversation

@AkshayShah03

Copy link
Copy Markdown

Issue #, if available: N/A

Description of changes:

The PipelineExecutionComplete waiter used by PipelineExecution.wait() only has acceptors for Succeeded and Failed. Stopped is also a terminal pipeline execution status, so waiting on a stopped execution keeps polling until max_attempts and then fails with Max attempts exceeded. With the defaults (delay=30, max_attempts=60) that takes 30 minutes.

PipelineExecution.result() swallows terminal-failure WaiterErrors and goes on to report the step's status. It doesn't swallow the max-attempts error, so for a stopped execution it raised after the full wait instead.

This change adds a Stopped acceptor with state: failure, like Failed.

Testing:

  • New test_pipeline_execution_wait_stops_on_terminal_failure, parametrized over Failed and Stopped. It runs the real botocore waiter against a stubbed client and asserts there is exactly one describe call.
  • The Stopped case fails before this change.
  • sagemaker-mlops/tests/unit/workflow: 361 passed.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

The PipelineExecutionComplete waiter only had acceptors for Succeeded and
Failed. Stopped is also a terminal pipeline execution status, so waiting on
a stopped execution kept polling until max_attempts (30 minutes by default)
and then failed with 'Max attempts exceeded'. result() swallows terminal
failures but not that error, so it raised too instead of reporting the step.

Treat Stopped as a terminal failure, like Failed.

This branch had an error being deployed

1 failed deployment
manual-approval — 2a062ce0 Deployed Oct 10, 2026 by AkshayShah03 via wait-for-approval #1699
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant