refactor(stack): create stack and deploy stack in async flow CE [BE-12650] (#2238)

This commit is contained in:
Oscar Zhou
2026-04-07 09:18:54 +12:00
committed by GitHub
parent fcf9888677
commit 5aba61cc49
28 changed files with 825 additions and 157 deletions
+4
View File
@@ -172,6 +172,10 @@ func (handler *Handler) updateStackInTx(tx dataservices.DataStoreTx, r *http.Req
stack.UpdatedBy = user.Username
stack.UpdateDate = time.Now().Unix()
stack.Status = portainer.StackStatusActive
// TODO: move to async job when stack update becomes async
stack.DeploymentStatus = []portainer.StackDeploymentStatus{
{Status: portainer.StackStatusActive, Time: time.Now().Unix()},
}
if err := tx.Stack().Update(stack.ID, stack); err != nil {
return nil, httperror.InternalServerError("Unable to persist the stack changes inside the database", err)