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

Only report each RelVal failure once; fix formatting #2382

Merged
merged 1 commit into from
Nov 25, 2024
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
24 changes: 13 additions & 11 deletions report-pull-request-results.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,11 @@ def get_wf_error_msg(out_file, filename=True):
elif "A fatal system signal has occurred:" in line:
error_lines += "\n" + line
break
if not error_lines and filename:
error_lines = "/".join(out_file.split("/")[-2:]) + "\n"
if not error_lines:
if filename:
error_lines = "/".join(out_file.split("/")[-2:]) + "\n"
else:
error_lines = "UNKNOWN\n"
return error_lines


Expand Down Expand Up @@ -170,7 +173,7 @@ def parse_workflow_info(parts, relval_dir):
# and then proceeds to read the corresponding log file to identify the message
#
def read_matrix_log_file(matrix_log):
workflows_with_error = []
workflows_with_error = {}
relval_dir = join(dirname(matrix_log), "runTheMatrix-results")
common_errors = []
for line in openlog(matrix_log):
Expand All @@ -180,15 +183,15 @@ def read_matrix_log_file(matrix_log):
parts = re.sub("\\s+", " ", line).split(" ")
workflow_info = parse_workflow_info(parts, relval_dir)
if "number" in workflow_info:
workflows_with_error.append(workflow_info)
number = workflow_info.pop("number")
if number not in workflows_with_error:
workflows_with_error[number] = workflow_info
elif " Step0-DAS_ERROR " in line:
print("processing: %s" % line)
parts = line.split("_", 2)
workflow_info = {}
workflow_info["step"] = "step1"
workflow_info["number"] = parts[0]
workflow_info["message"] = "DAS Error"
workflows_with_error.append(workflow_info)
number = parts[0]
workflow_info = {"step": "step1", "message": "DAS Error"}
workflows_with_error[number] = workflow_info
elif "ValueError: Undefined" in line:
common_errors.append(line + "\n")

Expand All @@ -201,8 +204,7 @@ def read_matrix_log_file(matrix_log):
cnt = 0
max_show = 3
extra_msg = False
for wf in workflows_with_error:
wnum = wf["number"]
for wnum, wf in workflows_with_error.items():
cnt += 1
if "out_directory" in wf:
wnum = "[%s](%s/runTheMatrix-results/%s)" % (
Expand Down
Loading