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

Display error messages for each failure #286

Open
mgoerens opened this issue Oct 25, 2023 · 1 comment
Open

Display error messages for each failure #286

mgoerens opened this issue Oct 25, 2023 · 1 comment

Comments

@mgoerens
Copy link
Contributor

Currently, only the error message related to the first failing step is communicated to the user.

See

if pr_content_result == "failure":
detail_message = append_to(
detail_message, prepare_pr_content_failure_comment()
)
gitutils.add_output("pr_passed", "false")
elif run_verifier_result == "failure":
detail_message = append_to(
detail_message, prepare_run_verifier_failure_comment()
)
gitutils.add_output("pr_passed", "false")
elif verify_result == "failure":
if community_manual_review:
outcome = "Pending Manual Review"
detail_message = append_to(detail_message, prepare_community_comment())
gitutils.add_output("pr_passed", "true")
else:
detail_message = append_to(detail_message, prepare_failure_comment())
gitutils.add_output("pr_passed", "false")
elif oc_install_result == "failure":
detail_message = append_to(
detail_message, prepare_oc_install_fail_comment()
)
gitutils.add_output("pr_passed", "false")
else:

We should consider displaying error messages for each failure that was received rather than only for the first one.

@OchiengEd
Copy link
Contributor

This appears doable. From reviewing the snippet shared, it seems that would mean breaking the conditions to be separate. So that each of the failures could be evaluated independently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants