Commit 15992a6a authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #49826 from dixudx/fix_err_msg_on_two_lines

Automatic merge from submit-queue (batch tested with PRs 49826, 53404). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. avoid newline "\n" in the error to break log msg to 2 lines **What this PR does / why we need it**: **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #49813 **Special notes for your reviewer**: /cc @justinsb @rrati **Release note**: ```release-note avoid newline "\n" in the error to break log msg to 2 lines ```
parents 41568a06 4bef8af6
...@@ -69,9 +69,8 @@ func (expBackoff *ExponentialBackoff) Update(err *error) { ...@@ -69,9 +69,8 @@ func (expBackoff *ExponentialBackoff) Update(err *error) {
expBackoff.lastErrorTime = time.Now() expBackoff.lastErrorTime = time.Now()
} }
func (expBackoff *ExponentialBackoff) GenerateNoRetriesPermittedMsg( func (expBackoff *ExponentialBackoff) GenerateNoRetriesPermittedMsg(operationName string) string {
operationName string) string { return fmt.Sprintf("Operation for %q failed. No retries permitted until %v (durationBeforeRetry %v). Error: %q",
return fmt.Sprintf("Operation for %q failed. No retries permitted until %v (durationBeforeRetry %v). Error: %v",
operationName, operationName,
expBackoff.lastErrorTime.Add(expBackoff.durationBeforeRetry), expBackoff.lastErrorTime.Add(expBackoff.durationBeforeRetry),
expBackoff.durationBeforeRetry, expBackoff.durationBeforeRetry,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment