-
Notifications
You must be signed in to change notification settings - Fork 162
Yarn - Rewording log messages #1124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
agrasth
wants to merge
1
commit into
jfrog:dev-deprecated-please-target-master-directly
Choose a base branch
from
agrasth:feature/rewording-yarn-logs
base: dev-deprecated-please-target-master-directly
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Yarn - Rewording log messages #1124
agrasth
wants to merge
1
commit into
jfrog:dev-deprecated-please-target-master-directly
from
agrasth:feature/rewording-yarn-logs
Conversation
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
bhanurp
reviewed
May 29, 2025
utils/retryexecutor.go
Outdated
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this specific to yarn? or artifactory? why is this change required?
aa09dfe to
bd34576
Compare
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)) |
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can be debug as well
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: