v0.278.0: a hold left by an earlier install no longer holds the new one (R-704)
gates / gates (push) Successful in 26s
gates / gates (push) Successful in 26s
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
@@ -496,6 +496,9 @@ func (r *Router) deployStack(w http.ResponseWriter, req *http.Request, name stri
|
||||
return
|
||||
}
|
||||
|
||||
// R-704 (v0.278.0): a fresh install drops a hold an EARLIER install left under this name.
|
||||
r.dropLeftoverHold(name, "install")
|
||||
|
||||
deployReq := stacks.DeployRequest{
|
||||
StackName: name,
|
||||
Values: body.Values,
|
||||
@@ -905,6 +908,27 @@ func (r *Router) getStackBackupData(w http.ResponseWriter, req *http.Request, na
|
||||
writeJSON(w, http.StatusOK, apiResponse{OK: true, Data: resp})
|
||||
}
|
||||
|
||||
// dropLeftoverHold (R-704, v0.278.0) clears the update or crash-loop hold of an app that is NOT installed,
|
||||
// before a new install of it begins (a plain install, or „use my kept data"). Such a hold can only have
|
||||
// been left by an earlier install: before v0.242.0 a removal kept update holds, and before v0.278.0 it
|
||||
// kept crash-loop stops — measured 2026-09-28: a nextcloud update hold from 2026-09-13 on demo-hp made
|
||||
// the backup skip the FRESH install's volumes and unit, so its off-site copy held no data; on 9202 a
|
||||
// calcom crash-loop stop refused the fresh install's update. A restore hold (R-379) is never touched.
|
||||
// Pinned by TestR704_AFreshInstallDropsALeftoverHold.
|
||||
func (r *Router) dropLeftoverHold(name, why string) {
|
||||
if r.sett == nil {
|
||||
return
|
||||
}
|
||||
if st, ok := r.stackMgr.GetStack(name); ok && (st.Deployed || st.Deploying) {
|
||||
return
|
||||
}
|
||||
if cleared, err := r.sett.ClearUpdateHold(name); err != nil {
|
||||
r.logger.Printf("[WARN] [api] %s %s: the hold an earlier install left could not be cleared: %v", why, name, err)
|
||||
} else if cleared {
|
||||
r.logger.Printf("[INFO] [api] %s %s: a hold left by an EARLIER install of this app is dropped (R-704)", why, name)
|
||||
}
|
||||
}
|
||||
|
||||
func (r *Router) removeStack(w http.ResponseWriter, req *http.Request, name string) {
|
||||
if name == "" {
|
||||
writeJSON(w, http.StatusBadRequest, apiResponse{OK: false, Error: "invalid stack name"})
|
||||
|
||||
Reference in New Issue
Block a user