fix: better converge output
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
Closes coop-cloud/organising#263.
This commit is contained in:
parent
3901258a96
commit
748d607ddc
|
@ -350,7 +350,7 @@ func deployServices(
|
|||
existingServiceMap[service.Spec.Name] = service
|
||||
}
|
||||
|
||||
var serviceIDs []string
|
||||
serviceIDs := make(map[string]string)
|
||||
for internalName, serviceSpec := range services {
|
||||
var (
|
||||
name = namespace.Scope(internalName)
|
||||
|
@ -410,7 +410,7 @@ func deployServices(
|
|||
return errors.Wrapf(err, "failed to update service %s", name)
|
||||
}
|
||||
|
||||
serviceIDs = append(serviceIDs, service.ID)
|
||||
serviceIDs[service.ID] = name
|
||||
|
||||
for _, warning := range response.Warnings {
|
||||
logrus.Warn(warning)
|
||||
|
@ -430,15 +430,19 @@ func deployServices(
|
|||
return errors.Wrapf(err, "failed to create service %s", name)
|
||||
}
|
||||
|
||||
serviceIDs = append(serviceIDs, serviceCreateResponse.ID)
|
||||
serviceIDs[serviceCreateResponse.ID] = name
|
||||
}
|
||||
}
|
||||
|
||||
logrus.Infof("waiting for services to converge: %s", strings.Join(serviceIDs, ", "))
|
||||
var serviceNames []string
|
||||
for _, serviceName := range serviceIDs {
|
||||
serviceNames = append(serviceNames, serviceName)
|
||||
}
|
||||
logrus.Infof("waiting for services to converge: %s", strings.Join(serviceNames, ", "))
|
||||
|
||||
ch := make(chan error, len(serviceIDs))
|
||||
for _, serviceID := range serviceIDs {
|
||||
logrus.Debugf("waiting on %s to converge", serviceID)
|
||||
for serviceID, serviceName := range serviceIDs {
|
||||
logrus.Debugf("waiting on %s to converge", serviceName)
|
||||
go func(s string) {
|
||||
ch <- waitOnService(ctx, cl, s)
|
||||
}(serviceID)
|
||||
|
|
Loading…
Reference in New Issue