Skip to content

Commit 88b820b

Browse files
Installation rollback isc bug (#439)
* pass IscCloneOpts when installation rollback * bug fix * bump * small fix
1 parent 02f88f7 commit 88b820b

File tree

5 files changed

+28
-11
lines changed

5 files changed

+28
-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.389
1+
VERSION=v0.0.390
22

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

cmd/commands/runtime.go

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2696,14 +2696,30 @@ func postInstallationHandler(ctx context.Context, opts *RuntimeInstallOptions, e
26962696
if err != nil && !*disableRollback {
26972697
summaryArr = append(summaryArr, summaryLog{"----------Uninstalling runtime----------", Info})
26982698
log.G(ctx).Warnf("installation failed due to error : %s, performing installation rollback", err.Error())
2699+
iscCloneOpts := &git.CloneOptions{
2700+
FS: fs.Create(memfs.New()),
2701+
CreateIfNotExist: false,
2702+
}
2703+
iscCloneOpts.Repo, err = getIscRepo(ctx)
2704+
handleCliStep(reporter.UninstallStepGetIscRepoFromPlatform, "Getting isc repo from platform before rollback", err, false, true)
2705+
if err != nil {
2706+
log.G(ctx).Errorf("failed to get isc repo from platform before installation rollback: %s", err.Error())
2707+
}
2708+
2709+
inferProviderFromRepo(opts.InsCloneOpts)
2710+
iscCloneOpts.Auth = opts.InsCloneOpts.Auth
2711+
iscCloneOpts.Progress = opts.InsCloneOpts.Progress
2712+
iscCloneOpts.Parse()
2713+
26992714
err := RunRuntimeUninstall(ctx, &RuntimeUninstallOptions{
2700-
RuntimeName: opts.RuntimeName,
2701-
Timeout: store.Get().WaitTimeout,
2702-
CloneOpts: opts.InsCloneOpts,
2703-
KubeFactory: opts.KubeFactory,
2704-
SkipChecks: true,
2705-
Force: true,
2706-
FastExit: false,
2715+
RuntimeName: opts.RuntimeName,
2716+
Timeout: store.Get().WaitTimeout,
2717+
CloneOpts: opts.InsCloneOpts,
2718+
IscCloneOpts: iscCloneOpts,
2719+
KubeFactory: opts.KubeFactory,
2720+
SkipChecks: true,
2721+
Force: true,
2722+
FastExit: false,
27072723
})
27082724
handleCliStep(reporter.UninstallPhaseFinish, "Uninstall phase finished after rollback", err, false, true)
27092725
if err != nil {

docs/releases/release_notes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ cf version
2323

2424
```bash
2525
# download and extract the binary
26-
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.389/cf-linux-amd64.tar.gz | tar zx
26+
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.390/cf-linux-amd64.tar.gz | tar zx
2727

2828
# move the binary to your $PATH
2929
mv ./cf-linux-amd64 /usr/local/bin/cf
@@ -36,7 +36,7 @@ cf version
3636

3737
```bash
3838
# download and extract the binary
39-
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.389/cf-darwin-amd64.tar.gz | tar zx
39+
curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.0.390/cf-darwin-amd64.tar.gz | tar zx
4040

4141
# move the binary to your $PATH
4242
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.1
8-
version: 0.0.389
8+
version: 0.0.390
99
bootstrapSpecifier: github.com/codefresh-io/cli-v2/manifests/argo-cd
1010
components:
1111
- name: events

pkg/reporter/reporter.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ const (
110110
UninstallStepRemoveGitIntegrations CliStep = "uninstall.run.step.remove-git-integrations"
111111
UninstallStepRemoveRuntimeIsc CliStep = "uninstall.run.step.remove-runtime-isc"
112112
UninstallStepDeleteRuntimeFromPlatform CliStep = "uninstall.run.step.delete-runtime-from-platform"
113+
UninstallStepGetIscRepoFromPlatform CliStep = "uninstall.run.step.get-isc-repo-from-platform"
113114
UninstallPhaseFinish CliStep = "uninstall.run.phase.finish"
114115

115116
// Upgrade

0 commit comments

Comments
 (0)