Issue: when deployment is stopped by a user during downloading an artifact from TC the file is saved on tentacle as incomplete

Steps

  1. Click Deploy
  2. When artifact is being downloaded from TeamCity click cancel deploy
  3. Click Try Again
  4. Check the outcome
  5. Remove nupkg file from tentacle
  6. Click Try Again
    7 Check the outcome

Actual

  • In step 4 deployment is failed due to incomplete nupkg file (see attached logs)
  • In step 7 deploy is done successfully

Expected

  • In step 4 nupkg field should be redownloaded is file size on tentacle does not meet with source size.

Logs

Deploying package 'E:\Octopus\Files\feeds-teamcity-10\App.Test.6.7.0.35_16302F4BE7792249BF7451613C8A8619.nupkg' to machine 'https://g02dedb02tsca:10933/'
June 19th 2017 10:53:06Info
Deploying package:    E:\Octopus\Files\feeds-teamcity-10\App.Test.6.7.0.35_16302F4BE7792249BF7451613C8A8619.nupkg
June 19th 2017 10:53:17Error
System.IO.EndOfStreamException: Unable to read beyond the end of the stream.
June 19th 2017 10:53:17Error
   at System.IO.BinaryReader.FillBuffer(Int32 numBytes)
June 19th 2017 10:53:17Error
   at System.IO.BinaryReader.ReadUInt32()
June 19th 2017 10:53:17Error
   at SharpCompress.Common.Zip.StreamingZipHeaderFactory.<ReadStreamHeader>d__1.MoveNext()
June 19th 2017 10:53:17Error
   at SharpCompress.Readers.Zip.ZipReader.<GetEntries>d__6.MoveNext()
June 19th 2017 10:53:17Error
   at SharpCompress.Readers.AbstractReader`2.MoveToNextEntry()
June 19th 2017 10:53:17Error
   at Calamari.Integration.Packages.NuGet.NupkgExtractor.Extract(String packageFile, String directory, Boolean suppressNestedScriptWarning) in Z:\buildAgent\workDir\14ffc968155e4956\source\Calamari\Integration\Packages\NuGet\NupkgExtractor.cs:line 39
June 19th 2017 10:53:17Error
   at Calamari.Deployment.Conventions.ExtractPackageConvention.Install(RunningDeployment deployment) in Z:\buildAgent\workDir\14ffc968155e4956\source\Calamari\Deployment\Conventions\ExtractPackageConvention.cs:line 31
June 19th 2017 10:53:17Error
   at Calamari.Deployment.ConventionProcessor.RunInstallConventions() in Z:\buildAgent\workDir\14ffc968155e4956\source\Calamari\Deployment\ConventionProcessor.cs:line 60
June 19th 2017 10:53:17Error
   at Calamari.Deployment.ConventionProcessor.RunConventions() in Z:\buildAgent\workDir\14ffc968155e4956\source\Calamari\Deployment\ConventionProcessor.cs:line 28
June 19th 2017 10:53:17Error
Running rollback conventions...
June 19th 2017 10:53:17Error
System.ArgumentNullException: Value cannot be null.
June 19th 2017 10:53:17Error
Parameter name: path
June 19th 2017 10:53:17Error
   at System.IO.DirectoryInfo..ctor(String path)
June 19th 2017 10:53:17Error
   at Calamari.Integration.FileSystem.CalamariPhysicalFileSystem.EnumerateFiles(String parentDirectoryPath, String[] searchPatterns) in Z:\buildAgent\workDir\14ffc968155e4956\source\Calamari\Integration\FileSystem\CalamariPhysicalFileSystem.cs:line 183
June 19th 2017 10:53:17Error
   at Calamari.Integration.Scripting.PackagedScriptRunner.FindScripts(RunningDeployment deployment) in Z:\buildAgent\workDir\14ffc968155e4956\source\Calamari\Integration\Scripting\PackagedScriptRunner.cs:line 57
June 19th 2017 10:53:17Error
   at Calamari.Integration.Scripting.PackagedScriptRunner.RunScripts(RunningDeployment deployment) in Z:\buildAgent\workDir\14ffc968155e4956\source\Calamari\Integration\Scripting\PackagedScriptRunner.cs:line 32
June 19th 2017 10:53:17Error
   at Calamari.Deployment.ConventionProcessor.RunRollbackConventions() in Z:\buildAgent\workDir\14ffc968155e4956\source\Calamari\Deployment\ConventionProcessor.cs:line 71
June 19th 2017 10:53:17Error
   at Calamari.Deployment.ConventionProcessor.RunConventions() in Z:\buildAgent\workDir\14ffc968155e4956\source\Calamari\Deployment\ConventionProcessor.cs:line 48
June 19th 2017 10:53:17Error
   at Calamari.Commands.DeployPackageCommand.Execute(String[] commandLineArguments) in Z:\buildAgent\workDir\14ffc968155e4956\source\Calamari\Commands\DeployPackageCommand.cs:line 120
June 19th 2017 10:53:17Error
   at Calamari.Program.Execute(String[] args) in Z:\buildAgent\workDir\14ffc968155e4956\source\Calamari\Program.cs:line 45
June 19th 2017 10:53:19Fatal
The remote script failed with exit code 100
June 19th 2017 10:53:19Fatal
Deploy Desktop app to Test on Sort-Test-Deploy

Hi Szymon,

Thanks for the bug report. I’ve raised an issue and a fix is waiting for review. If you subscribe to the issue, you will be notified when it is included in a release.

Robert W