From 98ae879d552ecfb2249c41c87c336149abb0abed Mon Sep 17 00:00:00 2001 From: Adam Ruzicka Date: Mon, 24 Jun 2024 14:49:18 +0200 Subject: [PATCH] Fixes #37590 - Trigger ready batches on planning finished Previously we sent the last batch event followed by a regular TriggerNextBatch event with correct number of batches. The proxy batch triggering action received the TriggerLastBatch event, set an internal flag, triggered a single batch and exited, the other event got discarded. This commit changes the ordering so that the TriggerNextBatch event is sent out first when planning is done. (cherry picked from commit 1eb59bbf561bfc30dbc326e0781e05327f221eff) --- app/lib/actions/remote_execution/run_hosts_job.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/lib/actions/remote_execution/run_hosts_job.rb b/app/lib/actions/remote_execution/run_hosts_job.rb index b4a963d4e..21b2601e8 100644 --- a/app/lib/actions/remote_execution/run_hosts_job.rb +++ b/app/lib/actions/remote_execution/run_hosts_job.rb @@ -75,6 +75,7 @@ def trigger_remote_batch end def on_planning_finished + trigger_remote_batch plan_event(Actions::TriggerProxyBatch::TriggerLastBatch, nil, step_id: input[:trigger_run_step_id]) super end