From 1837fffc2f8eb4882951e18b467d57034bab3dac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Tich=C3=A1k?= Date: Fri, 9 Oct 2026 18:30:09 +0200 Subject: [PATCH] [core] fix ordering between mesos and k8s tasks transitions --- core/task/manager.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/task/manager.go b/core/task/manager.go index 18815e93..a49edcf0 100644 --- a/core/task/manager.go +++ b/core/task/manager.go @@ -911,10 +911,6 @@ func (m *Manager) transitionTasks(envId uid.ID, tasks Tasks, src string, event s } } - if len(mesosTasks) == 0 { - return nil - } - if len(tasks) != len(mesosTasks) { log.WithField("partition", envId).Infof("Transitioning k8s environment from %s, to %s, event: %s", src, dest, event) if err := m.transitionAndWaitK8sEnvState(context.Background(), envId, strings.ToLower(dest)); err != nil { @@ -922,6 +918,10 @@ func (m *Manager) transitionTasks(envId uid.ID, tasks Tasks, src string, event s } } + if len(mesosTasks) == 0 { + return nil + } + tasks = mesosTasks notify := make(chan controlcommands.MesosCommandResponse)