Yarn - Rewording log messages - #1124
Open
agrasth wants to merge 1 commit into
Open
Conversation
bhanurp
reviewed
May 29, 2025
Comment on lines
+91
to
+114
| errStr := err.Error() | ||
| switch { | ||
| case strings.Contains(errStr, "i/o timeout"): | ||
| message = fmt.Sprintf("%s: Temporary network timeout occurred, retrying...", message) | ||
| case strings.Contains(errStr, "connection refused"): | ||
| message = fmt.Sprintf("%s: Connection refused - server may be temporarily unavailable, retrying...", message) | ||
| case strings.Contains(errStr, "no such host"): | ||
| message = fmt.Sprintf("%s: DNS resolution failed - host may be temporarily unavailable, retrying...", message) | ||
| case strings.Contains(errStr, "connection reset"): | ||
| message = fmt.Sprintf("%s: Connection was reset - network may be unstable, retrying...", message) | ||
| case strings.Contains(errStr, "TLS handshake timeout"): | ||
| message = fmt.Sprintf("%s: TLS handshake timeout - server may be busy, retrying...", message) | ||
| case strings.Contains(errStr, "too many open files"): | ||
| message = fmt.Sprintf("%s: System file limit reached - waiting for resources to be freed, retrying...", message) | ||
| case strings.Contains(errStr, "503"): | ||
| message = fmt.Sprintf("%s: Service temporarily unavailable (503) - server is overloaded, retrying...", message) | ||
| case strings.Contains(errStr, "502"): | ||
| message = fmt.Sprintf("%s: Bad gateway (502) - upstream server may be unavailable, retrying...", message) | ||
| case strings.Contains(errStr, "504"): | ||
| message = fmt.Sprintf("%s: Gateway timeout (504) - upstream server is not responding, retrying...", message) | ||
| case strings.Contains(errStr, "429"): | ||
| message = fmt.Sprintf("%s: Too many requests (429) - rate limit exceeded, retrying...", message) | ||
| default: | ||
| message = fmt.Sprintf("%s: %s", message, errStr) |
Contributor
There was a problem hiding this comment.
is this specific to yarn? or artifactory? why is this change required?
agrasth
force-pushed
the
feature/rewording-yarn-logs
branch
from
May 29, 2025 20:01
aa09dfe to
bd34576
Compare
agrasth
force-pushed
the
feature/rewording-yarn-logs
branch
from
May 29, 2025 20:11
bd34576 to
08399ef
Compare
bhanurp
reviewed
Oct 9, 2025
| if attemptNumber == 0 { | ||
| log.Debug(fmt.Sprintf("%s - Succeeded on first try", message)) | ||
| } else { | ||
| log.Info(fmt.Sprintf("%s - Succeeded after %d retries", message, attemptNumber)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improve RetryExecutor Logging with Enhanced Context and Clarity
🎯 Overview
Enhanced the
RetryExecutor.LogRetry()function to provide more informative and contextual logging for better debugging and monitoring of retry operations.Changes Made
Enhanced Log Message Structure
[Initial attempt]vs[Retry X/Y]for better progress trackingImproved Log Levels
ERROR: Final failed attempts (critical issues)WARN: Retry attempts with errors (expected during retries)INFO: Successful operations after retries (important milestones)DEBUG: First-try successes (routine operations)Before:
After: