Refactor components status check
- run install/bootstrap checks in parallel (1m timeout) - list not found components Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
@@ -175,23 +175,16 @@ func installCmdRun(cmd *cobra.Command, args []string) error {
|
||||
if installDryRun {
|
||||
logger.Successf("install dry-run finished")
|
||||
return nil
|
||||
} else {
|
||||
logger.Successf("install completed")
|
||||
}
|
||||
|
||||
statusChecker := StatusChecker{}
|
||||
err = statusChecker.New(time.Second, rootArgs.timeout)
|
||||
statusChecker, err := NewStatusChecker(time.Second, time.Minute)
|
||||
if err != nil {
|
||||
return fmt.Errorf("install failed with: %v", err)
|
||||
return fmt.Errorf("install failed: %w", err)
|
||||
}
|
||||
|
||||
logger.Waitingf("verifying installation")
|
||||
for _, deployment := range components {
|
||||
err := statusChecker.Assess(deployment)
|
||||
if err != nil {
|
||||
return fmt.Errorf("%s: install failed while rolling out deployment", deployment)
|
||||
}
|
||||
logger.Successf("%s ready", deployment)
|
||||
if err := statusChecker.Assess(components...); err != nil {
|
||||
return fmt.Errorf("install failed")
|
||||
}
|
||||
|
||||
logger.Successf("install finished")
|
||||
|
||||
Reference in New Issue
Block a user