acoustic-carpenter-78188
07/30/2026, 4:07 PMCalledProcessError: Command '['docker', 'unpause', 'flyte-devbox']' returned non-zero exit status 1.
flyte/cli/_devbox.py in launch_devbox
with docker's stderr from the captured event:
Error response from daemon: Cannot unpause container 06fcfce7dc99...:
OCI runtime resume failed: container not paused
launch_devbox checks docker ps --filter status=paused and then runs docker unpause as two separate docker calls. If the container leaves the paused state in between — a concurrent docker unpause, a daemon restart, the container exiting — docker fails with "container not paused" and the check=True call raises a raw CalledProcessError out of a function wrapped in @_sentry.capture_errors. A local docker state race got reported as an SDK crash.
Every other docker invocation in this module already goes through _run_docker(), which turns failures into a user-facing click.ClickException (filtered from Sentry by _is_user_error). pause and unpause were the two calls that were missed when that helper was introduced.
What
• New `_resume_container()`: treats not paused in docker's output as a lost race and returns False, so launch_devbox falls through to the normal running/start path instead of crashing. Any other unpause failure becomes a ClickException carrying docker's stderr.
• stop_devbox routes docker pause through the existing _run_docker helper.
Tests
5 new tests in tests/cli/test_devbox.py::TestPauseResume — unpause success, the "container not paused" race (reproducing the exact stderr from the Sentry event), a non-race unpause failure, launch_devbox falling through to a fresh start when the race is lost, and stop_devbox surfacing a pause failure as a ClickException. All 5 verified to fail on main without the source change; 24/24 pass with it.
fixes FLYTE-SDK-6W
flyteorg/flyte-sdk