fix(agent-runtime): retain executions when runtime stop fails (#2998)

Co-authored-by: Carlos Florencio <carlosmflorencio@gmail.com>
This commit is contained in:
Luan Martins
2026-08-24 20:39:45 +00:00
committed by GitHub
parent d3d4d9d04e
commit a728a0fed7
11 changed files with 284 additions and 86 deletions
@@ -301,7 +301,11 @@ func (c *ControlClient) DeleteInstance(ctx context.Context, instanceID string) e
_ = resp.Body.Close()
}()
if resp.StatusCode != http.StatusOK && resp.StatusCode != http.StatusNoContent {
// A retry may observe 404 after agentctl completed the first delete but its
// response was lost. The desired postcondition is already satisfied.
if resp.StatusCode != http.StatusOK &&
resp.StatusCode != http.StatusNoContent &&
resp.StatusCode != http.StatusNotFound {
var errResp struct {
Error string `json:"error"`
}