I am running into deadlock when I have a Parent with an Output Attribute and a child that is specified as an input. When executing the plan, it results in a deadlock. Why?
How did you configure this test step? I think the GUI should not allow you to get into this situation.
What happens is that your child step is waiting for the parent to finish in order for the output to be ready. So this is guaranteed to be a dead-lock situation. That is because we assume that the output is being set during parent.Run() and the only safe conclusion is that it is set after Run() completes. To fix this, you can use OutputAttribute to more specifically define when the output value becomes available.
This is done using the OutputAvailability attribute, which is defined like this:
public enum OutputAvailability
{
/// <summary> The output value is available before the step has run. This can also be interpreted as always available. </summary>
BeforeRun,
/// <summary> After this step is completed. This may occur before or after AfterChildDefer. </summary>
AfterRun,
/// <summary> After defer of this step. This is the default for Outputs. This occurs after 'AfterChildDefer' and 'AfterRun'. </summary>
AfterDefer
}
So use [Output(OutputAvailability.BeforeRun)] to make the output available to child steps at any time.
I am having the same issue described above, but I am not able to fix it by adding an OutputAvailability attribute. I am working in python, and this is what I have for my parameter: