Keep failures

Keep a failed job's sandbox asleep for a while, and open it over SSH to see what went wrong

When a trusted job fails, Pod CI can keep its sandbox instead of deleting it: put to sleep as it was at the end of the job, and held for a time you choose, so you can look inside.

Turn it on for a repository

It is off until you turn it on. A newly connected repository keeps no failed sandbox: its keep_failures_s setting, how long a failed job's sandbox is held in seconds, is 0. Set it to hold one for up to 43,200 seconds, 12 hours; 0 turns it off again. Choose a time in CI › Repositories in the dashboard, or set any number of seconds in that range:

mpod ci repositories settings set <installation> <repository_id> --keep-failures-s 3600

More than 43,200 is refused as invalid, naming keep_failures_s. Changing a repository's settings takes a person whose role holds ci:write (owners, admins and members), with a second factor proved in the last few minutes. An API key is refused with person_required. The change is kept with who made it.

A sandbox is kept only when the job failed and was trusted. It is never kept for an untrusted job, such as a pull request from a fork, whatever the setting says, nor while the account is past due. Kept sandboxes are for GitHub repositories only, not Buildkite pipelines.

Open a kept sandbox

Not available yet Failed sandboxes are kept, but opening one over SSH is refused until Pod's SSH access is offered.

The person who started the run, or an admin of the repository on GitHub, can let one OpenSSH public key in until the hold ends:

mpod ci kept open pod-ci-… --public-key ~/.ssh/id_ed25519.pub

The sandbox wakes, and the answer says where to connect and until when. The same call is open a kept runner.

What it costs

The seconds a sandbox is kept show on its runner in your usage.