@@ -2696,14 +2696,30 @@ func postInstallationHandler(ctx context.Context, opts *RuntimeInstallOptions, e
2696
2696
if err != nil && ! * disableRollback {
2697
2697
summaryArr = append (summaryArr , summaryLog {"----------Uninstalling runtime----------" , Info })
2698
2698
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
+
2699
2714
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 ,
2707
2723
})
2708
2724
handleCliStep (reporter .UninstallPhaseFinish , "Uninstall phase finished after rollback" , err , false , true )
2709
2725
if err != nil {
0 commit comments