Feroze Mohideen 2 anos atrás
pai
commit
124df1bd38
3 arquivos alterados com 6 adições e 2 exclusões
  1. 1 0
      cli/cmd/commands/app.go
  2. 1 0
      cli/cmd/commands/apply.go
  3. 4 2
      cli/cmd/v2/app_status.go

+ 1 - 0
cli/cmd/commands/app.go

@@ -1276,6 +1276,7 @@ func appUpdateTag(ctx context.Context, user *types.GetAuthenticatedUserResponse,
 				ClusterID:  cliConf.Cluster,
 				AppName:    args[0],
 				RevisionID: revisionId,
+				Client:     client,
 			})
 		}
 		return nil

+ 1 - 0
cli/cmd/commands/apply.go

@@ -159,6 +159,7 @@ func apply(ctx context.Context, _ *types.GetAuthenticatedUserResponse, client ap
 				ClusterID:  cliConfig.Cluster,
 				AppName:    appName,
 				RevisionID: revisionId,
+				Client:     client,
 			})
 		}
 		return nil

+ 4 - 2
cli/cmd/v2/app_status.go

@@ -18,6 +18,7 @@ const (
 	DefaultRetryFrequencySeconds = 10
 )
 
+// WaitForAppRevisionStatusInput is the input for the WaitForAppRevisionStatus function
 type WaitForAppRevisionStatusInput struct {
 	ProjectID  uint
 	ClusterID  uint
@@ -26,12 +27,13 @@ type WaitForAppRevisionStatusInput struct {
 	Client     api.Client
 }
 
+// WaitForAppRevisionStatus waits for an app revision to complete
 func WaitForAppRevisionStatus(ctx context.Context, input WaitForAppRevisionStatusInput) error {
 	timeoutMinutes := DefaultWaitTimeoutMinutes
 	timeout := time.Duration(timeoutMinutes) * time.Minute
 	deadline := time.Now().Add(timeout)
 
-	color.New(color.FgBlue).Printf("Waiting %d minutes for update to complete\n", timeoutMinutes) // nolint:errcheck,gosec
+	color.New(color.FgBlue).Printf("Waiting up to %d minutes for all services to deploy\n", timeoutMinutes) // nolint:errcheck,gosec
 
 	var status porter_app.HighLevelStatus
 
@@ -58,7 +60,7 @@ func WaitForAppRevisionStatus(ctx context.Context, input WaitForAppRevisionStatu
 	case porter_app.HighLevelStatus_Progressing:
 		return fmt.Errorf("timeout exceeded")
 	case porter_app.HighLevelStatus_Successful:
-		_, _ = color.New(color.FgGreen).Printf("Update completed successfully\n") // nolint:errcheck,gosec
+		_, _ = color.New(color.FgGreen).Printf("All services deployed successfully\n") // nolint:errcheck,gosec
 		return nil
 	case porter_app.HighLevelStatus_Failed:
 		return fmt.Errorf("update failed: check dashboard for details")