Thursday, 20 October 2016

Track service usage data in VSTS

Every TFS admin knows about the Operational Intelligence page. It is a very important tool for managing Team Foundation Server, which provides lots of useful information about service usage.

Nothing like that existed for VSTS, up until a few sprints ago. Now if you look at the Account level settings…


The Usage tab is a revamped version of Operational Intelligence for VSTS! Of course you won’t be interested in the server-side jobs as it is a service, but here you can get all the usage audit about a certain user:


It is worth noting that there are rate limits (the Usage column, expressed in Team Services Throughput Units), so you can be throttled or stopped if you are exceeding these – usually with an automated tool or a script. More about this here.

Tuesday, 11 October 2016

Easy Service Endpoints ACL management in VSTS

It is amazing how quickly VSTS changes and evolves – of course you need to keep up with it as well Smile

This is todays discovery – the new Service Endpoint’s ACL management UI. In the past Service Endpoints were shown pretty much just as a key-value field with an URL, in reality they have two security groups behind the scenes:

  • Endpoint Administrators
  • Endpoint Creators

You knew that (didn’t you?), but managing the ACL per-endpoint wasn’t as straightforward as it is today.

The Roles tab in each Endpoint now has a much clearer view of the users’ assignments:


And adding an user is a much better experience now – with an immediate explanation of the role and the associated permissions:


What really strikes me here is the possibility of having the Access inheritance shown immediately – this is a very welcome change for me Smile

Thursday, 6 October 2016

A pipeline is not just as vertical fall! Triggers in Visual Studio Release Management

It is great to see people approaching the Pipeline model, but of course the more people adopt it the more we need to go deep into the products we use to get the very best value for us.

An example of this is when you start getting comfortable with pipelines. If you get too comfortable too soon, it is because your pipeline looks like this:


I am not saying it is wrong. There are countless situations where you want or need to keep it that way. What I want to stress is that it isn’t the only way to shape the pipeline!

For example, let’s say you are facing performance issues while deploying because of some reason, or you want to do something else (like initialise the database with real data while deploying your PaaS application, running certain tests while deploying other non-core components of your application, examples are countless here really) – can you do that?

The answer is a strong and definite yes.

Let’s say you want to do this:


QA – deploy DB” happens first, and then I would like to execute “QA – initialise DB” and “QA – deploy app” in parallel. How? With a proper management of triggers in Visual Studio Release Management Smile

The first environment is automatically triggered by a build, what is interesting is that you can set more than one environment to be triggered by another successful deployment:


Also, you can set an environment to be triggered by all of the previous environments:


So you aren’t forced to use a Niagara Falls pipeline, but something more akin to the estuary of a river Smile

Thursday, 29 September 2016

Too long forgotten, the Activity field in TFS

Team Foundation Server is around since 2005, and many features seem to be forgotten despite being in the same place as usual.

If I asked for a dollar/euro/pound every time I was asked this I would be a billionaire as of now:

Can I have a Development Task, Testing Task, Documentation Task Work Item Type in TFS?

You can definitely have such a WIT, but would this make any sense? Excluding any consideration about your methodology (this unfortunately is a question I keep getting regardless of Scrum/Agile/Waterfall/CMMI/etc.), why would you have a different WIT for different flavours of the same?

Usually reasons here vary, but one of the most consistent is this:

I would like to visually understand how the requirement is split and this also makes life easier for team members with different roles in the team.

I mean – the first part is fair enough. But as for the second… it is all about the human rejection of changes Smile 

So, in my opinion the best way of tackling this request (I can’t even class it as a problem…) is to use the Activity field which every Work Item has. Simple as that.

Let’s take this for example:


This comes from the backlog, and all the children tasks are…tasks Smilebut leveraging the Activity field you can categorise these children tasks:


Needless to say the Activity list can be customised. Once you do that, you might want to apply some styling rules to the task board, leading to something like this:


And as a side-effect, if you use the Remaining Work field as well – as many do, regardless of the methodology as well, given that you might need to report on it – you’ll get a nice breakdown by Activity:


It is worth mentioning that this field is around since at least TFS 2008.

Wednesday, 28 September 2016

Removing Analysis Services references when moving a TFS deployment

When you need to stand up a testing environment, a DR situation or simply a new instance from existing backups you might want to forget about SSAS altogether and go ahead with just the core Team Foundation Server’s databases – something you can’t do if you use the Application Tier Only option.

The error you will get is a TF400952:

An unexpected error occurred during Analysis Services validation, see logs for details. The component might be damaged or not installed properly. You must exit the Team Foundation Administration Console and install either SQL Server Analysis Services or the SQL Server Client Tools on the application tier to ensure that the Analysis Service object model is present for warehouse processing. Once you have installed the necessary components, open the administration console and re-run the wizard.

If you run into this, it means you did not follow the documentation about how to setup a deployment on a new hardware Smile so back to it, you will run TFSConfig RemapDBs at some point, and that is where you need to pay attention.

If you run TFSConfig RemapDBs without the /continue switch you will just get an error:

Unable to find any compatible SQL Analysis Services database within the specified instance. The host with name ‘TEAM FOUNDATION’ has been assigned a new connection string.

So you are stuck. Instead, if you run it with the /continue switch, you will see the command will be executed on the other databases as well, removing the old SSAS reference.

Thursday, 22 September 2016

A pragmatic look at why TFS and VSTS can be customised in a different way

If you paid attention to the latest releases of both TFS and VSTS you can see that the main path where they are diverging is on Process Template Customisation.

And hey presto! I was asked why, and why is it that different from the usual TFS experience. So here is my opinion on the matter Smile

Historically, *no* customisations were allowed for Team Projects hosted on the service. The reason behind this was very pragmatic: being a service, the provider must ensure that any upgrade are not going to break the system for its users, and that includes customisations as well.

Enabling the typical task witadmin.exe can do means they can’t ensure that “the trick you used with Global Lists to show something on a certain field” is going to continue working, with no changes, for each upgrade the service receives without testing it. And of course, the service provider neither can test users’ customisations nor rely on users to test their own customisations according to the service release schedule. It wouldn’t work, and it would cause unnecessary churn and technical debt.

Normally – and this applies to Team Foundation Server as well – you would test your customisations in a sandbox or a test environment. With your own on-premise product you can duplicate the instance (especially with the new pre-production upgrade feature) and start messing around with it. It makes total sense, because hardware is cheap as chips these days and you (or the admins) are responsible for the uptime and availability of the server.

But you can’t have it and you can’t do it on the service, there is no test environment, a service is live by definition! Even with DevOps properly in place there is no way of providing this with the appropriate safeguards.

There is a major difference between providing APIs to extend specific components of your service (usually with a limited scope) and providing a way to easily customise the overall user experience. This difference sometimes is overlooked (unfortunately) when in full-swing with the DevOps infatuation: introducing breaking changes (because you will, everybody does, at some point) on a large portion of the user experience that non-technical users will face is something to are going to regret, because non-technical users are usually more vocal and reactive to UX changes.

UX changes aren’t like custom release task using the VSTS APIs “somehow”, they are all about consistency in the overall experience a user has, and it is critical to understand what is going to happen the second you break something you can see. Can you imagine the mayhem when a non-technical user, who heavily relies on that customisation, is going to get an error and his critical feature isn’t there anymore?

It was the right decision, because the team was missing a way of funneling the customisations in a sanitised and reliable way.

But now they have! And they are doing a great job at enabling these Process Customisation scenarios – usually a big blocker in Enterprise situations.

Friday, 9 September 2016

Simplifying TFS restores with TFSConfig OfflineDetach

Before TFS 2015 Update 3, if you want to restore an instance you need to restore all the collection databases of the instance. This might be an extremely long and time-consuming activity.

Very quietly, Microsoft introduced the OfflineDetach command for TFSConfig. What is that?

It is a new command you can use to restore only a specific collection (and configuration database) so you can simplify the restore operation and save time.

Aside from that, you can also use it to restore non-detached databases (useful for DR).