portainer/portainer · error
failed to persist git sync status for stack %d: %w
Error message
failed to persist git sync status for stack %d: %w
What it means
Error "failed to persist git sync status for stack %d: %w" thrown in portainer/portainer.
Source
Thrown at api/stacks/deployments/deploy.go:167
var gitCommitChangedOrForceUpdate bool
if !stack.FromAppTemplate {
updated, newHash, err := update.UpdateGitObject(ctx, gitService, fmt.Sprintf("stack:%d", stack.ID), gitConfig, false, stack.ProjectPath)
if err != nil {
if txErr := datastore.UpdateTx(func(tx dataservices.DataStoreTx) error {
return workflows.SaveStackStatus(tx, userContext, stack.WorkflowID, stack.ID, gitSrc.ID, err)
}); txErr != nil {
return fmt.Errorf("git check failed for stack %d: %w (and failed to persist status: %w)", stack.ID, err, txErr)
}
return err
}
if txErr := datastore.UpdateTx(func(tx dataservices.DataStoreTx) error {
return workflows.SaveStackStatus(tx, userContext, stack.WorkflowID, stack.ID, gitSrc.ID, nil)
}); txErr != nil {
return fmt.Errorf("failed to persist git sync status for stack %d: %w", stack.ID, txErr)
}
if updated {
gitConfig.ConfigHash = newHash
stack.UpdateDate = time.Now().Unix()
gitCommitChangedOrForceUpdate = updated
}
if stack.AutoUpdate != nil && stack.AutoUpdate.ForceUpdate {
gitCommitChangedOrForceUpdate = true
}
}
if !gitCommitChangedOrForceUpdate {
return nil
}
View on GitHub (pinned to 17e74456ff)
When it happens
Trigger: Thrown at api/stacks/deployments/deploy.go:167 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of portainer/portainer@17e74456ff (2026-08-26).
Data as JSON: /api/errors/9bbfc070849c7f14.
Report an issue: GitHub.