-
Notifications
You must be signed in to change notification settings - Fork 6.7k
chore: improve error logs(#10592) #19197
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
Conversation
❌ Preview Environment deleted from BunnyshellAvailable commands (reply to this comment):
|
❌ Preview Environment deleted from BunnyshellAvailable commands (reply to this comment):
|
crenshaw-dev
left a comment
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.
Thanks! Requested one small change.
|
Thank you, I'll change it! |
|
@thisishwan2 yes you'll need to update the unit tests and integration tests accordingly. |
|
@blakepettersson thank you! |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #19197 +/- ##
==========================================
- Coverage 50.71% 50.70% -0.02%
==========================================
Files 316 316
Lines 43495 43495
==========================================
- Hits 22059 22053 -6
- Misses 18922 18930 +8
+ Partials 2514 2512 -2 ☔ View full report in Codecov by Sentry. |
applicationset/generators/git.go
Outdated
| files, err := g.repos.GetFiles(context.TODO(), appSetGenerator.Git.RepoURL, appSetGenerator.Git.Revision, requestedPath.Path, noRevisionCache, verifyCommit) | ||
| if err != nil { | ||
| return nil, err | ||
| return nil, fmt.Errorf("%w", err) |
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 intentionally a no-op? If so, I think we should just stick with return nil, err
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.
Yes, that's right, because when I tested it, err actually returned "error generating params from git: paths error"
If I format with fmt.errorf ("error getting files from Git repository: %w", err") like the previous commit, it will actually return "error generating params from git: error getting files from Git repository: paths error".
Return to return nil, err?
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.
Yep, I think the old way is fine for this one.
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.
I changed it!
Signed-off-by: thisishwan2 <[email protected]>
Co-authored-by: Michael Crenshaw <[email protected]> Signed-off-by: thisishwan2 <[email protected]> Signed-off-by: thisishwan2 <[email protected]>
Signed-off-by: thisishwan2 <[email protected]>
Signed-off-by: thisishwan2 <[email protected]>
* chore: improve error logs Signed-off-by: thisishwan2 <[email protected]> * chore: format change Co-authored-by: Michael Crenshaw <[email protected]> Signed-off-by: thisishwan2 <[email protected]> Signed-off-by: thisishwan2 <[email protected]> * chore: change format message Signed-off-by: thisishwan2 <[email protected]> * chore: Rollback of error formats for generateParamsForGitFiles function Signed-off-by: thisishwan2 <[email protected]> --------- Signed-off-by: thisishwan2 <[email protected]> Signed-off-by: thisishwan2 <[email protected]> Co-authored-by: Michael Crenshaw <[email protected]> Signed-off-by: Rhys Williams <[email protected]>
Hello. This is a PR for issue #10592
I modified the
return errtofmt.Errorf().This is my first open source activity. Please let me know if there is anything wrong.!
Checklist: