Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions backend/internal/services/project_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -1006,6 +1006,13 @@ func (s *ProjectService) cleanupDBProjects(ctx context.Context, seen map[string]
continue
}

// Skip projects whose lifecycle is owned by the gitops system.
// Their compose files may not exist on disk yet (e.g. during a sync
// or after an SSH/clone failure) and should never be deleted here.
if p.GitOpsManagedBy != nil && strings.TrimSpace(*p.GitOpsManagedBy) != "" {
continue
}

validDir, err := projects.IsProjectDirectoryPath(p.Path, followProjectSymlinks)
if err != nil {
if os.IsNotExist(err) {
Expand Down
Loading