@@ -504,7 +504,9 @@ func (s *composeService) waitDependencies(ctx context.Context, project *types.Pr
504504 logrus .Warnf ("optional dependency %q failed to start: %s" , dep , err .Error ())
505505 return nil
506506 }
507- s .events .On (containerEvents (waitingFor , progress .ErrorEvent )... )
507+ s .events .On (containerEvents (waitingFor , func (s string ) progress.Event {
508+ return progress .ErrorEventf (s , "dependency %s failed to start" , dep )
509+ })... )
508510 return fmt .Errorf ("dependency failed to start: %w" , err )
509511 }
510512 if healthy {
@@ -532,7 +534,9 @@ func (s *composeService) waitDependencies(ctx context.Context, project *types.Pr
532534 }
533535
534536 msg := fmt .Sprintf ("service %s" , messageSuffix )
535- s .events .On (containerReasonEvents (waitingFor , progress .ErrorMessageEvent , msg )... )
537+ s .events .On (containerEvents (waitingFor , func (s string ) progress.Event {
538+ return progress .ErrorEventf (s , "service %s" , messageSuffix )
539+ })... )
536540 return errors .New (msg )
537541 }
538542 default :
@@ -600,9 +604,9 @@ func (s *composeService) createContainer(ctx context.Context, project *types.Pro
600604 if err != nil {
601605 if ctx .Err () == nil {
602606 s .events .On (progress.Event {
603- ID : eventName ,
604- Status : progress .Error ,
605- StatusText : err .Error (),
607+ ID : eventName ,
608+ Status : progress .Error ,
609+ Text : err .Error (),
606610 })
607611 }
608612 return ctr , err
@@ -619,9 +623,9 @@ func (s *composeService) recreateContainer(ctx context.Context, project *types.P
619623 defer func () {
620624 if err != nil && ctx .Err () == nil {
621625 s .events .On (progress.Event {
622- ID : eventName ,
623- Status : progress .Error ,
624- StatusText : err .Error (),
626+ ID : eventName ,
627+ Status : progress .Error ,
628+ Text : err .Error (),
625629 })
626630 }
627631 }()
0 commit comments