Skip to content
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

improved error msg on failed job. Fixes #1159 #1196

Merged
merged 1 commit into from
Jan 20, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/plugins/ExecuteJob/ExecuteJob.js
Original file line number Diff line number Diff line change
Expand Up @@ -639,10 +639,16 @@ define([
this.setAttribute(job, 'stdout', result.stdout);
this.logManager.deleteLog(jobId);
if (info.status !== 'SUCCESS') {
const opName = this.getAttribute(op, 'name');
// Download all files
this.result.addArtifact(info.resultHashes[name + '-all-files']);
// Set the job to failed! Store the error
this.onOperationFail(op, `Operation "${opId}" failed! ${JSON.stringify(info)}`);
// Parse the most precise error and present it in the toast...
const lastline = result.stdout.split('\n').filter(l => !!l).pop();
if (lastline.includes('Error')) {
this.onOperationFail(op, lastline);
} else {
this.onOperationFail(op, `Operation "${opName}" failed!`);
}
} else {
this.onDistOperationComplete(op, info);
}
Expand Down