mirror of
https://github.com/tiennm99/coolify.git
synced 2026-04-17 23:20:43 +00:00
Fixes inconsistency where Service model used manual state machine logic while all other components (Application, ComplexStatusCheck, GetContainersStatus) use the centralized ContainerStatusAggregator service. Changes: - Refactored Service::aggregateResourceStatuses() to use ContainerStatusAggregator - Removed ~60 lines of duplicated state machine logic - Added comprehensive ServiceExcludedStatusTest with 24 test cases - Fixed bugs in old logic where paused/starting containers were incorrectly marked as unhealthy (should be unknown) Benefits: - Single source of truth for status aggregation across all models - Leverages 42 existing ContainerStatusAggregator tests - Consistent behavior between Service and Application/Database models - Easier maintenance (state machine changes only in one place) All tests pass (37 total): - ServiceExcludedStatusTest: 24/24 passed - AllExcludedContainersConsistencyTest: 13/13 passed 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
14 KiB
14 KiB