mirror of
https://github.com/actions/actions-runner-controller.git
synced 2025-12-11 12:06:57 +00:00
Enhance HRA capacity reservation update log
This commit is contained in:
@@ -792,10 +792,16 @@ func (autoscaler *HorizontalRunnerAutoscalerGitHubWebhook) tryScale(ctx context.
|
|||||||
copy.Spec.CapacityReservations = reservations
|
copy.Spec.CapacityReservations = reservations
|
||||||
}
|
}
|
||||||
|
|
||||||
autoscaler.Log.Info(
|
before := len(target.HorizontalRunnerAutoscaler.Spec.CapacityReservations)
|
||||||
|
expired := before - len(capacityReservations)
|
||||||
|
after := len(copy.Spec.CapacityReservations)
|
||||||
|
|
||||||
|
autoscaler.Log.V(1).Info(
|
||||||
"Patching hra for capacityReservations update",
|
"Patching hra for capacityReservations update",
|
||||||
"before", target.HorizontalRunnerAutoscaler.Spec.CapacityReservations,
|
"before", before,
|
||||||
"after", copy.Spec.CapacityReservations,
|
"expired", expired,
|
||||||
|
"amount", amount,
|
||||||
|
"after", after,
|
||||||
)
|
)
|
||||||
|
|
||||||
if err := autoscaler.Client.Patch(ctx, copy, client.MergeFrom(&target.HorizontalRunnerAutoscaler)); err != nil {
|
if err := autoscaler.Client.Patch(ctx, copy, client.MergeFrom(&target.HorizontalRunnerAutoscaler)); err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user