microsoft / vsts-cloudfoundry

Azure DevOps Extension for Cloud Foundry
MIT License
20 stars 18 forks source link

CF Push Fails Through Plugin #13

Closed sorvis closed 5 years ago

sorvis commented 6 years ago

Randomly we see this error message while doing a CF Push using the plug-in with VSTS:

2018-01-31T21:25:36.2968541Z -----> Publish dotnet
2018-01-31T21:25:36.5978540Z System.IndexOutOfRangeException: Index was outside the bounds of the array.
2018-01-31T21:25:36.5988228Z at System.String.get_Chars(Int32 index)
2018-01-31T21:25:36.5988228Z at Microsoft.DotNet.Cli.CommandLine.StringExtensions.HasPrefix(String arg)
2018-01-31T21:25:36.5988228Z at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source, Int32& length)
2018-01-31T21:25:36.5988228Z at System.Collections.Generic.Queue`1..ctor(IEnumerable`1 collection)
2018-01-31T21:25:36.5988228Z at Microsoft.DotNet.Cli.CommandLine.Parser.Parse(IReadOnlyCollection`1 rawArgs, Boolean isProgressive)
2018-01-31T21:25:36.5988228Z at Microsoft.DotNet.Cli.CommandLine.Parser.Parse(String[] args)
2018-01-31T21:25:36.5988228Z at Microsoft.DotNet.Cli.ParserExtensions.ParseFrom(Parser parser, String context, String[] args)
2018-01-31T21:25:36.5988228Z at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, ITelemetry telemetryClient)
2018-01-31T21:25:36.6228455Z at Microsoft.DotNet.Cli.CommandLine.StringExtensions.<Lex>d__7.MoveNext()
2018-01-31T21:25:36.6228455Z at Microsoft.DotNet.Cli.Program.Main(String[] args)
2018-01-31T21:25:36.6228455Z [31;1m**ERROR**[0m Unable to run dotnet publish: exit status 1
2018-01-31T21:25:36.6228455Z Failed to compile droplet: Failed to run finalize script: exit status 12
2018-01-31T21:25:36.6228455Z Exit status 223
2018-01-31T21:25:36.6228455Z Staging failed: STG: Exited with status 223
2018-01-31T21:25:36.2968541Z -----> Publish dotnet
2018-01-31T21:25:36.5978540Z System.IndexOutOfRangeException: Index was outside the bounds of the array.
2018-01-31T21:25:36.5988228Z at System.String.get_Chars(Int32 index)
2018-01-31T21:25:36.5988228Z at Microsoft.DotNet.Cli.CommandLine.StringExtensions.HasPrefix(String arg)
2018-01-31T21:25:36.5988228Z at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source, Int32& length)
2018-01-31T21:25:36.5988228Z at System.Collections.Generic.Queue`1..ctor(IEnumerable`1 collection)
2018-01-31T21:25:36.5988228Z at Microsoft.DotNet.Cli.CommandLine.Parser.Parse(IReadOnlyCollection`1 rawArgs, Boolean isProgressive)
2018-01-31T21:25:36.5988228Z at Microsoft.DotNet.Cli.CommandLine.Parser.Parse(String[] args)
2018-01-31T21:25:36.5988228Z at Microsoft.DotNet.Cli.ParserExtensions.ParseFrom(Parser parser, String context, String[] args)
2018-01-31T21:25:36.5988228Z at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, ITelemetry telemetryClient)
2018-01-31T21:25:36.6228455Z at Microsoft.DotNet.Cli.CommandLine.StringExtensions.<Lex>d__7.MoveNext()
2018-01-31T21:25:36.6228455Z at Microsoft.DotNet.Cli.Program.Main(String[] args)
2018-01-31T21:25:36.6228455Z [31;1m**ERROR**[0m Unable to run dotnet publish: exit status 1
2018-01-31T21:25:36.6228455Z Failed to compile droplet: Failed to run finalize script: exit status 12
2018-01-31T21:25:36.6228455Z Exit status 223
2018-01-31T21:25:36.6228455Z Staging failed: STG: Exited with status 223

If we run a custom powershell script instead the just does a custom CF Push through the CLI it works. Would this be a bug in the plugin or some other issue? Pivotal support referred me here.

Thank you very much for your help.

madhurig commented 6 years ago

The VSTS plugin is running the CF CLI. Can you paste the exact command that is failing from your log? You can search for the [command] tag. If you use the command in a script does that work consistently?

Where are you running the build? On your own agents or VSTS Hosted agents?

Thanks, Madhuri

sorvis commented 6 years ago

Unfortunately, we do not have a full stash of those logs saved anymore. If we reproduce the issue we can post better logs though.

We were running the build on our own build agents.

madhurig commented 5 years ago

Closing old issue since there is no update.