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

Fixes #7407: Display failed cf-promises to make it easier to re-run while debugging #959

Conversation

jooooooon
Copy link
Member

@@ -356,6 +356,7 @@ class Cf3PromisesFileWriterServiceImpl(
* and "error/technical details"
*/
val completeErrorMsg = ( s"The generated promises are invalid!errormessage!cf-promise check fails for promises generated at '${paths.newFolder}'"
+ "<-Test command is: '" + checkCommand + "'"
+ (if(errors.isEmpty) "" else errors.mkString("<-", "<-", ""))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change should work because the "client side" cuts the message up using the "<-" separator, to replace it by a new line (<br/>).

@jooooooon
Copy link
Member Author

This whole PR is just a proposal for a quick fix to display the command run. This may not be the best approach - as you know my Scala experience is rather limited. Any feedback welcome.

@@ -356,6 +356,7 @@ class Cf3PromisesFileWriterServiceImpl(
* and "error/technical details"
*/
val completeErrorMsg = ( s"The generated promises are invalid!errormessage!cf-promise check fails for promises generated at '${paths.newFolder}'"
+ "<-Test command is: '" + checkCommand + "'"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if the message could be better with "promise check command is:"
What do you think @jooooooon ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I propose "Command to check generated promises is:"

@VinceMacBuche
Copy link
Member

Apart the question on the text, it's ok to me and can be merged (once we are ok about the text ;) )

@jooooooon
Copy link
Member Author

PR updated

@jooooooon jooooooon force-pushed the ust_7407/display_failed_cf_promises_to_make_it_easier_to_re_run_while_debugging branch from 2391997 to b2219f3 Compare November 13, 2015 17:15
VinceMacBuche added a commit that referenced this pull request Nov 13, 2015
…mises_to_make_it_easier_to_re_run_while_debugging

Fixes #7407: Display failed cf-promises to make it easier to re-run while debugging
@VinceMacBuche VinceMacBuche merged commit 746edcb into Normation:branches/rudder/3.2 Nov 13, 2015
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

Successfully merging this pull request may close these issues.

2 participants