coolify/app/Actions
Andras Bacsai e3746a4b88 fix: preserve unknown health state and handle edge case container states
This commit fixes container health status aggregation to correctly handle
unknown health states and edge case container states across all resource types.

Changes:

1. **Preserve Unknown Health State**
   - Add three-way priority: unhealthy > unknown > healthy
   - Detect containers without healthchecks (null health) as unknown
   - Apply across GetContainersStatus, ComplexStatusCheck, and Service models

2. **Handle Edge Case Container States**
   - Add support for: created, starting, paused, dead, removing
   - Map to appropriate statuses: starting (unknown), paused (unknown), degraded (unhealthy)
   - Prevent containers in transitional states from showing incorrect status

3. **Add :excluded Suffix for Excluded Containers**
   - Parse exclude_from_hc flag from docker-compose YAML
   - Append :excluded suffix to individual container statuses
   - Skip :excluded containers in non-excluded aggregation sections
   - Strip :excluded suffix in excluded aggregation sections
   - Makes it clear in UI which containers are excluded from monitoring

Files Modified:
- app/Actions/Docker/GetContainersStatus.php
- app/Actions/Shared/ComplexStatusCheck.php
- app/Models/Service.php
- tests/Unit/ContainerHealthStatusTest.php

Tests: 18 passed (82 assertions)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 13:19:25 +01:00
..
Application fix(application): increase docker stop timeout from 10 to 30 seconds for better application shutdown handling 2025-09-29 12:16:13 +02:00
CoolifyTask refactor(proxy-status): refactored how the proxy status is handled on the UI and on the backend 2025-06-06 14:47:54 +02:00
Database fix: remove debugging output from StartPostgresql command handling 2025-11-05 09:10:15 +01:00
Docker fix: preserve unknown health state and handle edge case container states 2025-11-19 13:19:25 +01:00
Fortify fix(user): ensure email attributes are stored in lowercase for consistency and prevent case-related issues 2025-09-05 17:44:34 +02:00
Proxy fix(proxy): prevent "container name already in use" error during proxy restart 2025-11-14 11:35:22 +01:00
Server fix: remove PullHelperImageJob and mass server scheduling 2025-11-14 11:31:08 +01:00
Service refactor: improve command handling and ensure correct working directory for Docker operations 2025-11-10 14:40:03 +01:00
Shared fix: preserve unknown health state and handle edge case container states 2025-11-19 13:19:25 +01:00
Stripe Changes auto-committed by Conductor 2025-10-16 17:13:47 +02:00
User Changes auto-committed by Conductor 2025-10-16 17:13:47 +02:00