You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this.logger.debug(`finished closing writerStream copying from ${podName}:${srcDir}/${srcFile} to ${destPath}`)
613
+
})
596
614
if(status==='Failure'){
597
615
self._deleteTempFile(tmpFile)
598
616
}
599
617
})
600
618
.then(conn=>{
601
619
conn.on('close',async(code,reason)=>{
602
620
if(code!==1000){// code 1000 is the success code
603
-
returnreject(newFullstackTestingError(`failed to copy because of error (${code}): ${reason}`))
621
+
returnreject(newFullstackTestingError(`failed copying from ${podName}:${srcDir}/${srcFile}to ${destPath} because of error (${code}): ${reason}`))
604
622
}
605
623
606
624
try{
@@ -622,40 +640,49 @@ export class K8 {
622
640
}
623
641
}
624
642
}catch(e){
625
-
returnreject(newFullstackTestingError(`failed to extract file: ${destPath}`,e))
643
+
returnreject(newFullstackTestingError(`failed copying from ${podName}:${srcDir}/${srcFile} to ${destPath}to extract file: ${destPath}`,e))
626
644
}
627
645
628
-
returnreject(newFullstackTestingError(`failed to download file completely: ${destPath}${additionalErrorMessageDetail}`))
646
+
returnreject(newFullstackTestingError(`failed copying from ${podName}:${srcDir}/${srcFile} to ${destPath}to download file completely: ${destPath}${additionalErrorMessageDetail}`))
629
647
})
630
648
631
649
conn.on('error',(e)=>{
632
650
self._deleteTempFile(tmpFile)
633
651
returnreject(newFullstackTestingError(
634
-
`failed to copy file${destPath} because of connection error: ${e.message}`,e))
652
+
`failed copying from ${podName}:${srcDir}/${srcFile} to${destPath} because of connection error: ${e.message}`,e))
635
653
})
636
654
})
637
655
638
656
errStream.on('data',(data)=>{
639
-
returnreject(newFullstackTestingError(`error encountered during download of file:${destPath}, error: ${data.toString()}`))
657
+
returnreject(newFullstackTestingError(`error encountered copying from ${podName}:${srcDir}/${srcFile} to${destPath}, error: ${data.toString()}`))
640
658
})
641
659
642
-
writerStream.on('close',()=>{
660
+
outputFileStream.on('close',()=>{
643
661
this.logger.debug(`finished copying from ${podName}:${srcDir}/${srcFile} to ${destPath}`)
644
662
})
645
663
646
-
writerStream.on('error',(err)=>{
647
-
returnreject(newFullstackTestingError(`error encountered during download of file:${destPath}, err: ${err.toString()}`,err))
664
+
outputFileStream.on('error',(err)=>{
665
+
returnreject(newFullstackTestingError(`writerStream error encountered copying from ${podName}:${srcDir}/${srcFile} to${destPath}, err: ${err.toString()}`,err))
648
666
649
667
})
650
668
651
-
writerStream.on('end',()=>{
669
+
outputFileStream.on('end',()=>{
652
670
this.logger.debug(`writerStream has ended for copying from ${podName}:${srcDir}/${srcFile} to ${destPath}`)
653
671
})
654
672
655
-
writerStream.on('finish',()=>{
656
-
writerStream.end()
673
+
outputPassthroughStream.on('end',()=>{
674
+
this.logger.debug(`writerPassthroughStream has ended for copying from ${podName}:${srcDir}/${srcFile} to ${destPath}`)
675
+
})
676
+
677
+
outputFileStream.on('finish',()=>{
678
+
outputFileStream.end()
657
679
this.logger.debug(`stopping copy, writerStream has finished for copying from ${podName}:${srcDir}/${srcFile} to ${destPath}`)
658
680
})
681
+
682
+
outputPassthroughStream.on('finish',()=>{
683
+
outputFileStream.end()
684
+
this.logger.debug(`stopping copy, writerPassthroughStream has finished for copying from ${podName}:${srcDir}/${srcFile} to ${destPath}`)
0 commit comments