Skip to content

Commit 93890e4

Browse files
vs hosted pool md
1 parent 56e3487 commit 93890e4

File tree

1 file changed

+96
-0
lines changed

1 file changed

+96
-0
lines changed

docs/vshostedpools.md

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# Visual Studio Services VS Hosted Pools
2+
3+
This document is focused on the problems around the common case of building with Visual Studio although it is relevant for other development environments as well. Mac XCode pools could have the same class of issues.
4+
5+
## Hosted Pool Approach
6+
7+
The "Hosted Pool" had a VM image with all versions of VS (2010, 2012, 2013, and 2015) in addition to many other common development tools (Xamarin, Android SDKs, Windows SDKs, etc...).
8+
9+
The Visual Studio Build CI task had a drop down for the VS version you want the task to locate and use. What it's doing is finding the version of msbuild on the machine which came with the version of VS you selected.
10+
11+
In the model where the VM image had all versions of VS stacked on the machine, it made sense. Default is hosted pool, everything is there and it's the tasks job to define what to use.
12+
13+
We originally had the task default to "Latest" but in that model of all VS versions present, it cause a problem where a new VS was stacked on the image and everyone's builds broke. So when VS2015 was released we made the decision for the task default to be latest released (VS2015) and it would stick at definition creation until you changed it (ideally when you converted your projects).
14+
15+
Problems:
16+
17+
- Stacking all versions of VS is hitting walls. They all don't fit on the disk, they are taking longer and longer to copy around (10s of hours to get a simple patch and push images around)
18+
- Side by Side Issues: Even though SxS is tested, many issues weren't caught and subtle difference in order of install with updates and patches would find bugs leading to instability
19+
- We couldn't offer preview versions of tools. Early previews could destabilize the SxS stable versions on that image.
20+
21+
Simply put, one image with all tools was not going to work.
22+
23+
## An Image per Era of VS
24+
25+
Because of the issues above, 2017 introduced a new image with only the VS2017 era of tools. It was a full install of VS2017 which used close to our full disk quota.
26+
27+
You selected a VS2017 pool of machines by selecting the VS2017 queue. We will introduce a VS2015 image and deprecate the hosted pool.
28+
29+
That unblocked 2017 usage but we didn't account for alignment problems. Specifically:
30+
31+
1. Three moving parts defining VS version: users solution in code, the queue to use, the version to find specified in the task. They all better align.
32+
2. The default queue was hosted (VS2015), the task default version was VS2017 and your code was ??.
33+
3. The queue was hidden in definition options because until now it was a non mainline option - default of hosted pool had everything.
34+
35+
## Solutions
36+
37+
The solutions are in order of implementation and priority.
38+
39+
## Part One: Default task to Latest
40+
41+
In a scheme of image per VS era, Use "Latest" makes sense. Regardless of the queue you pick it just works.
42+
43+
Once "Latest" is resolved, we can optionally have the task peek into the solution(s) and warn if the target VS version in the solution does not match the (latest) version of VS on the per Era image chosen via the queue. This also has benefits for private agents with SxS VS versions installed. This is important since a 2017 solution can fail on VS 2015 on hard to diagnose ways (fails with a cryptic xml schema error).
44+
45+
This just changes the default and doesn't introduce compat issues.
46+
47+
## Part Two: Explicit Pool Selection
48+
49+
Offer pools:
50+
51+
- Hosted VS2017
52+
- Hosted VS2015
53+
- Hosted Deprecated (was Hosted Pool)
54+
55+
On create definition, there is not default. You must select the queue as an up front decision. We can possibly default again if we implement Auto (see below).
56+
57+
## Part Three: Tasks use environment
58+
59+
New major version of VS/msbuild tasks just use what's in the path. Create a tools task which sets up the toolset. Basically it runs dev environment cmd script for that version of VS.
60+
61+
Pick VS environment and everything downstream (including tasks and ad-hoc scripts)
62+
63+
This also eliminates issues where you have to pick the version in multiple msbuild tasks and separate vs test tasks. Pick your environment, tasks work. Essentially models
64+
65+
## Part Four: Hosted (Auto)
66+
67+
If repo analysis is in place we can have a virtual queue which is auto. Based on the repo analysis post push we can route the build JIT to the proper queue. This has the benefit of the customer upgrading their VS solutions, pushing the change and the "right thing happens"
68+
69+
70+
71+
72+
73+
74+
75+
76+
77+
78+
79+
80+
81+
82+
83+
84+
85+
86+
87+
88+
89+
90+
91+
92+
93+
94+
95+
96+

0 commit comments

Comments
 (0)