mirror of
https://github.com/actions/actions-runner-controller.git
synced 2025-12-12 20:46:47 +00:00
Do patch runner status instead of update to reduce conflicts and avoid future bugs
Ref https://github.com/summerwind/actions-runner-controller/pull/398#issuecomment-801548375
This commit is contained in:
@@ -463,7 +463,7 @@ func (r *RunnerReconciler) updateRegistrationToken(ctx context.Context, runner v
|
|||||||
ExpiresAt: metav1.NewTime(rt.GetExpiresAt().Time),
|
ExpiresAt: metav1.NewTime(rt.GetExpiresAt().Time),
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := r.Status().Update(ctx, updated); err != nil {
|
if err := r.Status().Patch(ctx, updated, client.MergeFrom(&runner)); err != nil {
|
||||||
log.Error(err, "Failed to update runner status for Registration")
|
log.Error(err, "Failed to update runner status for Registration")
|
||||||
return false, err
|
return false, err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user