fix: harden desktop monitoring recovery
Desktop Client Build / Resolve Build Metadata (push) Successful in 37s
Backend CI / Backend (push) Failing after 9m26s
Desktop Client Build / Build Desktop Client (push) Successful in 22m29s
Desktop Client Build / Publish Client Artifacts to NAS (push) Successful in 35s
Desktop Client Build / Resolve Build Metadata (push) Successful in 37s
Backend CI / Backend (push) Failing after 9m26s
Desktop Client Build / Build Desktop Client (push) Successful in 22m29s
Desktop Client Build / Publish Client Artifacts to NAS (push) Successful in 35s
This commit is contained in:
@@ -993,24 +993,21 @@ func (s *MonitoringService) CollectNow(
|
||||
phase2DispatchReady := executionOwner == "desktop_tasks"
|
||||
if len(phase2TaskSpecs) > 0 {
|
||||
phase2TaskCount := len(phase2TaskSpecs)
|
||||
publishedTasks, fallbackLegacyTaskIDs, dispatchErr := s.dispatchMonitorDesktopTasks(ctx, phase2TaskSpecs)
|
||||
publishedTasks, deferredTaskIDs, dispatchErr := s.dispatchMonitorDesktopTasks(ctx, phase2TaskSpecs)
|
||||
if dispatchErr != nil {
|
||||
if fallbackErr := s.fallbackMonitorDesktopTasksToLegacy(ctx, monitorDesktopTaskSpecIDs(phase2TaskSpecs)); fallbackErr != nil {
|
||||
return nil, fallbackErr
|
||||
}
|
||||
phase2DispatchReady = false
|
||||
phase2TaskSpecs = nil
|
||||
if s.logger != nil {
|
||||
s.logger.Warn("phase2 monitor desktop dispatch failed, falling back to legacy execution",
|
||||
s.logger.Warn("phase2 monitor desktop dispatch failed; pending tasks will retry when a desktop client is online",
|
||||
zap.Error(dispatchErr),
|
||||
zap.Int("phase2_task_count", phase2TaskCount),
|
||||
)
|
||||
}
|
||||
} else {
|
||||
if len(fallbackLegacyTaskIDs) > 0 {
|
||||
if fallbackErr := s.fallbackMonitorDesktopTasksToLegacy(ctx, fallbackLegacyTaskIDs); fallbackErr != nil {
|
||||
return nil, fallbackErr
|
||||
}
|
||||
if len(deferredTaskIDs) > 0 && s.logger != nil {
|
||||
s.logger.Info("phase2 monitor desktop tasks deferred until a desktop client is online",
|
||||
zap.Int("deferred_task_count", len(deferredTaskIDs)),
|
||||
)
|
||||
}
|
||||
phase2PublishedTasks = publishedTasks
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user