Skip to content

Commit 3c919d6

Browse files
author
igor.grzankowski
committed
Remove in progress phase
1 parent 2640e21 commit 3c919d6

File tree

4 files changed

+0
-75
lines changed

4 files changed

+0
-75
lines changed

api/v4/common_types.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -572,8 +572,6 @@ type PhaseInfo struct {
572572
const (
573573
// AppPkgDownloadPending indicates pending
574574
AppPkgDownloadPending AppPhaseStatusType = 101
575-
// AppPkgDownloadInProgress indicates in progress
576-
AppPkgDownloadInProgress = 102
577575
// AppPkgDownloadComplete indicates complete
578576
AppPkgDownloadComplete = 103
579577
// AppPkgDownloadError indicates error after retries
@@ -583,8 +581,6 @@ const (
583581
const (
584582
// AppPkgPodCopyPending indicates pending
585583
AppPkgPodCopyPending AppPhaseStatusType = 201
586-
// AppPkgPodCopyInProgress indicates in progress
587-
AppPkgPodCopyInProgress = 202
588584
// AppPkgPodCopyComplete indicates complete
589585
AppPkgPodCopyComplete = 203
590586
// AppPkgMissingFromOperator indicates the downloaded app package is missing
@@ -596,8 +592,6 @@ const (
596592
const (
597593
// AppPkgInstallPending indicates pending
598594
AppPkgInstallPending AppPhaseStatusType = 301
599-
// AppPkgInstallInProgress indicates in progress
600-
AppPkgInstallInProgress = 302
601595
// AppPkgInstallComplete indicates complete
602596
AppPkgInstallComplete = 303
603597
// AppPkgMissingOnPodError indicates app pkg is not available on Pod for install

pkg/splunk/enterprise/afwscheduler.go

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,9 @@ import (
3737

3838
var appPhaseInfoStatuses = map[enterpriseApi.AppPhaseStatusType]bool{
3939
enterpriseApi.AppPkgDownloadPending: true,
40-
enterpriseApi.AppPkgDownloadInProgress: true,
4140
enterpriseApi.AppPkgDownloadComplete: true,
4241
enterpriseApi.AppPkgDownloadError: true,
4342
enterpriseApi.AppPkgPodCopyPending: true,
44-
enterpriseApi.AppPkgPodCopyInProgress: true,
4543
enterpriseApi.AppPkgPodCopyComplete: true,
4644
enterpriseApi.AppPkgMissingFromOperator: true,
4745
enterpriseApi.AppPkgPodCopyError: true,
@@ -557,34 +555,6 @@ downloadWork:
557555
continue
558556
}
559557

560-
// update the download state of app to be DownloadInProgress
561-
updatePplnWorkerPhaseInfo(ctx, downloadWorker.appDeployInfo, downloadWorker.appDeployInfo.PhaseInfo.FailCount, enterpriseApi.AppPkgDownloadInProgress)
562-
563-
appDeployInfo := downloadWorker.appDeployInfo
564-
565-
// create the sub-directories on the volume for downloading scoped apps
566-
localPath, err := downloadWorker.createDownloadDirOnOperator(ctx)
567-
if err != nil {
568-
scopedLog.Error(err, "unable to create download directory on operator", "appSrcName", downloadWorker.appSrcName, "appName", appDeployInfo.AppName)
569-
570-
// increment the retry count and mark this app as download pending
571-
updatePplnWorkerPhaseInfo(ctx, appDeployInfo, appDeployInfo.PhaseInfo.FailCount+1, enterpriseApi.AppPkgDownloadPending)
572-
573-
<-downloadWorkersRunPool
574-
continue
575-
}
576-
577-
// get the remoteDataClientMgr instance
578-
remoteDataClientMgr, err := getRemoteDataClientMgr(ctx, downloadWorker.client, downloadWorker.cr, downloadWorker.afwConfig, downloadWorker.appSrcName)
579-
if err != nil {
580-
scopedLog.Error(err, "unable to get remote data client manager")
581-
// increment the retry count and mark this app as download error
582-
updatePplnWorkerPhaseInfo(ctx, appDeployInfo, appDeployInfo.PhaseInfo.FailCount+1, enterpriseApi.AppPkgDownloadError)
583-
584-
<-downloadWorkersRunPool
585-
continue
586-
}
587-
588558
// increment the count in worker waitgroup
589559
downloadWorker.waiter.Add(1)
590560

pkg/splunk/enterprise/util.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -426,24 +426,18 @@ func appPhaseStatusAsStr(status enterpriseApi.AppPhaseStatusType) string {
426426
switch status {
427427
case enterpriseApi.AppPkgDownloadPending:
428428
return "Download Pending"
429-
case enterpriseApi.AppPkgDownloadInProgress:
430-
return "Download In Progress"
431429
case enterpriseApi.AppPkgDownloadComplete:
432430
return "Download Complete"
433431
case enterpriseApi.AppPkgDownloadError:
434432
return "Download Error"
435433
case enterpriseApi.AppPkgPodCopyPending:
436434
return "Pod Copy Pending"
437-
case enterpriseApi.AppPkgPodCopyInProgress:
438-
return "Pod Copy In Progress"
439435
case enterpriseApi.AppPkgPodCopyComplete:
440436
return "Pod Copy Complete"
441437
case enterpriseApi.AppPkgPodCopyError:
442438
return "Pod Copy Error"
443439
case enterpriseApi.AppPkgInstallPending:
444440
return "Install Pending"
445-
case enterpriseApi.AppPkgInstallInProgress:
446-
return "Install In Progress"
447441
case enterpriseApi.AppPkgInstallComplete:
448442
return "Install Complete"
449443
case enterpriseApi.AppPkgInstallError:
@@ -458,8 +452,6 @@ func bundlePushStateAsStr(ctx context.Context, state enterpriseApi.BundlePushSta
458452
switch state {
459453
case enterpriseApi.BundlePushPending:
460454
return "Bundle Push Pending"
461-
case enterpriseApi.BundlePushInProgress:
462-
return "Bundle Push In Progress"
463455
case enterpriseApi.BundlePushComplete:
464456
return "Bundle Push Complete"
465457
default:

pkg/splunk/enterprise/util_test.go

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1098,11 +1098,6 @@ func TestAppPhaseStatusAsStr(t *testing.T) {
10981098
t.Errorf("Got wrong status. Expected status=Download Pending, Got = %s", status)
10991099
}
11001100

1101-
status = appPhaseStatusAsStr(enterpriseApi.AppPkgDownloadInProgress)
1102-
if status != "Download In Progress" {
1103-
t.Errorf("Got wrong status. Expected status=\"Download In Progress\", Got = %s", status)
1104-
}
1105-
11061101
status = appPhaseStatusAsStr(enterpriseApi.AppPkgDownloadComplete)
11071102
if status != "Download Complete" {
11081103
t.Errorf("Got wrong status. Expected status=\"Download Complete\", Got = %s", status)
@@ -1113,36 +1108,11 @@ func TestAppPhaseStatusAsStr(t *testing.T) {
11131108
t.Errorf("Got wrong status. Expected status=\"Download Error\", Got = %s", status)
11141109
}
11151110

1116-
status = appPhaseStatusAsStr(enterpriseApi.AppPkgPodCopyPending)
1117-
if status != "Pod Copy Pending" {
1118-
t.Errorf("Got wrong status. Expected status=Pod Copy Pending, Got = %s", status)
1119-
}
1120-
1121-
status = appPhaseStatusAsStr(enterpriseApi.AppPkgPodCopyInProgress)
1122-
if status != "Pod Copy In Progress" {
1123-
t.Errorf("Got wrong status. Expected status=\"Pod Copy In Progress\", Got = %s", status)
1124-
}
1125-
1126-
status = appPhaseStatusAsStr(enterpriseApi.AppPkgPodCopyComplete)
1127-
if status != "Pod Copy Complete" {
1128-
t.Errorf("Got wrong status. Expected status=\"Pod Copy Complete\", Got = %s", status)
1129-
}
1130-
1131-
status = appPhaseStatusAsStr(enterpriseApi.AppPkgPodCopyError)
1132-
if status != "Pod Copy Error" {
1133-
t.Errorf("Got wrong status. Expected status=\"Pod Copy Error\", Got = %s", status)
1134-
}
1135-
11361111
status = appPhaseStatusAsStr(enterpriseApi.AppPkgInstallPending)
11371112
if status != "Install Pending" {
11381113
t.Errorf("Got wrong status. Expected status=Install Pending, Got = %s", status)
11391114
}
11401115

1141-
status = appPhaseStatusAsStr(enterpriseApi.AppPkgInstallInProgress)
1142-
if status != "Install In Progress" {
1143-
t.Errorf("Got wrong status. Expected status=\"Install In Progress\", Got = %s", status)
1144-
}
1145-
11461116
status = appPhaseStatusAsStr(enterpriseApi.AppPkgInstallComplete)
11471117
if status != "Install Complete" {
11481118
t.Errorf("Got wrong status. Expected status=\"Install Complete\", Got = %s", status)
@@ -1162,7 +1132,6 @@ func TestAppPhaseStatusAsStr(t *testing.T) {
11621132
func TestBundlePushStateAsStr(t *testing.T) {
11631133
bpsMap := map[enterpriseApi.BundlePushStageType]string{
11641134
enterpriseApi.BundlePushPending: "Bundle Push Pending",
1165-
enterpriseApi.BundlePushInProgress: "Bundle Push In Progress",
11661135
enterpriseApi.BundlePushComplete: "Bundle Push Complete",
11671136
4: "Invalid bundle push state",
11681137
}

0 commit comments

Comments
 (0)