huserben / TfsExtensions

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

Demands defined by the build definition aren't honored by queued builds #35

Closed ItielBeeri closed 6 years ago

ItielBeeri commented 6 years ago

Hi, thanks for this great extension. I have various demands defined in my build definitions, not all of them are met by all of the agents in the queue. When I queue a build manually, TFS is able to pick an appropriate agent based on the demands defined in the specific definition. However, it seems that builds queued by the task always override the demands in the definition, even if I leave that field empty in the task, so that builds are assigned to inappropriate agents and obviously failed. Maybe the task posts an empty array to the API in the demands property, instead of omitting it altogether?

huserben commented 6 years ago

Hi @ItielBeeri

yes you were right, it posted an empty array overriding the "default" capabilities. I fixed this quickly so that it will use the demands specified in the build definition if no demands are specified in the options.

Maybe you can quickly confirm that this is working with the newest version (2.4.1) now for you.

However as soon as you will specify any demands it will override the demands defined in the build definition. Changing this would be a bit more work and thus its not likely to happen in the near future.

Thank you very much for your feedback.

Edit: Sorry i'm having some problems currently uploading the new version of the extension to the marketplace - I don't have time today to look more into it so i'll continue tomorrow and will update you as soon as I managed.

ItielBeeri commented 6 years ago

Thank you very much for the quick response! I've installed and tested the new .vsix from your last commit, and I do confirm that now it behaves as expected. IMHO, the current behavior is perfect and has no need for further change, as it mimics the UI experience in the best possible way. Currently, the experience in both the UI and the task config is: if you don't touch, you get what is defined in the definition; but if you decide to take some changes, you get a full control over the list, so you could remove demands exactly as you can add them. It's absolutely fine.

huserben commented 6 years ago

Hi

ok very good, thanks for the clarification. I will leave it then as it is for now, as I don't see the need for the extended change (at least nothing urgent).

I will just reopen the issue until I properly published the pacakge on the marketplace, i'll have to invest a bit more time and I will not get to it till the weekend. I'll close it as soon as it is uploaded and available for everybody.

huserben commented 6 years ago

The changes are now in the repository and the extension is published in the marketplace.