arcade
arcade copied to clipboard
Create a process to keep microsoft-hosted-agents.json up to date
Migrated from https://github.com/dotnet/core-eng/issues/15779
@dkurepa wrote:
Currently, we don't have a good process for keeping our microsoft-hosted-agents.json up to date. The images are not owned by our team so we need a way of to see when they're updated and reflect that on our microsoft-hosted-agents.json. One other file that might also need updates is the os-definitions.json. The only fields that would need updating here would be EOL date, in case that it didn't exist in the time of creating the OS entry and the SupportedOS Versions, when a new .Net is released
After researching this topic, I have the following conclusion: the only field that gets regularly updated in the microsoft-hosted-agents.json is the VisualStudioVersion. The OperatingSystemId will never change, because the OS stays on the same major version (like ubuntu 20.04 or windows server 21h2). We are currently not keeping track of the python version, which is also getting updates on the regular. With this in mind we have two options: To have some sort of test that would scrape the Visual Studio version from https://github.com/actions/virtual-environments/blob/main/images/win/Windows2019-Readme.md and compare it with the version in our json, notifying someone to update it, in case of a miss match. One problem with this is that the github page has the build version of visual studio, which is different from the "standard" version, so we would have to scrape another website (https://docs.microsoft.com/en-us/visualstudio/install/visual-studio-build-numbers-and-release-dates?view=vs-2022) to get it, or add the build version to our json. The other option would be to handle this issue like we handle VisualStudio updates, have a look once a week and see if the version has been updated. This work could also be done by a vendor. We would write detailed instructions for it. One issue with this approach is that there would be a small inconsistency between the time the page gets updated (and the VisualStudio) with the Matrix of Truth output being updated.
After some further discussion, we agreed on two options:
- The first is to ask the team owning these images to create some kind of machine consumable json with a stable link for us. We would then use it to check if our file is up to date.
- Have this checked every week (like we do for VisualStudio updates). This work would eventually be handled by a vendor
@ilyas1974 @tkapin Lets talk about this on the next sync
I created a PR to update the microsoft-hosted-agents.json to the current installed versions. The big change here is that windows-latest
was moved from windows-2019 to windows-2022: https://dev.azure.com/dnceng/internal/_git/dotnet-helix-machines/pullrequest/24358
I contacted Sam Tran about providing us with some machine consumable file with the data we need. He's the manager who's responsible for the vendors that maintain the https://github.com/actions/virtual-environments/tree/main/images
After talking with Sam Tran, I found out that they have SBOM generation on their radar, but it's not going to be done soon (he mentioned end of 2022). Reading SBOM doesn't sound like the best solution for us, so I think we should go with the manual approach. We have a few options there:
- We could use vendors for this process, as it is straight forward
- Ilya mentioned that this could be a part of the monthly sync with the PMs
- We could make this a part of FR
Documentation for maintaining the file: https://dev.azure.com/dnceng/internal/_wiki/wikis/DNCEng%20Services%20Wiki/976/Maintaining-microsoft-hosted-machines-json