Skip to content

Commit 79f03d5

Browse files
committed
fix: remove additional try of updatePolicies()
1 parent 02c3913 commit 79f03d5

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

castai/resource_autoscaler.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -828,20 +828,6 @@ func updateAutoscalerPolicies(ctx context.Context, data *schema.ResourceData, me
828828
return upsertPolicies(ctx, meta, clusterId, changedPoliciesJSON)
829829
}
830830

831-
// Try to update policies immediately without any delay.
832-
err := updatePolicies()
833-
if err == nil {
834-
return nil
835-
}
836-
837-
// Check if error is retryable (node template version conflict)
838-
if !isNodeTemplateVersionConflict(err) {
839-
return err // Non-retryable error
840-
}
841-
842-
// Fall back to exponential backoff retry only if version conflict occurred.
843-
log.Printf("[INFO] Node template version conflict detected, will retry with exponential backoff: %v", err)
844-
845831
// Exponential backoff configuration
846832
backoff := wait.Backoff{
847833
Duration: 100 * time.Millisecond,

0 commit comments

Comments
 (0)