Skip to content

TeardownReport

@final
class TeardownReport

What a teardown did, and what it left behind.

Returned rather than raised — see the module docs.

TeardownReport declares no __new__ or __init__, so it is not constructed directly: an instance comes back from another call in this package.

failures: list[str]

Every failure the teardown swallowed, in the order it hit them.

Kept because a teardown that never raises is a teardown whose failures are invisible otherwise, and the first one is usually the cause of the rest.

image_deleted: bool | None

Whether the image was deleted, or None when deletion was not asked for.

leaked: bool

Whether anything a caller asked for was left behind.

lifecycle: str | None

The lifecycle state the sandbox ended in.

Commonly "TERMINATING" rather than "TERMINATED": the default teardown does not wait, so claiming TERMINATED would claim an observation nobody made. Pass wait_for_terminated=True to observe it.

terminate_accepted: bool

Whether the terminate call was accepted.

undeleted: list[str]

Identifiers of everything a caller asked to have deleted that still exists.

Identifiers rather than a boolean, because a leak nobody can name is a leak nobody can clean up. Two things land here: a delete that was attempted and failed, and the build log group, which this client cannot delete at all.

def to_dict() -> dict

The report as a dict, for a JSON envelope.

def __repr__() -> str

This page is generated from bindings/microvms-py/microvms.pyi by Griffe 2.3.0, run from site/scripts/gen-reference.mjs on every pnpm run sync, so an edit made here is overwritten by the next run.

To change the page, change the doc comment in the binding’s Rust source, then regenerate the declarations with mise run stubs. mise run stubs:check fails when the committed file no longer matches the source.