dotnet / dotnet-docker

Docker images for .NET and the .NET Tools.
https://hub.docker.com/_/microsoft-dotnet
MIT License
4.47k stars 1.94k forks source link

Unable to run update script to update PowerShell in manifest #2223

Open rjmholt opened 4 years ago

rjmholt commented 4 years ago

Steps to reproduce the issue

> dotnet run --project .\eng\update-dependencies\ -- 5.0 --product-version powershell=7.1.0-preview.7 --compute-shas

Expected behavior

Updates manifest

Actual behavior

update-dependencies Information: 0 : Updating powershell|5.0|build-version
update-dependencies Information: 0 : Updating powershell|5.0|product-version
update-dependencies Information: 0 : Updating powershell|5.0|Linux.Alpine|sha
update-dependencies Information: 0 : Updating powershell|5.0|Linux|arm32|sha
update-dependencies Information: 0 : Updating powershell|5.0|Linux|arm64|sha
update-dependencies Information: 0 : Updating powershell|5.0|Linux|x64|sha
update-dependencies Information: 0 : Updating powershell|5.0|Windows|x64|sha
update-dependencies Information: 0 : Downloading 'https://dotnetclichecksums.blob.core.windows.net:443/tool/7.1.0-preview.7/PowerShell.Linux.Alpine.7.1.0-preview.7.nupkg.sha512'.
update-dependencies Information: 0 : Failed to find `dotnetclichecksums` sha
update-dependencies Information: 0 : Downloading 'https://dotnetcli.blob.core.windows.net/dotnet/checksums/7.1.0-preview.7-sha.txt'.
update-dependencies Information: 0 : Failed to find dotnet release checksums
update-dependencies Information: 0 : Failed to find `PowerShell.Linux.Alpine.7.1.0-preview.7.nupkg` sha
update-dependencies Information: 0 : Downloading 'https://pwshtool.blob.core.windows.net/tool/7.1.0-preview.7/PowerShell.Linux.Alpine.7.1.0-preview.7.nupkg'.
update-dependencies Information: 0 : Retrieved sha 'c852a06d25e059cc31a0ace87d7738d8390ae7e6b83fd6ba73ef1ae6d1e4258bc436540a3bb309c466c0a9a2c33e9e19797c06e7fa10ba8c381c020430c30169' for 'https://pwshtool.blob.core.windows.net/tool/7.1.0-preview.7/PowerShell.Linux.Alpine.7.1.0-preview.7.nupkg'.
update-dependencies Information: 0 : Downloading 'https://dotnetclichecksums.blob.core.windows.net:443/tool/7.1.0-preview.7/PowerShell.Linux.arm32.7.1.0-preview.7.nupkg.sha512'.
update-dependencies Information: 0 : Failed to find `dotnetclichecksums` sha
update-dependencies Information: 0 : Failed to find `PowerShell.Linux.arm32.7.1.0-preview.7.nupkg` sha
update-dependencies Information: 0 : Downloading 'https://pwshtool.blob.core.windows.net/tool/7.1.0-preview.7/PowerShell.Linux.arm32.7.1.0-preview.7.nupkg'.
update-dependencies Information: 0 : Retrieved sha '8cd03689db9c2155616ba93a46d39b7222547d4b3fd8ecc23ccd5691cc65fc04935513ff693d0dba5592899c81cd47c0eb9339f10373db33bf9c5470c2abe7bd' for 'https://pwshtool.blob.core.windows.net/tool/7.1.0-preview.7/PowerShell.Linux.arm32.7.1.0-preview.7.nupkg'.
update-dependencies Information: 0 : Downloading 'https://dotnetclichecksums.blob.core.windows.net:443/tool/7.1.0-preview.7/PowerShell.Linux.arm64.7.1.0-preview.7.nupkg.sha512'.
update-dependencies Information: 0 : Failed to find `dotnetclichecksums` sha
update-dependencies Information: 0 : Failed to find `PowerShell.Linux.arm64.7.1.0-preview.7.nupkg` sha
update-dependencies Information: 0 : Downloading 'https://pwshtool.blob.core.windows.net/tool/7.1.0-preview.7/PowerShell.Linux.arm64.7.1.0-preview.7.nupkg'.
update-dependencies Information: 0 : Retrieved sha '36b582be600cf191287fb18599090ea36ab5e8800e099278965c73a465f19716b62458ef122bb91ff89b4f4fbec9f1597dc81a0ece2f852da6572ce3cd87f15e' for 'https://pwshtool.blob.core.windows.net/tool/7.1.0-preview.7/PowerShell.Linux.arm64.7.1.0-preview.7.nupkg'.
update-dependencies Information: 0 : Downloading 'https://dotnetclichecksums.blob.core.windows.net:443/tool/7.1.0-preview.7/PowerShell.Linux.x64.7.1.0-preview.7.nupkg.sha512'.
update-dependencies Information: 0 : Failed to find `dotnetclichecksums` sha
update-dependencies Information: 0 : Failed to find `PowerShell.Linux.x64.7.1.0-preview.7.nupkg` sha
update-dependencies Information: 0 : Downloading 'https://pwshtool.blob.core.windows.net/tool/7.1.0-preview.7/PowerShell.Linux.x64.7.1.0-preview.7.nupkg'.
update-dependencies Information: 0 : Retrieved sha '84d5c39a92050576e3b8a650419f43cb222a5d7f4d8fd3b29701a92880be3224d964549de0183f9d46e4d8b2636ffe370af4bbc23267b4194dd5d36f88a3a47f' for 'https://pwshtool.blob.core.windows.net/tool/7.1.0-preview.7/PowerShell.Linux.x64.7.1.0-preview.7.nupkg'.
update-dependencies Information: 0 : Downloading 'https://dotnetclichecksums.blob.core.windows.net:443/tool/7.1.0-preview.7/PowerShell.Windows.x64.7.1.0-preview.7.nupkg.sha512'.
update-dependencies Information: 0 : Failed to find `dotnetclichecksums` sha
update-dependencies Information: 0 : Failed to find `PowerShell.Windows.x64.7.1.0-preview.7.nupkg` sha
update-dependencies Information: 0 : Downloading 'https://pwshtool.blob.core.windows.net/tool/7.1.0-preview.7/PowerShell.Windows.x64.7.1.0-preview.7.nupkg'.
update-dependencies Information: 0 : Retrieved sha 'c445ae1ae668c837fb6c05116576118e96b83fca6b7e62cb0303d9cf2a18737c9c4cc9432402ace3be78aba60979e2d0dba3fb209d88a3ab227ece6178b91439' for 'https://pwshtool.blob.core.windows.net/tool/7.1.0-preview.7/PowerShell.Windows.x64.7.1.0-preview.7.nupkg'.
update-dependencies Information: 0 : Executing 'C:\Users\Robert Holt\Documents\Dev\Microsoft\dotnet-docker\eng\dockerfile-templates\Get-GeneratedDockerfiles.ps1'
ParserError:
Line |
   1 |  [10:06:04.067] [InstallHandler] No installation found
     |   ~
     | Missing type name after '['.

Failed to update dependencies:
System.AggregateException: One or more errors occurred. (Unable to successfully execute 'C:\Users\Robert Holt\Documents\Dev\Microsoft\dotnet-docker\eng\dockerfile-templates\Get-GeneratedDockerfiles.ps1')
 ---> System.InvalidOperationException: Unable to successfully execute 'C:\Users\Robert Holt\Documents\Dev\Microsoft\dotnet-docker\eng\dockerfile-templates\Get-GeneratedDockerfiles.ps1'
   at Dotnet.Docker.ScriptRunnerUpdater.ExecuteScript() in C:\Users\Robert Holt\Documents\Dev\Microsoft\dotnet-docker\eng\update-dependencies\ScriptRunnerUpdater.cs:line 73
   at Dotnet.Docker.ScriptRunnerUpdater.<GetUpdateTasks>b__4_0() in C:\Users\Robert Holt\Documents\Dev\Microsoft\dotnet-docker\eng\update-dependencies\ScriptRunnerUpdater.cs:line 45
   at Microsoft.DotNet.VersionTools.Dependencies.DependencyUpdateTask.<>c__DisplayClass6_0.<.ctor>b__0() in /_/src/Microsoft.DotNet.VersionTools/lib/src/Dependencies/DependencyUpdateTask.cs:line 32
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj)
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at System.Threading.Tasks.Task`1.get_Result()
   at Microsoft.DotNet.VersionTools.Automation.DependencyUpdateUtils.<>c.<Update>b__0_0(DependencyUpdateTask task) in /_/src/Microsoft.DotNet.VersionTools/lib/src/Automation/DependencyUpdateUtils.cs:line 29
   at System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.SelectManySingleSelectorIterator`2.MoveNext()
   at System.Linq.Set`1.UnionWith(IEnumerable`1 other)
   at System.Linq.Enumerable.DistinctIterator`1.FillSet()
   at System.Linq.Enumerable.DistinctIterator`1.ToArray()
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Microsoft.DotNet.VersionTools.Automation.DependencyUpdateUtils.Update(IEnumerable`1 updaters, IEnumerable`1 dependencyInfos) in /_/src/Microsoft.DotNet.VersionTools/lib/src/Automation/DependencyUpdateUtils.cs:line 25
   at Dotnet.Docker.Program.UpdateFiles(IEnumerable`1 buildInfos) in C:\Users\Robert Holt\Documents\Dev\Microsoft\dotnet-docker\eng\update-dependencies\Program.cs:line 96
   at Dotnet.Docker.Program.Main(String[] args) in C:\Users\Robert Holt\Documents\Dev\Microsoft\dotnet-docker\eng\update-dependencies\Program.cs:line 39

Additional information (e.g. issue happens only occasionally)

Output of docker version

Client: Docker Engine - Community
 Version:           19.03.12
 API version:       1.40
 Go version:        go1.13.10
 Git commit:        48a66213fe
 Built:             Mon Jun 22 15:43:18 2020
 OS/Arch:           windows/amd64
 Experimental:      false
error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.40/version: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.

Output of docker info

Client:
 Debug Mode: false

Server:
ERROR: error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.40/info: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.
errors pretty printing info
MichaelSimons commented 4 years ago

@rjmholt, update-dependencies tool requires .NET core SDK and Docker running in Linux container mode. By the look of the docker info output you included, it appears as though your Docker install is not working properly. Can you please verify?

rjmholt commented 4 years ago

Reran the commands today:

> docker version
Client: Docker Engine - Community
 Version:           19.03.12
 API version:       1.40
 Go version:        go1.13.10
 Git commit:        48a66213fe
 Built:             Mon Jun 22 15:43:18 2020
 OS/Arch:           windows/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.12
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.13.10
  Git commit:       48a66213fe
  Built:            Mon Jun 22 15:49:27 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.2.13
  GitCommit:        7ad184331fa3e55e52b890ea95e65ba581ae3429
 runc:
  Version:          1.0.0-rc10
  GitCommit:        dc9208a3303feef5b3839f4323d9beb36df0a9dd
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683
> docker info
Client:
 Debug Mode: false

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 1
 Server Version: 19.03.12
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 7ad184331fa3e55e52b890ea95e65ba581ae3429
 runc version: dc9208a3303feef5b3839f4323d9beb36df0a9dd
 init version: fec3683
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 4.19.104-microsoft-standard
 Operating System: Docker Desktop
 OSType: linux
 Architecture: x86_64
 CPUs: 12
 Total Memory: 25GiB
 Name: docker-desktop
 ID: P4GD:WWIJ:NWDT:FKX7:PDUZ:R7FH:O5UC:PE3Q:JN3C:DSS4:CKX7:5T7I
 Docker Root Dir: /var/lib/docker
 Debug Mode: true
  File Descriptors: 38
  Goroutines: 48
  System Time: 2020-09-09T16:06:36.287245Z
  EventsListeners: 2
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false
 Product License: Community Engine

WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled

But I get the same error where it seems like something is trying to execute PowerShell on log output.

Trying to follow the blob links that the tool is using causes my browser to time out.

I'm afraid I don't quite understand what I need to do to update this repo after a PowerShell release. The instructions I'm following say: