-
Notifications
You must be signed in to change notification settings - Fork 28
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
MTA-2041: send err to analysis command #149
Conversation
Signed-off-by: Emily McMullan <[email protected]>
@@ -119,12 +119,10 @@ func NewAnalyzeCmd(log logr.Logger) *cobra.Command { | |||
} | |||
xmlOutputDir, err := analyzeCmd.ConvertXML(cmd.Context()) | |||
if err != nil { | |||
log.Error(err, "failed to convert xml rules") |
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.
it looks like error comes out empty everytime because the analyzer command is not producing any output to stderr. I am wondering whether we should fix that in analyzer-lsp and not remove these lines.
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.
Will take a look there
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.
it might be worth adding a flag, that can say print to stderr on failure for all of the commands (shim/lsp/dep).
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.
The issue is that without sending the error to stderr, the error on output is blank like so:
ERRO[0042] container run error error="exit status 1"
Error:
Instead of a flag, maybe we need to force this? Is this something we want to close here and open as an issue in analyzer? @pranavgaikwad @shawn-hurley
@@ -172,8 +172,7 @@ func (w *windupShimCommand) Run(ctx context.Context) error { | |||
WithCleanup(w.cleanup), | |||
) | |||
if err != nil { | |||
w.log.V(1).Error(err, "failed to run convert command") |
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.
Same comment as above
closing for fix in analyzer-lsp konveyor/analyzer-lsp#479 |
Because we send errs to logs: https://github.com/konveyor/kantra/blob/main/cmd/analyze.go#L746 the errors hit during analysis or shim would not bubble up to the analyze command itself: https://github.com/konveyor/kantra/blob/main/cmd/analyze.go#L128
Closes #148