mariotoffia / FluentDocker

Use docker, docker-compose local and remote in tests and your .NET core/full framework apps via a FluentAPI
Apache License 2.0
1.31k stars 97 forks source link

GetRunningProcesses extension failed on parsing TimeSpan #299

Open mikhail-khalizev opened 1 year ago

mikhail-khalizev commented 1 year ago
      System.FormatException: String 'Sep08' was not recognized as a valid TimeSpan.
         at System.Globalization.TimeSpanParse.TimeSpanResult.SetBadTimeSpanFailure()
         at System.Globalization.TimeSpanParse.ProcessTerminal_D(TimeSpanRawInfo& raw, TimeSpanStandardStyles style, TimeSpanResult& result)
         at System.Globalization.TimeSpanParse.ProcessTerminalState(TimeSpanRawInfo& raw, TimeSpanStandardStyles style, TimeSpanResult& result)
         at System.Globalization.TimeSpanParse.TryParseTimeSpan(ReadOnlySpan`1 input, TimeSpanStandardStyles style, IFormatProvider formatProvider, TimeSpanResult& result)
         at System.TimeSpan.Parse(String s)
         at Ductus.FluentDocker.Model.Containers.ProcessRow.ToRow(IList`1 columns, IList`1 fullRow)
         at Ductus.FluentDocker.Executors.Parsers.ClientTopResponseParser.Process(ProcessExecutionResult response)
         at Ductus.FluentDocker.Executors.ProcessExecutor`2.Execute()
         at Ductus.FluentDocker.Commands.Client.Top(DockerUri host, String id, ICertificatePaths certificates)
         at Ductus.FluentDocker.Services.Extensions.ContainerExtensions.GetRunningProcesses(IContainerService service)

docker top returns:

UID                 PID                 PPID                C                   STIME               TTY                 TIME                CMD
root                18590               18568               0                   Sep08               ?                   00:00:00            /bin/bash
root                23665               18590               2                   00:14               ?                   00:00:45            bash --rcfile /tmp/nix-shell.XWFWoR
root                24598               23665               0                   00:20               ?                   00:00:01            bash --rcfile /tmp/nix-shell.sboUxl/nix-shell.