From 44e6945aea8b45df389c8fcda849a298b06d5474 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 30 Apr 2026 13:47:55 +0300 Subject: [PATCH] =?UTF-8?q?tower=200.61.11=20=E2=80=94=20fix=20delete=20ra?= =?UTF-8?q?ce=20+=20force-delete=20patchType?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/values.yaml b/values.yaml index 1b3362e..486998b 100644 --- a/values.yaml +++ b/values.yaml @@ -9,7 +9,7 @@ backend: # so every cluster that runs Tower needs the same imagePullSecret # provisioned out-of-band (until cluster-platform-v3 owns it). repository: registry.odoosky.cloud/odoosky/docker-mirror/tower - tag: "0.61.10" + tag: "0.61.11" pullPolicy: IfNotPresent imagePullSecrets: - name: docker-mirror-pull