Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 32 additions & 1 deletion flash/cli/app.mdx

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Line 169)

Claim: re-running flash app delete after a partial teardown is safe because already-removed endpoints count as removed. Verified against _delete_endpoint_idempotent, which treats a missing/already-deleted endpoint as successfully removed on retry.

Source: https://github.com/runpod/flash/blob/5ed991aae745d9cbd0ce02b3dc7c0cb2e5d49beb/src/runpod_flash/core/api/runpod.py#L991-L1026

Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,18 @@ Name of the Flash app to delete.
2. Prompts for confirmation (required).
3. Deletes all environments and their resources.
4. Deletes all builds.
5. Deletes the app.
5. Tears down the app's Serverless endpoints. Flash discovers them per Flash environment on Runpod's backend, so teardown works even when no local resource tracking exists (for example, in CI).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claim: teardown discovers endpoints per Flash environment on Runpod's backend, working without local resource tracking (e.g. CI). Verified against FlashApp.delete_endpoints(), which lists environments via list_flash_environments_by_app_id and fetches each via get_flash_environment to enumerate endpoints server-side.

Source: https://github.com/runpod/flash/blob/5ed991aae745d9cbd0ce02b3dc7c0cb2e5d49beb/src/runpod_flash/core/resources/app.py#L564-L611

6. If every endpoint was removed, deletes the app record.

If any endpoint cannot be removed, the app record is not deleted and the command exits with a non-zero status; see [app delete fails to remove an endpoint](#app-delete-fails-to-remove-an-endpoint).

### Output

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claim: each removed endpoint prints "✓ deleted endpoint ". Verified against delete_flash_app's per-endpoint print loop, which prints a green checkmark, "deleted endpoint", the endpoint name (or id fallback), and the id with two-space separation.

Source: https://github.com/runpod/flash/blob/5ed991aae745d9cbd0ce02b3dc7c0cb2e5d49beb/src/runpod_flash/cli/commands/apps.py#L117-L122

Each removed endpoint prints a confirmation line, where `<endpoint-name>` and `<endpoint-id>` are the endpoint's name and ID:

```text
✓ deleted endpoint <endpoint-name> <endpoint-id>
```

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claim: on any failed endpoint teardown, flash app delete keeps the app record and exits 1, naming each surviving endpoint. Verified against delete_flash_app: on failed list non-empty, prints error, per-endpoint remediation, then raise typer.Exit(1) before the app-record delete call is ever reached.

Source: https://github.com/runpod/flash/blob/5ed991aae745d9cbd0ce02b3dc7c0cb2e5d49beb/src/runpod_flash/cli/commands/apps.py#L124-L142


<Warning>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claim: failure message is "endpoint not removed; delete it with runpodctl serverless delete ". Verified exact string match against the console.print in the failed-endpoint loop (id present branch).

Source: https://github.com/runpod/flash/blob/5ed991aae745d9cbd0ce02b3dc7c0cb2e5d49beb/src/runpod_flash/cli/commands/apps.py#L130-L135

Expand Down Expand Up @@ -175,6 +186,26 @@ flash deploy --app other-project
flash env list --app other-project
```

## Troubleshooting

### app delete fails to remove an endpoint

When any endpoint cannot be removed, `flash app delete` does not delete the app record and exits with a non-zero status (exit code 1). It names each endpoint that survived teardown. When the endpoint still has an ID, the message gives the command to remove it:

```text
endpoint <endpoint-id> not removed; delete it with runpodctl serverless delete <endpoint-id>
```

Remove the surviving endpoint with [`runpodctl serverless delete`](/runpodctl/reference/runpodctl-serverless#delete-an-endpoint):

```bash
runpodctl serverless delete <endpoint-id>
```

If an endpoint is reported without an ID, it cannot be removed this way; delete it from the Runpod console instead.

Re-running `flash app delete <NAME>` after a partial teardown is safe: endpoints that were already removed count as removed, so the command retries only the survivors.

## Related commands

- [`flash env`](/flash/cli/env) - Manage environments within an app
Expand Down
Loading