Skip to content

direct: treat DELETING apps as gone during plan#6045

Merged
denik merged 2 commits into
mainfrom
denik/apps-DELETING
Jul 24, 2026
Merged

direct: treat DELETING apps as gone during plan#6045
denik merged 2 commits into
mainfrom
denik/apps-DELETING

Conversation

@denik

@denik denik commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

App DELETE is fire-and-forget: the app sits in ComputeState=DELETING for up to ~20 minutes and a GET returns it (not 404), so a second delete returns 400 and breaks delete/destroy idempotency.

Add an optional IResource.IsGone(remote) hook, consulted in the plan Delete branch, and implement it for apps to mark the entry Gone so apply cleans up state without re-issuing the delete. Re-enables app.yml.tmpl in the delete_idempotent/destroy_idempotent invariant tests (added in #6009).

denik added 2 commits July 23, 2026 13:17
App DELETE is fire-and-forget: the app sits in ComputeState=DELETING for
up to ~20 minutes and a GET returns it (not 404), so a second delete
returns 400. Add an optional IResource.IsGone(remote) hook, consulted in
the plan Delete branch, and implement it for apps to mark the entry Gone
so apply cleans up state without re-issuing the delete.

Re-enables app.yml.tmpl in the delete_idempotent/destroy_idempotent
invariant tests.

Co-authored-by: Isaac
Assert IsGone directly on the remote returned after delete: true for a
DELETING app (the state the planner short-circuits on), false for the
noop permissions/grants case where the resource genuinely still exists.

Co-authored-by: Isaac
@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: cdf6cfb

Run: 30022161570

Env 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
💚​ aws linux 4 4 322 1059 4:46
💚​ aws windows 4 4 324 1057 4:39
💚​ azure linux 4 4 322 1058 6:02
💚​ azure windows 4 4 324 1056 4:43
💚​ gcp linux 1 5 321 1060 5:38
💚​ gcp windows 1 5 323 1058 5:05
8 interesting tests: 4 RECOVERED, 4 SKIP
Test Name aws linux aws windows azure linux azure windows gcp linux gcp windows
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
🙈​ TestAccept/bundle/invariant/no_drift 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_endpoints/drift/recreated_same_name 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_indexes/recreate/embedding_dimension 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/ssh/connection 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
💚​ TestFetchRepositoryInfoAPI_FromRepo 💚​R 💚​R 💚​R 💚​R 🙈​S 🙈​S
💚​ TestFetchRepositoryInfoAPI_FromRepo/root 💚​R 💚​R 💚​R 💚​R
💚​ TestFetchRepositoryInfoAPI_FromRepo/subdir 💚​R 💚​R 💚​R 💚​R
Top 3 slowest tests (at least 2 minutes):
duration env testname
3:40 gcp windows TestAccept
3:28 aws windows TestAccept
3:27 azure windows TestAccept

@denik
denik added this pull request to the merge queue Jul 24, 2026
Comment on lines +195 to +197
// The resource is in a transient terminal-teardown state (e.g. an app in
// DELETING) that a GET still returns but a second delete would reject.
// Treat it as gone: apply cleans up state without re-issuing the delete.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

comment is too specific for generic adapter.IsGone

Suggested change
// The resource is in a transient terminal-teardown state (e.g. an app in
// DELETING) that a GET still returns but a second delete would reject.
// Treat it as gone: apply cleans up state without re-issuing the delete.
// The resource considered gone per its adapter (e.g. in teardown state)

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.

I think it's good to always include specific examples to support generic statement.

Especially where this is the one and only reason for this adapter method to exist.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

it's not always in transient terminal-teardown state though, right? adapter.IsGone can mean something else too, and then this comment won't get updated in the future if a different resource adds the IsGone implementation.

Merged via the queue into main with commit 359e3b1 Jul 24, 2026
32 checks passed
@denik
denik deleted the denik/apps-DELETING branch July 24, 2026 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants