huserben / TfsExtensions

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

"Trigger Build" task no longer listed as an installed task #120

Closed icnocop closed 4 years ago

icnocop commented 4 years ago

Hi.

Thank you for the "Trigger Build" task.

After uploading and installing benjhuser.tfs-extensions-build-tasks-3.0.11.vsix, the "Trigger Build" task is no longer listed as an installed task.

If I uninstall and remove it, and then upload and install benjhuser.tfs-extensions-build-tasks-3.0.1.vsix, the "Trigger Build" task is listed as an installed task.

I'm running Microsoft Visual Studio Team Foundation Server 2015 Update 4 (Version 14.114.27412.0) on premise.

Related issues: https://github.com/huserben/TfsExtensions/issues/86 https://github.com/huserben/TfsExtensions/issues/87

Thank you.

huserben commented 4 years ago

Hi @icnocop

In the extension management can you see that the Trigger Build Task Extension is properly installed? Is there something to take from the logs when installing it that would hint what potentially failed?

Also is it happening for every task > 3.0.1 or only specifically for version 3.0.11? It might be that a breaking change was introduced that it's not supporting your version of TFS anymore. Sorry I have very little experience with TFS and not really a good way of verifying/testing. I am positive though that on TFS 2017 and Azure DevOps Server 2019 it was working correctly...

icnocop commented 4 years ago

Hi @huserben

I'm experiencing an issue when testing to see which specific versions are broken after 3.0.1.

When I remove the extension from the server, I still see the "Trigger Build" task listed when adding a build step when editing a build definition.

There's no option to uninstall the extension, and https://docs.microsoft.com/en-us/azure/devops/marketplace/uninstall-disable-extensions?view=tfs-2015 just indicates to select "Remove".

I expected the task to no longer be listed.

Have you experienced this before?

In any case, which logs would you like me to analyze?

It may be something to do with the difference between the vsix files in https://github.com/huserben/TfsExtensions/tree/master/BuildTasks/Releases and the ones in https://github.com/huserben/TfsExtensions/tree/master/BuildTasks/Releases/singleversion.

https://github.com/huserben/TfsExtensions/blob/master/BuildTasks/overview.md just indicates

Please check the Releases folder on github for the "single version packages". It seems that some versions of TFS don't support packages with multiple versions packages, therefore a dedicated package will be available that includes just the newest versions of the tasks.

But it doesn't indicate which specific versions of TFS.

Thank you.

huserben commented 4 years ago

Ok, sorry I really don't have any experience with managing the tasks on TFS, so I cannot assist much guidance here. However I think you need to use this "Single Version" package becuase as mentioned some TFS versions do not support the one that includes multiple versions. As it wasn't clearly specified in the docs I checked with the people from Microsoft (https://github.com/MicrosoftDocs/vsts-docs/issues/1568) but also only got a vague answer: I vaguely recall this feature being introduced in/after TFS 2017 U2

So best course of action for you now would be to go for the single version package and try this one.

icnocop commented 4 years ago

Thank you.

I originally uploaded and installed the "Single Version" v3.0.11 and didn't get any errors, but the task was not available as a build step.

I'm not exactly sure which log I should look at to see if there are any additional messages.

Also, I'm not exactly sure which version of the task I'm currently using, even though TFS now says 3.0.11.

image

I'm wondering if it's worth trying to indicate which version of the task is actually being used in the build step details view? For example, single version vs multiple version, and also the version number.

image

Thank you.

huserben commented 4 years ago

Hi

so you can see which task you are using when you run your build. In the logs of the Trigger Build task step you should see in the header which version is used.

If this says 3.0.11 I assume everything works fine :-)

Regarding your comment:

For example, single version vs multiple version, and also the version number.

The task is exactly the same, so the version is identifier enough. The difference is the packaging, meaning that in newer versions of TFS and Azure DevOps you can package multiple versions (so version 2 and 3 of the same task) in a single vsix file, which means you can gradually update your build steps definition by definition while with the old approach once you go from 2 to 3 you must update them as the version 2 the build definition points to does not exist anymore.

Also displaying which version (major) is being used of the task is a built-in feature...again it's probably just not available in your old version of TFS

icnocop commented 4 years ago

Thank you.

I don't see a version number in the build logs, and as you indicated, it's probably because I'm using TFS 2015.

I did find a version number in the tasks directory on the build agents: C:\agent\tasks\TriggerBuild\2.8.7

Should I expect that to have been 3.0.11?

Thank you.

huserben commented 4 years ago

Hmm if you start your build with the variable system.debug set to true you should get more information. I don't recall exactly but either in the build task itself or in the very first task of the build the number of the task used should be visible.

At your above screenshot of the manage extensions it looks like the task is actually not installed yet (at least the install button seems to be active)?

icnocop commented 4 years ago

I added the system.debug variable and set it to true, but I couldn't find the version number in any of the build logs.

Here's a copy of the aggregated build log: 1_Build - Clean.txt

All the extensions uploaded and even installed on TFS still have their Install button active. When I click the Install button, TFS asks me which team project collection I want to install it in because there may be more than one team project collection. If I select a collection where the extension is already installed, TFS doesn't continue and tells me the extension is already installed in that collection. I don't know if the Install button will change if I install the extension on all team project collections.

huserben commented 4 years ago

Hi @icnocop

ok I see, seems like the build logs from your version of TFS do not contain any proper version infos then.

Ah ok, as mentioned I'm not familiar with TFS and it's Extension Management.

I did find a version number in the tasks directory on the build agents: C:\agent\tasks\TriggerBuild\2.8.7 Should I expect that to have been 3.0.11?

Yes my expectation would be that it will update the agents with the newest version of the task if it's successfully installed.

What you could try is to completly remove the task from your projects and the TFS and then take the newest (singleversion) package from github and try it out with that one.

Otherwise I'm out of ideas and we might have to accept that something might not be supported from your version of TFS to make it compatible with 3.* versions of the task.

icnocop commented 4 years ago

Thank you, @huserben.

I deleted C:\agent\tasks\TriggerBuild and uninstalled the extension in TFS.

I verified the "Trigger Build" task isn't listed when adding a new build step.

I installed benjhuser.tfs-extensions-build-tasks-3.0.11.vsix (Single Version) and verified the "Trigger Build" task is listed when adding a new build step.

I queued a new build which contains the trigger build task.

I noticed the agent now has a folder called "C:\agent\tasks\TriggerBuild\3.1.0" which is a little unexpected.

In any case, I think this issue can be closed.

Thank you.

huserben commented 4 years ago

Hi @icnocop

Thanks for the update and I'm glad to hear that it worked out.

Please feel free to open a new issue in case you in case you need any assitance or find a problem.