Skip to content

Commit

Permalink
Quick app report tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
jon-funk committed Jan 24, 2024
1 parent 1c2f39d commit 681dd42
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions libraries/RW/K8sApplications/k8s_applications.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ def troubleshoot_application(

# get most common exception
max_count = -1
rw_username = os.getenv("RW_USERNAME", "Annonymous")
task_titles = os.getenv("RW_TASK_TITLES", "All")
for hashed_exception in exception_occurences:
count = exception_occurences[hashed_exception]["count"]
if count > max_count:
Expand All @@ -177,13 +179,18 @@ def troubleshoot_application(
err_msg_line = f"The following exception was found while parsing the application logs of {app_name}"
report += (
f"""
### RunSession Details
A RunSession (started by {rw_username}) with the following tasks has produced this GitHub Issue:
- {task_titles}
To view the RunSession, click [this link]({_get_runsession_url()})
{err_msg_line}
```
{most_common_exception}
```
To view the RunSession, click [this link]({_get_runsession_url()})
"""
if most_common_exception
else "No common exceptions could be parsed. Try running the log command provided."
Expand Down

0 comments on commit 681dd42

Please sign in to comment.