Claude 44e6945aea tower 0.61.11 — fix delete race + force-delete patchType
End-to-end smoke surfaced two bugs that combine to nuke a fresh
instance:

1. ForceDeleteApplication was unreachable because Argo's HTTP PATCH
   is gRPC-gateway-backed and requires a structured body
   `{name, patch, patchType}` where patch is the merge-patch encoded
   as a string. We were sending a raw merge-patch with `?type=merge`,
   which Argo rejects with HTTP 500: `proto: required field
   "patchType" not set`. Result: every instance-delete in history is
   marked "failed" because force-delete fallback never worked.

2. handleCreateInstance only checked `applicationExists` for the
   conflict guard. ArgoCD's cascade can take 5+ minutes to actually
   tear down (PVC protection, dead customer cluster) — long enough
   that applicationExists returns false but the cascade is STILL
   running. If a fresh create lands in that window, the new App
   takes the same name and the stale cascade clobbers it when it
   finally finishes.

Fix #2: also reject create when an instance-delete op for the same
code is in pending/running state. Operator gets a clear "delete
still in progress — please wait" message instead of the silent
ten-minutes-later "instance vanished" failure.

Confirmed in production by op log:
  10:28:46 instance-delete odoo16 (running 6 min, finally errored
           out at 10:34:48 with the patchType marshal error)
  10:29:59 instance-create odoo16 (succeeded at 10:30:02 — landed
           inside the still-cascading window)
  10:36:08 addon-apply odoo16 (failed: HTTP 403 — Argo App gone)
2026-04-30 13:47:55 +03:00
2026-04-26 18:01:44 +03:00
2026-04-26 15:01:43 +00:00

admin-platform-v3

Tower platform Helm chart

Description
Tower platform Helm chart
Readme 1,010 KiB
Languages
Smarty 100%