Skip to content

Commit

Permalink
Fix for clarification of output stream sources
Browse files Browse the repository at this point in the history
  • Loading branch information
hujambo-dunia committed Apr 29, 2024
1 parent d2c0190 commit 5d77c98
Show file tree
Hide file tree
Showing 3 changed files with 105 additions and 54 deletions.
147 changes: 95 additions & 52 deletions lib/galaxy/tools/email_templates/errors_dataset.html
Original file line number Diff line number Diff line change
@@ -1,66 +1,109 @@
<html>
<body>
<h1>Galaxy Tool Error Report</h1>
<span class="sub"><i>from</i> <span style="font-family: monospace;"><a href="${host}">${host}</a></span>
<h1>Galaxy Tool Error Report</h1>
<span class="sub">
<i>from</i>
<span style="font-family: monospace;">
<a href="${host}">${host}</a>
</span>
</span>

<h3>Error Localization</h3>
<table style="margin:1em">
<tbody>
<tr><td>Dataset</td><td><a href="${hda_show_params_link}">${dataset_id} (${dataset_id_encoded})</a></td></tr>
<tr style="background-color: #f2f2f2"><td>History</td><td><a href="${history_view_link}">${history_id} (${history_id_encoded})</a></td></tr>
<tr><td>Failed Job</td><td>${hid}: ${history_item_name} (${hda_id_encoded})</td></tr>
</tbody>
</table>
<h3>Error Localization</h3>
<table style="margin:1em">
<tbody>
<tr>
<td>Dataset</td>
<td>
<a href="${hda_show_params_link}">${dataset_id} (${dataset_id_encoded})</a>
</td>
</tr>
<tr style="background-color: #f2f2f2">
<td>History</td>
<td>
<a href="${history_view_link}">${history_id} (${history_id_encoded})</a>
</td>
</tr>
<tr>
<td>Failed Job</td>
<td>${hid}: ${history_item_name} (${hda_id_encoded})</td>
</tr>
</tbody>
</table>

<h3>User Provided Information</h3>
<h3>User Provided Information</h3>
The user
<span style="font-family: monospace;">${email_str}</span>
provided the following information:
<pre style="white-space: pre-wrap;background: #eeeeee;border:1px solid black;padding:1em;">
${message}
</pre>

The user <span style="font-family: monospace;">${email_str}</span> provided the following information:
<h3>Detailed Job Information</h3>
Job environment and execution information is available at the job
<a href="${hda_show_params_link}">info page</a>.

<pre style="white-space: pre-wrap;background: #eeeeee;border:1px solid black;padding:1em;">
${message}
</pre>
<table style="margin:1em">
<tbody>
<tr>
<td>Job ID</td>
<td>${job_id} (${job_id_encoded})</td>
</tr>
<tr style="background-color: #f2f2f2">
<td>Tool ID</td>
<td>${job_tool_id}</td>
</tr>
<tr>
<td>Tool Version</td>
<td>${tool_version}</td>
</tr>
<tr style="background-color: #f2f2f2">
<td>Job PID or DRM id</td>
<td>${job_runner_external_id}</td>
</tr>
<tr>
<td>Job Tool Version</td>
<td>${job_tool_version}</td>
</tr>
</tbody>
</table>

<h3>Job Execution and Failure Information</h3>
<h4>Command Line</h4>
<pre style="white-space: pre-wrap;background: #eeeeee;border:1px solid black;padding:1em;">
${job_command_line}
</pre>

<h3>Detailed Job Information</h3>
<h4>Job stderr</h4>
<pre style="white-space: pre-wrap;background: #eeeeee;border:1px solid black;padding:1em;">
${job_stderr}
</pre>

Job environment and execution information is available at the job <a href="${hda_show_params_link}">info page</a>.
<h4>Job stdout</h4>
<pre style="white-space: pre-wrap;background: #eeeeee;border:1px solid black;padding:1em;">
${job_stdout}
</pre>

<table style="margin:1em">
<tbody>
<tr><td>Job ID</td><td>${job_id} (${job_id_encoded})</td></tr>
<tr style="background-color: #f2f2f2"><td>Tool ID</td><td>${job_tool_id}</td></tr>
<tr><td>Tool Version</td><td>${tool_version}</td></tr>
<tr style="background-color: #f2f2f2"><td>Job PID or DRM id</td><td>${job_runner_external_id}</td></tr>
<tr><td>Job Tool Version</td><td>${job_tool_version}</td></tr>
</tbody>
</table>
<h4>Job Information</h4>
<pre style="white-space: pre-wrap;background: #eeeeee;border:1px solid black;padding:1em;">
${job_info}
</pre>

<h3>Job Execution and Failure Information</h3>
<h4>Job Traceback</h4>
<pre style="white-space: pre-wrap;background: #eeeeee;border:1px solid black;padding:1em;">
${job_traceback}
</pre>

<h4>Command Line</h4>
<pre style="white-space: pre-wrap;background: #eeeeee;border:1px solid black;padding:1em;">
${job_command_line}
</pre>
<h3>Tool Execution and Failure Information</h3>
<h4>Tool stderr</h4>
<pre style="white-space: pre-wrap;background: #eeeeee;border:1px solid black;padding:1em;">
${tool_stderr}
</pre>

<h4>stderr</h4>
<pre style="white-space: pre-wrap;background: #eeeeee;border:1px solid black;padding:1em;">
${job_stderr}
</pre>
<h4>Tool stdout</h4>
<pre style="white-space: pre-wrap;background: #eeeeee;border:1px solid black;padding:1em;">
${tool_stdout}
</pre>

<h4>stdout</h4>
<pre style="white-space: pre-wrap;background: #eeeeee;border:1px solid black;padding:1em;">
${job_stdout}
</pre>

<h4>Job Information</h4>
<pre style="white-space: pre-wrap;background: #eeeeee;border:1px solid black;padding:1em;">
${job_info}
</pre>

<h4>Job Traceback</h4>
<pre style="white-space: pre-wrap;background: #eeeeee;border:1px solid black;padding:1em;">
${job_traceback}
</pre>

This is an automated message. Do not reply to this address.
</body></html>
This is an automated message. Do not reply to this address.
</body>
</html>
6 changes: 6 additions & 0 deletions lib/galaxy/tools/email_templates/errors_dataset.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,10 @@ ${job_info}
job traceback:
${job_traceback}
-----------------------------------------------------------------------------
tool stderr:
${tool_stderr}
-----------------------------------------------------------------------------
tool stdout:
${tool_stdout}
-----------------------------------------------------------------------------
(This is an automated message).
6 changes: 4 additions & 2 deletions lib/galaxy/tools/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,12 @@ def create_report(self, user, email="", message="", redact_user_details_in_bugre
job_tool_version=hda.tool_version,
job_runner_external_id=job.job_runner_external_id,
job_command_line=job.command_line,
job_stderr=util.unicodify(job.stderr),
job_stdout=util.unicodify(job.stdout),
job_stderr=util.unicodify(job.job_stderr),
job_stdout=util.unicodify(job.job_stdout),
job_info=util.unicodify(job.info),
job_traceback=util.unicodify(job.traceback),
tool_stderr=util.unicodify(job.tool_stderr),
tool_stdout=util.unicodify(job.tool_stdout),
email_str=email_str,
message=util.unicodify(message),
)
Expand Down

0 comments on commit 5d77c98

Please sign in to comment.