huserben / TfsExtensions

Extensions for TFS 2015+ such as custom Widgets (require TFS 2017) and Build Tasks
MIT License
44 stars 22 forks source link

TriggeredBuildIds not cleared if waiting for triggered build that failed #94

Closed dwhearn closed 5 years ago

dwhearn commented 5 years ago

Using the Trigger Build task, specify that it should store triggered build id's in a variable. Configure the Wait for Builds to Finish task with the following settings:

If the triggered build fails, then the TriggeredBuildIds variable is not cleared and if you have another 'Wait for Builds to Finish' task, then it will also wait for the previously triggered builds since it was not cleared out as expected.

huserben commented 5 years ago

Hi @dwhearn

I think this is till now by design, as my way of thinking was that, if the task fails due to a failing build, the subsequent tasks are not executed right?

Or is the problem that a partially successful build is awaited and the task doesn't fail, but the variable is then not cleared?

dwhearn commented 5 years ago

You have the control option on the task 'Continue on error' which is checked for the Wait for Builds to Finish task. This will mark the status of the build as partially succeeded. Later steps are triggering other builds and then attempting to wait, but since TriggeredBuildIds is not cleared as expected that task attempts to wait on all of the previously triggered builds which includes the previously failed build.

huserben commented 5 years ago

Ok I see, that makes sense. I really haven't had that use case on my mind, thanks for pointing me to it.

I'll try to provide a new version in the next days that will take care of that problem. Once I have something I'll let you know.

huserben commented 5 years ago

Hi @dwhearn

A new version of the Wait task is now available (2.0.4). It includes the change that the variable should be cleared even in case of the task failing.

Could you verify this and let me know whether it worked or not?

dwhearn commented 5 years ago

The 2.0.4 version works as expected. Thanks!

huserben commented 5 years ago

Ok perfect.

No problem, in case you're facing other issues or have a proposal for improvement, please feel free to add another issue.