feat(sources): add sources and workflows to the backend BE-12919 (#2666)

This commit is contained in:
andres-portainer
2026-05-20 20:42:10 -03:00
committed by GitHub
parent 4cd8c04691
commit 3d09c70e13
71 changed files with 3117 additions and 317 deletions
+13
View File
@@ -74,6 +74,19 @@ func (b *StackBuilder) cleanUp() error {
return nil
}
if b.stack.WorkflowID != 0 {
if err := b.dataStore.UpdateTx(func(tx dataservices.DataStoreTx) error {
err := tx.Workflow().Delete(b.stack.WorkflowID)
if tx.IsErrObjectNotFound(err) {
return nil
}
return err
}); err != nil {
log.Error().Err(err).Msg("unable to cleanup orphan workflow records after failed stack creation")
}
}
if err := b.fileService.RemoveDirectory(b.stack.ProjectPath); err != nil {
log.Error().Err(err).Msg("unable to cleanup stack creation")
}