Skip to content

Commit 1839ef3

Browse files
Longer timeouts (#58)
* timeout * timeout * bump * codegen
1 parent 07556a4 commit 1839ef3

File tree

7 files changed

+17
-11
lines changed

7 files changed

+17
-11
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.59
1+
VERSION=v0.0.60
22
OUT_DIR=dist
33
YEAR?=$(shell date +"%Y")
44

cmd/commands/runtime.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,8 @@ func NewRuntimeInstallCommand() *cobra.Command {
162162
}
163163

164164
cmd.Flags().StringVar(&versionStr, "version", "", "The runtime version to install, defaults to latest")
165+
cmd.Flags().DurationVar(&store.Get().WaitTimeout, "wait-timeout", store.Get().WaitTimeout, "How long to wait for the runtime components to be ready")
166+
165167
insCloneOpts = git.AddFlags(cmd, &git.AddFlagsOptions{
166168
CreateIfNotExist: true,
167169
FS: memfs.New(),
@@ -358,13 +360,15 @@ func NewRuntimeUninsatllCommand() *cobra.Command {
358360

359361
return RunRuntimeUninstall(ctx, &RuntimeUninstallOptions{
360362
RuntimeName: args[0],
361-
Timeout: aputil.MustParseDuration(cmd.Flag("request-timeout").Value.String()),
363+
Timeout: store.Get().WaitTimeout,
362364
CloneOpts: cloneOpts,
363365
KubeFactory: f,
364366
})
365367
},
366368
}
367369

370+
cmd.Flags().DurationVar(&store.Get().WaitTimeout, "wait-timeout", store.Get().WaitTimeout, "How long to wait for the runtime components to be deleted")
371+
368372
cloneOpts = git.AddFlags(cmd, &git.AddFlagsOptions{
369373
FS: memfs.New(),
370374
})

docs/commands/cli-v2_runtime_install.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ cli-v2 runtime install [runtime_name] [flags]
3838
--provider string The git provider, one of: gitea|github
3939
--repo string Repository URL [GIT_REPO]
4040
--version string The runtime version to install, defaults to latest
41+
--wait-timeout duration How long to wait for the runtime components to be ready (default 8m0s)
4142
```
4243

4344
### Options inherited from parent commands

docs/commands/cli-v2_runtime_uninstall.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,12 @@ cli-v2 runtime uninstall [runtime_name] [flags]
2828
### Options
2929

3030
```
31-
-t, --git-token string Your git provider api token [GIT_TOKEN]
32-
-h, --help help for uninstall
33-
--kubeconfig string Path to the kubeconfig file to use for CLI requests.
34-
-n, --namespace string If present, the namespace scope for this CLI request
35-
--repo string Repository URL [GIT_REPO]
31+
-t, --git-token string Your git provider api token [GIT_TOKEN]
32+
-h, --help help for uninstall
33+
--kubeconfig string Path to the kubeconfig file to use for CLI requests.
34+
-n, --namespace string If present, the namespace scope for this CLI request
35+
--repo string Repository URL [GIT_REPO]
36+
--wait-timeout duration How long to wait for the runtime components to be deleted (default 8m0s)
3637
```
3738

3839
### Options inherited from parent commands

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.59/cf-linux-amd64.tar.gz | tar zx
23+
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.60/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.59/cf-darwin-amd64.tar.gz | tar zx
35+
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.60/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.59
8+
version: 0.0.60
99
bootstrapSpecifier: github.com/codefresh-io/cli-v2/manifests/argo-cd
1010
components:
1111
- name: events

pkg/store/store.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ func init() {
100100
s.MaxDefVersion = semver.MustParse(maxDefVersion)
101101
s.RuntimeDefURL = RuntimeDefURL
102102
s.RuntimeFilename = "runtime.yaml"
103-
s.WaitTimeout = 5 * time.Minute
103+
s.WaitTimeout = 8 * time.Minute
104104
initVersion()
105105
}
106106

0 commit comments

Comments
 (0)