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
@@ -194,6 +194,10 @@ func (handler *Handler) stackGitRedeploy(w http.ResponseWriter, r *http.Request)
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 := handler.DataStore.UpdateTx(func(tx dataservices.DataStoreTx) error {
return tx.Stack().Update(stack.ID, stack)