bpipe icon indicating copy to clipboard operation
bpipe copied to clipboard

disregard checks stateful status

Open jsmedmar opened this issue 8 years ago • 5 comments

I'd like to always run the checks regardless the condition of the previous $output, is this possible?

It seems that the check class has a override option, but I don't know how to use it.

Any suggestions?

jsmedmar avatar Mar 01 '16 17:03 jsmedmar

The stateful checks functionality is giving me some trouble, is there any possible way to do avoid the dependency on $output? I would truly appreciated it. My checks do not depend on $output at all, and they are not being re-checked and it is very annoying... @ssadedin

jsmedmar avatar May 24 '16 18:05 jsmedmar

@jsmedmar, do you think that it is possible your issue is related to #175? It has the effect that checks may be skipped incorrectly, which might be contributed to your issue.

I will have a think about the option of making checks always execute. It's a little bit of a hack, but you can achieve it yourself by deleting the file storing the check information manually when the check succeeds:

hello = {
    check {
        exec """
            echo "I am doing the check"

            true
        """

        // Delete the files storing the check information
        internalOutputs.each { file(it).deleteOnExit() }

    } otherwise {
        // do something
    }
}

run {
    hello
}

This is using the internalOutputs magic property that is just like the output property but holds outputs Bpipe creates itself for internal purposes (in this case, storing whether the check succeeded).

ssadedin avatar Jun 04 '16 10:06 ssadedin

@ssadedin thank you very much for your response. I think this might work, so I actually would like to putinternalOutputs.each { file(it).deleteOnExit() } in the otherwise statement, therefore checks will only be rechecked if they failed regardless the $output status.

I'm wondering if internalOutputs.each { file(it).deleteOnExit() } will delete all check status or just those checks under that line is executed?

I'll give it a try and let you know.

jsmedmar avatar Jun 09 '16 17:06 jsmedmar

That is exactly what I want to do, only recheck the checks that failed regardless of $output.

jsmedmar avatar Jun 09 '16 17:06 jsmedmar

OK, so placing internalOutputs.each { file(it).deleteOnExit() } in the otherwise clause has no effect at all :(

It didn't work neither when I placed internalOutputs.each { file(it).deleteOnExit() } inside the check statement.

jsmedmar avatar Jun 09 '16 17:06 jsmedmar