Fix ephemeral runner set status update

This commit is contained in:
Nikola Jokic
2026-07-14 19:53:52 +02:00
parent 03463c051c
commit 276bb1ca3a
2 changed files with 5 additions and 3 deletions
@@ -245,7 +245,6 @@ func (r *EphemeralRunnerSetReconciler) Reconcile(ctx context.Context, req ctrl.R
}
func (r *EphemeralRunnerSetReconciler) updateStatus(ctx context.Context, ephemeralRunnerSet *v1alpha1.EphemeralRunnerSet, state *ephemeralRunnersByState, log logr.Logger) error {
original := ephemeralRunnerSet.DeepCopy()
var phase v1alpha1.EphemeralRunnerSetPhase
switch {
case len(state.outdated) > 0:
@@ -262,7 +261,7 @@ func (r *EphemeralRunnerSetReconciler) updateStatus(ctx context.Context, ephemer
// Update the status if needed.
if ephemeralRunnerSet.Status != desiredStatus {
ephemeralRunnerSet.Status = desiredStatus
if err := r.Status().Patch(ctx, ephemeralRunnerSet, client.MergeFrom(original)); err != nil {
if err := r.Status().Update(ctx, ephemeralRunnerSet); err != nil {
log.Error(err, "Failed to update EphemeralRunnerSet status")
return err
}