-
Notifications
You must be signed in to change notification settings - Fork 118
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
#850 fix printing all matrix links #866
Conversation
We want to print only links to failed matrices, not all. The goal is to make it as easy as possible to investigate failures. |
Fixed to print only failures matrices |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks good to me
it would be good to have at least one other member on the team review the PR. 🙂
e955693
to
84a5eab
Compare
} | ||
|
||
return writer.toString() | ||
} | ||
} | ||
|
||
private fun Collection<SavedMatrix>.printMatricesLinks(writer: StringWriter) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is my proposal for formatting. I am just not a big fan of multiple ?.
chain calls. Of course, it's not change request. Just let me know what do you think
private fun Collection<SavedMatrix>.printMatricesLinks(writer: StringWriter) { | |
private fun Collection<SavedMatrix>.printMatricesLinks(writer: StringWriter) = this | |
.filter { it.failed() } | |
.takeIf { it.isNotEmpty() } | |
?.run { | |
writer.println("More details are available at:") | |
forEach { writer.println(it.webLinkWithoutExecutionDetails) } | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I personally preferer to avoid nested operations in block, that's why I changed it to ?.
chain (previous version looks like yours :) )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got your point. We can still make it simpler and skip one map
operation and just invoke forEach { writer.println(it.webLinkWithoutExecutionDetails) }
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
applied your suggestion, because of new line comment :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, thanks! 👍
Fixes #850
Test Plan
All matrices failed links are printed in summary below the summary table.
Do not print any data if there are not present failed links.
Checklist