Skip to content

Commit

Permalink
Fix check for version gate Ack
Browse files Browse the repository at this point in the history
Signed-off-by: melserngawy <[email protected]>
  • Loading branch information
serngawy committed Oct 17, 2024
1 parent 7e0812f commit 6add99a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions pkg/rosa/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,23 @@ func ScheduleControlPlaneUpgrade(client *ocm.Client, cluster *cmv1.Cluster, vers
ScheduleType(cmv1.ScheduleTypeManual).
Version(version).
NextRun(nextRun).
EnableMinorVersionUpgrades(true).
Build()
if err != nil {
return nil, err
}

versionGates, err := client.GetMissingGateAgreementsHypershift(cluster.ID(), upgradePolicy)
if err != nil {
return nil, err
}

for id := range versionGates {
if err = client.AckVersionGate(cluster.ID(), versionGates[id].ID()); err != nil {
return nil, err
}
}

return client.ScheduleHypershiftControlPlaneUpgrade(cluster.ID(), upgradePolicy)
}

Expand All @@ -64,6 +77,7 @@ func ScheduleNodePoolUpgrade(client *ocm.Client, clusterID string, nodePool *cmv
ScheduleType(cmv1.ScheduleTypeManual).
Version(version).
NextRun(nextRun).
EnableMinorVersionUpgrades(true).
Build()
if err != nil {
return nil, err
Expand Down

0 comments on commit 6add99a

Please sign in to comment.