From c0839a6c3037a605e4d9d2b973207f9cd61748eb Mon Sep 17 00:00:00 2001 From: takahashi shun Date: Thu, 4 Dec 2025 22:56:40 +0900 Subject: [PATCH] fix(capacitybuffer): correct spelling mistakes in function names and messages Fixed spelling errors: - atrtibutesSetSuccessfully -> attributesSetSuccessfully - provisioing -> provisioning - UpdateBufferStatusToFailedProvisioing -> UpdateBufferStatusToFailedProvisioning - UpdateBufferStatusToSuccessfullyProvisioing -> UpdateBufferStatusToSuccessfullyProvisioning - passes -> passed (in function comments) --- cluster-autoscaler/capacitybuffer/common/common.go | 13 ++++++------- .../processors/capacitybuffer/pod_list_processor.go | 4 ++-- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/cluster-autoscaler/capacitybuffer/common/common.go b/cluster-autoscaler/capacitybuffer/common/common.go index 9574cf3585b3..077515359aad 100644 --- a/cluster-autoscaler/capacitybuffer/common/common.go +++ b/cluster-autoscaler/capacitybuffer/common/common.go @@ -45,15 +45,14 @@ func SetBufferAsReadyForProvisioning(buffer *v1.CapacityBuffer, PodTemplateRef * Type: ReadyForProvisioningCondition, Status: ConditionTrue, Message: "ready", - Reason: "atrtibutesSetSuccessfully", + Reason: "attributesSetSuccessfully", LastTransitionTime: metav1.Time{Time: time.Now()}, } buffer.Status.Conditions = []metav1.Condition{readyCondition} } // SetBufferAsNotReadyForProvisioning updates the passed buffer object with the rest of the attributes and sets its condition to not ready with the passed error -func SetBufferAsNotReadyForProvisioning(buffer *v1.CapacityBuffer, PodTemplateRef *v1.LocalObjectRef, podTemplateGeneration *int64, replicas *int32, provStrategy *string, err error) { - errorMessage := "Buffer not ready for provisioing" +func SetBufferAsNotReadyForProvisioning(buffer *v1.CapacityBuffer, PodTemplateRef *v1.LocalObjectRef, podTemplateGeneration *int64, replicas *int32, provStrategy *string, err error) { errorMessage := "Buffer not ready for provisioning" if err != nil { errorMessage = err.Error() } @@ -80,8 +79,8 @@ func mapEmptyProvStrategyToDefault(ps *string) *string { return ps } -// UpdateBufferStatusToFailedProvisioing updates the status of the passed buffer and set Provisioning to false with the passes reason and message -func UpdateBufferStatusToFailedProvisioing(buffer *v1.CapacityBuffer, reason, errorMessage string) { +// UpdateBufferStatusToFailedProvisioning updates the status of the passed buffer and set Provisioning to false with the passed reason and message +func UpdateBufferStatusToFailedProvisioning(buffer *v1.CapacityBuffer, reason, errorMessage string) { buffer.Status.Conditions = []metav1.Condition{{ Type: ProvisioningCondition, Status: ConditionFalse, @@ -91,8 +90,8 @@ func UpdateBufferStatusToFailedProvisioing(buffer *v1.CapacityBuffer, reason, er }} } -// UpdateBufferStatusToSuccessfullyProvisioing updates the status of the passed buffer and set Provisioning to true with the passes reason -func UpdateBufferStatusToSuccessfullyProvisioing(buffer *v1.CapacityBuffer, reason string) { +// UpdateBufferStatusToSuccessfullyProvisioning updates the status of the passed buffer and set Provisioning to true with the passed reason +func UpdateBufferStatusToSuccessfullyProvisioning(buffer *v1.CapacityBuffer, reason string) { buffer.Status.Conditions = []metav1.Condition{{ Type: ProvisioningCondition, Status: ConditionTrue, diff --git a/cluster-autoscaler/processors/capacitybuffer/pod_list_processor.go b/cluster-autoscaler/processors/capacitybuffer/pod_list_processor.go index 5184c4e6d2a3..b1882e618c1e 100644 --- a/cluster-autoscaler/processors/capacitybuffer/pod_list_processor.go +++ b/cluster-autoscaler/processors/capacitybuffer/pod_list_processor.go @@ -140,11 +140,11 @@ func (p *CapacityBufferPodListProcessor) provision(buffer *v1alpha1.CapacityBuff } fakePods, err := makeFakePods(buffer, &podTemplate.Template, int(*replicas)) if err != nil { - common.UpdateBufferStatusToFailedProvisioing(buffer, "FailedToMakeFakePods", fmt.Sprintf("failed to create fake pods with error: %v", err.Error())) + common.UpdateBufferStatusToFailedProvisioning(buffer, "FailedToMakeFakePods", fmt.Sprintf("failed to create fake pods with error: %v", err.Error())) p.updateBufferStatus(buffer) return []*apiv1.Pod{} } - common.UpdateBufferStatusToSuccessfullyProvisioing(buffer, "FakePodsInjected") + common.UpdateBufferStatusToSuccessfullyProvisioning(buffer, "FakePodsInjected") p.updateBufferStatus(buffer) return fakePods }