diff --git a/artifactory/commands/transferfiles/delayedartifactshandler.go b/artifactory/commands/transferfiles/delayedartifactshandler.go index b44aeb2c9..277cbe503 100644 --- a/artifactory/commands/transferfiles/delayedartifactshandler.go +++ b/artifactory/commands/transferfiles/delayedartifactshandler.go @@ -129,9 +129,7 @@ func consumeDelayFilesIfNoErrors(phase phaseBase, addedDelayFiles []string) erro return nil } -func countDelayFilesContent(filePaths []string) (int, int64, error) { - count := 0 - var storage int64 = 0 +func countDelayFilesContent(filePaths []string) (count int, storage int64, err error) { for _, file := range filePaths { delayFile, err := readDelayFile(file) if err != nil { @@ -142,7 +140,7 @@ func countDelayFilesContent(filePaths []string) (int, int64, error) { storage += delay.Size } } - return count, storage, nil + return } func handleDelayedArtifactsFiles(filesToConsume []string, base phaseBase, delayUploadComparisonFunctions []shouldDelayUpload) error { diff --git a/artifactory/commands/transferfiles/status.go b/artifactory/commands/transferfiles/status.go index bd5da9b61..4250542b4 100644 --- a/artifactory/commands/transferfiles/status.go +++ b/artifactory/commands/transferfiles/status.go @@ -102,7 +102,7 @@ func setRepositoryStatus(stateManager *state.TransferStateManager, output *strin if stateManager.CurrentRepoPhase == api.Phase1 { addString(output, "🔢", "Phase", "Transferring all files in the repository (1/3)", 3) } else { - addString(output, "🔢", "Phase", "Retrying transfer failures and deploy delayed files (3/3)", 3) + addString(output, "🔢", "Phase", "Retrying transfer failures and transfer delayed files (3/3)", 3) } addString(output, "🗄 ", "Storage", sizeToString(currentRepo.Phase1Info.TransferredSizeBytes)+" / "+sizeToString(currentRepo.Phase1Info.TotalSizeBytes)+calcPercentageInt64(currentRepo.Phase1Info.TransferredSizeBytes, currentRepo.Phase1Info.TotalSizeBytes), 3) addString(output, "📄", "Files", fmt.Sprintf("%d / %d", currentRepo.Phase1Info.TransferredUnits, currentRepo.Phase1Info.TotalUnits)+calcPercentageInt64(currentRepo.Phase1Info.TransferredUnits, currentRepo.Phase1Info.TotalUnits), 3) diff --git a/artifactory/commands/transferfiles/status_test.go b/artifactory/commands/transferfiles/status_test.go index adef939d4..563d7490f 100644 --- a/artifactory/commands/transferfiles/status_test.go +++ b/artifactory/commands/transferfiles/status_test.go @@ -138,7 +138,7 @@ func TestShowBuildInfoRepo(t *testing.T) { // Check repository status assert.Contains(t, results, "Current Repository Status") assert.Contains(t, results, "Name: repo1") - assert.Contains(t, results, "Phase: Retrying transfer failures and deploy delayed files (3/3)") + assert.Contains(t, results, "Phase: Retrying transfer failures and transfer delayed files (3/3)") assert.Contains(t, results, "Delayed files: 20 (Files to be transferred last, after all other files)") assert.Contains(t, results, "Storage: 4.9 KiB / 9.8 KiB (50.0%)") assert.Contains(t, results, "Files: 500 / 10000 (5.0%)") diff --git a/utils/progressbar/transferprogressbarmanager.go b/utils/progressbar/transferprogressbarmanager.go index 48a02f5a1..d479998b4 100644 --- a/utils/progressbar/transferprogressbarmanager.go +++ b/utils/progressbar/transferprogressbarmanager.go @@ -15,7 +15,7 @@ import ( const ( phase1HeadLine = "Phase 1: Transferring all files in the repository" phase2HeadLine = "Phase 2: Transferring newly created and modified files" - phase3HeadLine = "Phase 3: Retrying transfer failures and deploy delayed files" + phase3HeadLine = "Phase 3: Retrying transfer failures and transfer delayed files" DelayedFilesContentNote = "Files to be transferred last, after all other files" RetryFailureContentNote = "In Phase 3 and in subsequent executions, we'll retry transferring the failed files" )