Skip to content

Commit 1837fff

Browse files
committed
[core] fix ordering between mesos and k8s tasks transitions
1 parent b1589b6 commit 1837fff

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎core/task/manager.go‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -911,17 +911,17 @@ func (m *Manager) transitionTasks(envId uid.ID, tasks Tasks, src string, event s
911911
}
912912
}
913913

914-
if len(mesosTasks) == 0 {
915-
return nil
916-
}
917-
918914
if len(tasks) != len(mesosTasks) {
919915
log.WithField("partition", envId).Infof("Transitioning k8s environment from %s, to %s, event: %s", src, dest, event)
920916
if err := m.transitionAndWaitK8sEnvState(context.Background(), envId, strings.ToLower(dest)); err != nil {
921917
return err
922918
}
923919
}
924920

921+
if len(mesosTasks) == 0 {
922+
return nil
923+
}
924+
925925
tasks = mesosTasks
926926

927927
notify := make(chan controlcommands.MesosCommandResponse)

0 commit comments

Comments
 (0)