-
Notifications
You must be signed in to change notification settings - Fork 49
docs: Document endpoint teardown in flash app delete #826
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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). | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
| 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 | ||
|
|
||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
| 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> | ||
| ``` | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
|
|
||
| <Warning> | ||
|
|
||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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). |
||
|
|
@@ -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 | ||
|
|
||
There was a problem hiding this comment.
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