Skip to content

Commit d6f333d

Browse files
CR-7596 remove spinner (#171)
* removed 'installation taking longer than usual' spinner * bump version * defer stop()
1 parent a007f18 commit d6f333d

File tree

4 files changed

+5
-16
lines changed

4 files changed

+5
-16
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION=v0.0.159
1+
VERSION=v0.0.160
22

33
OUT_DIR=dist
44
YEAR?=$(shell date +"%Y")

cmd/commands/runtime.go

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -556,34 +556,23 @@ func checkExistingRuntimes(ctx context.Context, runtime string) error {
556556

557557
func intervalCheckIsRuntimePersisted(ctx context.Context, runtimeName string) error {
558558
maxRetries := 180 // up to 30 min
559-
longerThanUsualCount := 30 // after 5 min
560559
waitMsg := "Waiting for the runtime installation to complete"
561-
longetThanUsualMsg := waitMsg + " (this is taking longer than usual, you might need to check your cluster for errors)"
562560
stop := util.WithSpinner(ctx, waitMsg)
563561
ticker := time.NewTicker(time.Second * 10)
564562
defer ticker.Stop()
563+
defer stop()
565564

566565
for triesLeft := maxRetries; triesLeft > 0; triesLeft, _ = triesLeft-1, <-ticker.C {
567566
runtime, err := cfConfig.NewClient().V2().Runtime().Get(ctx, runtimeName)
568567
if err != nil {
569-
stop()
570568
return fmt.Errorf("failed to complete the runtime installation. Error: %w", err)
571569
}
572570

573571
if runtime.InstallationStatus == model.InstallationStatusCompleted {
574-
stop()
575572
return nil
576573
}
577-
578-
if triesLeft == longerThanUsualCount {
579-
stop()
580-
time.Sleep(time.Second)
581-
stop = util.WithSpinner(ctx, longetThanUsualMsg)
582-
}
583574
}
584575

585-
stop()
586-
587576
return fmt.Errorf("timed out while waiting for runtime installation to complete")
588577
}
589578

docs/releases/release_notes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ cf version
2020
### Linux
2121
```bash
2222
# download and extract the binary
23-
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.159/cf-linux-amd64.tar.gz | tar zx
23+
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.160/cf-linux-amd64.tar.gz | tar zx
2424

2525
# move the binary to your $PATH
2626
mv ./cf-linux-amd64 /usr/local/bin/cf
@@ -32,7 +32,7 @@ cf version
3232
### Mac
3333
```bash
3434
# download and extract the binary
35-
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.159/cf-darwin-amd64.tar.gz | tar zx
35+
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.160/cf-darwin-amd64.tar.gz | tar zx
3636

3737
# move the binary to your $PATH
3838
mv ./cf-darwin-amd64 /usr/local/bin/cf

manifests/runtime.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
namespace: "{{ namespace }}"
66
spec:
77
defVersion: 1.0.0
8-
version: 0.0.159
8+
version: 0.0.160
99
bootstrapSpecifier: github.com/codefresh-io/cli-v2/manifests/argo-cd
1010
components:
1111
- name: events

0 commit comments

Comments
 (0)