Skip to content

Make preemptive mode configurable

What does this MR do?

Gitlab Duo Summarize

Summary of Changes

This change introduces a new configuration option called preemptive_mode for the GitLab Runner autoscaler. Previously, preemptive mode (where the runner waits for idle instances before requesting new CI/CD jobs) was automatically enabled when idle_count was greater than zero. Now, this behavior can be explicitly controlled with the new preemptive_mode boolean setting.

The update includes:

  • Adding the PreemptiveMode field to the AutoscalerPolicyConfig struct
  • Updating documentation to explain this new configuration option
  • Modifying the code to use the explicit setting rather than inferring it from idle_count

This change gives users more flexibility in configuring how the runner manages job requests and instance availability, potentially improving job execution times and resource utilization.

Why was this MR needed?

We are hosting multiple GitLab Environments for our customers, and we wanted to provide a warm pool but also want to get more Runner quickly if needed See #38326 (closed)

What's the best way to test this MR?

What are the relevant issue numbers?

#38326 (closed)

Edited by Pascal Sochacki

Merge request reports

Loading