ros2/ci

Docker builds fail on top of current Win 10 1909

cottsay opened this issue · 4 comments

Builds fail when built on top of mcr.microsoft.com/windows:1909 eaf67f716f75.

Builds succeed when built on top of mcr.microsoft.com/windows:1909 862383fcc885, which is about 3 weeks old right now.

In particular, the Python installer is failing, and the return code indicates that a DLL is now missing.

It seems like we may need to do something to correlate docker image with the specific release of the host system. Building a new AMI based on the latest 1909 image in EC2 actually inverts the behavior: The docker image pinned in #422 now exhibits the failure running the python installer and reverting to :1909 works.

Looking at https://hub.docker.com/_/microsoft-windows?tab=description I wonder if our CI script needs to extract a more specific OS version and try to use that specific one. That or pin a known good base image and update CI whenever we roll out a new agent AMI.

Suggestion: Use the full 4-part version string. I couldn't find a super easy way to get that (because Windows), but this should work for now:

> powershell -c "(Get-ItemProperty -Path 'HKLM:SOFTWARE\Microsoft\Windows NT\CurrentVersion\Update\TargetingInfo\Installed\Server.OS.amd64' -Name Version).Version"
10.0.18363.592
> docker pull -q mcr.microsoft.com/windows:10.0.18363.592
mcr.microsoft.com/windows:10.0.18363.592

The docker image had previously pinned the windows image just to the Release Id (1809, 1909, etc). But under the hood, it would find the more specific build version and pull that automatically. I guess based on @cottsay`s feedback it doesn't match the fourth field (.592)?

To get the 4-part version, we can do what I was doing but with the release id (concat it to a file and load that file into a cmd variable).

powershell $(Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion').ReleaseId > release_id.txt
set /p RELEASE_ID=< release_id.txt