feat(gitops): improve the data model BE-12919 (#2819)

This commit is contained in:
andres-portainer
2026-06-08 15:01:55 -03:00
committed by GitHub
parent 63eb96859d
commit df7a4b5d6f
41 changed files with 641 additions and 563 deletions
@@ -236,8 +236,8 @@ func (handler *Handler) stackGitRedeploy(w http.ResponseWriter, r *http.Request)
return err
}
return workflows.UpdateArtifactForStack(tx, stack.WorkflowID, stack.ID, func(a *portainer.Artifact) {
a.ConfigHash = oldConfigHash
return workflows.UpdateArtifactFileForStack(tx, stack.WorkflowID, stack.ID, sourceID, func(a *portainer.ArtifactFile) {
a.Hash = oldConfigHash
})
}); err != nil {
log.Error().Err(err).Int("stack_id", int(stack.ID)).Msg("failed to revert config hash after failed redeploy")