@@ -13,8 +13,6 @@ import (
13
13
"sync/atomic"
14
14
"time"
15
15
16
- "github.com/hashicorp/go-multierror"
17
-
18
16
"go.elastic.co/apm/v2"
19
17
"gopkg.in/yaml.v2"
20
18
@@ -1571,7 +1569,7 @@ func collectManagerErrors(timeout time.Duration, varsErrCh, runtimeErrCh, config
1571
1569
1572
1570
// combinedErr will store any reported errors as well as timeout errors
1573
1571
// for unresponsive managers.
1574
- var combinedErr error
1572
+ var errs [] error
1575
1573
1576
1574
waitLoop:
1577
1575
for ! returnedRuntime || ! returnedConfig || ! returnedVars || ! returnedUpgradeMarkerWatcher {
@@ -1599,23 +1597,23 @@ waitLoop:
1599
1597
timeouts = append (timeouts , "no response from upgrade marker watcher" )
1600
1598
}
1601
1599
timeoutStr := strings .Join (timeouts , ", " )
1602
- combinedErr = multierror . Append ( combinedErr , fmt .Errorf ("timeout while waiting for managers to shut down: %v" , timeoutStr ))
1600
+ errs = append ( errs , fmt .Errorf ("timeout while waiting for managers to shut down: %v" , timeoutStr ))
1603
1601
break waitLoop
1604
1602
}
1605
1603
}
1606
1604
if runtimeErr != nil && ! errors .Is (runtimeErr , context .Canceled ) {
1607
- combinedErr = multierror . Append ( combinedErr , fmt .Errorf ("runtime manager: %w" , runtimeErr ))
1605
+ errs = append ( errs , fmt .Errorf ("runtime manager: %w" , runtimeErr ))
1608
1606
}
1609
1607
if configErr != nil && ! errors .Is (configErr , context .Canceled ) {
1610
- combinedErr = multierror . Append ( combinedErr , fmt .Errorf ("config manager: %w" , configErr ))
1608
+ errs = append ( errs , fmt .Errorf ("config manager: %w" , configErr ))
1611
1609
}
1612
1610
if varsErr != nil && ! errors .Is (varsErr , context .Canceled ) {
1613
- combinedErr = multierror . Append ( combinedErr , fmt .Errorf ("vars manager: %w" , varsErr ))
1611
+ errs = append ( errs , fmt .Errorf ("vars manager: %w" , varsErr ))
1614
1612
}
1615
1613
if upgradeMarkerWatcherErr != nil && ! errors .Is (upgradeMarkerWatcherErr , context .Canceled ) {
1616
- combinedErr = multierror . Append ( combinedErr , fmt .Errorf ("upgrade marker watcher: %w" , upgradeMarkerWatcherErr ))
1614
+ errs = append ( errs , fmt .Errorf ("upgrade marker watcher: %w" , upgradeMarkerWatcherErr ))
1617
1615
}
1618
- return combinedErr
1616
+ return errors . Join ( errs ... )
1619
1617
}
1620
1618
1621
1619
type coordinatorComponentLog struct {
0 commit comments