in pkg/clusters/clusters.go [182:199]
func (m *clusterMigrator) wait(ctx context.Context, opID string) error {
name := pkg.OperationsPath(m.projectID, m.cluster.Location, opID)
op, err := m.clients.Container.GetOperation(ctx, name)
if err != nil {
return err
}
opPath := pkg.PathRegex.FindString(op.SelfLink)
w := &ContainerOperation{
ProjectID: m.projectID,
Path: opPath,
Client: m.clients.Container,
}
if err := m.handler.Wait(ctx, w); err != nil {
return fmt.Errorf("error waiting on ongoing operation %s: %w", name, err)
}
return nil
}