Skip to content

Commit

Permalink
fix: removed error when upgrading with reducer
Browse files Browse the repository at this point in the history
  • Loading branch information
Al-Pragliola committed Jan 23, 2024
1 parent ffe9ec7 commit 28d6075
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions internal/apis/kfd/v1alpha2/common/create/preupgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,11 @@ import (
)

var (
errUpgradeCanceled = errors.New("upgrade canceled by user")
errUpgradeFlagNotSet = errors.New("upgrade flag not set by user")
errUpgradeWithReducersNotAllowed = errors.New("upgrade with reducers not allowed")
errUpgradePathNotFound = errors.New("upgrade path not found")
errGettingDistroVersionFrom = errors.New("error while getting distribution version from")
errGettingDistroVersionTo = errors.New("error while getting distribution version to")
errUpgradeCanceled = errors.New("upgrade canceled by user")
errUpgradeFlagNotSet = errors.New("upgrade flag not set by user")
errUpgradePathNotFound = errors.New("upgrade path not found")
errGettingDistroVersionFrom = errors.New("error while getting distribution version from")
errGettingDistroVersionTo = errors.New("error while getting distribution version to")
)

type PreUpgrade struct {
Expand Down Expand Up @@ -216,9 +215,10 @@ func (p *PreUpgrade) Exec() error {
return fmt.Errorf("error checking upgrade path: %w", err)
}

if len(p.reducers) > 0 {
return errUpgradeWithReducersNotAllowed
}
// We should find a smarer way to stop the process if the reducers are from the upgrade or not
// if len(p.reducers) > 0 {
// return errUpgradeWithReducersNotAllowed
// }.

if !p.forceFlag {
if _, err := fmt.Println("Are you sure you want to continue? Only 'yes' will be accepted to confirm."); err != nil {
Expand Down

0 comments on commit 28d6075

Please sign in to comment.