fix: resolve test upgrade staying pending with Invalid Date#2127
Conversation
Three bugs prevented the test upgrade UI from reflecting actual status: 1. Watchdog couldn't parse pretty-printed JSON trigger file - grep patterns now handle optional whitespace (BusyBox-compatible) 2. Frontend UpgradeStatus interface used wrong field names (startTime vs startedAt, targetVersion vs toVersion, etc.) causing "Invalid Date" 3. Per-ID status endpoint never synced watchdog file status to DB - added terminal-state file-sync matching the pattern in getActiveUpgrade() Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Claude finished @Yeraze's task —— View job Code Review Complete ✅SummaryThis PR effectively addresses the "Invalid Date" issue in the upgrade test section. The changes are well-focused and improve reliability across the upgrade system. Overall code quality is good with some minor suggestions below. Detailed Analysis✅ Code Quality & Best Practicesscripts/upgrade-watchdog.sh:401-403
src/components/configuration/AutoUpgradeTestSection.tsx:30-41
src/server/services/upgradeService.ts:237-258
✅ Bug Fixes
✅ Performance Considerations
|
Summary
Fixes #2125
[ ]*character classes instead of\s)UpgradeStatusinterface updated to match backend API (startedAt/completedAt/toVersion/errorinstead ofstartTime/endTime/targetVersion/message), eliminating "Invalid Date" displaygetUpgradeStatus()now checks the watchdog status file for terminal states (complete/failed) and syncs to DB, matching the existing pattern ingetActiveUpgrade()Test plan
npm test— all 2911 tests pass🤖 Generated with Claude Code