-
Notifications
You must be signed in to change notification settings - Fork 8
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
added a recursive jobcommand reference for errorhandling #12
Conversation
BobVanB
commented
Aug 25, 2016
I havent tested it, will do that in a few hours, but the xml on the test i wrote is coming out right. |
after i merge my own master with yours XD |
oh, and i also changed the order of the struct, same as i did with the other one. |
And with working code in terraform now. |
@BobVanB, can an ErrorHandler itself have an ErrorHandler? Just wondering since it seems like this structure could potentially support infinite nesting, but I'm not sure if that's intended... |
@apparentlymart yes, i already got that error on the schema ^^. Fixed that by adding a skipErrorhandler on the schema and removing it. So I got that coverd. I dont know why they(rundeck) dont Just add continue on error on each command. Instead of on a sequence. And made the errorhandler also jobsequence. Yes this will adds nesting? Why not ^^ give it a max depth and you got alot better user freadom. As you see the code is the same. |
Sorry mobile version. Thé previous comment, was for terraform ^^ As you can see, I know about it and I handle it at the software side. Yes this will add infinite nesting. I did this because I didn't want to copy JobCommand, because it wat 99% the same and if JobCommand changes the error handling also change with it now. I wil check rundeck tomorrow, to see if they use a different type for error handling. And all the above. 😊 |
I just checked with the rundeck code: To be neat, the errorhandler should be removed on the second level (within errorhandling) |
If i go through the above code and i have already tested it with posting: command {
description = "${file("${path.module}/scripts/service/mongo/hiera/remove/query_description")}"
errorhandler {
errorhandler {
inline_script = "script3"
}
inline_script = "script2"
}
inline_script = "script1"
} i can conclude that rundeck also supports infinite nesting and it will not break if deeper levels are posted. Errorhandler is just being ignored by rundeck. My choice would be just let it like this and support infinite nesting, its up to the sanity of the user this way. And i think i know why errorhandler is of the type JobCommand and not JobSequence, i can just call a JobReference and that will contain my sequence....epiphany :D |
Rundeck is also alowing 'keepgoingOnSuccess' (terraform: contiue_on_error) on the JobCommand in the JobSequence. There is no validation whats so ever on that part. Structual its correct. |
Thanks again, @BobVanB, and thanks for taking the time to investigate and explain how this works in Rundeck. |