From c80bd024a808082ca3a0743dd9f9be3bbe3ecae3 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 3 Nov 2021 10:47:43 -0700 Subject: [PATCH] pkg/cvo/updatepayload: Drop history from target pullspec lookup The logic I'm removing is a convenience from 558ae021bd (cvo: Record history of changes to version and report target version, 2019-01-08, #63). But the current consensus is that: * Rollbacks are risky enough that we don't want to make them that convenient. * Rollbacks have never been supported, so removing the convenient pullspec lookup is a backwards-compatible-enough change. This also brings the ClusterVersion operator's approach into line with how 'oc adm upgrade --to ...' has always worked [1]. [1]: https://bugzilla.redhat.com/show_bug.cgi?id=1878925 --- pkg/cvo/updatepayload.go | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/pkg/cvo/updatepayload.go b/pkg/cvo/updatepayload.go index f407a48d4f..f4adef48c8 100644 --- a/pkg/cvo/updatepayload.go +++ b/pkg/cvo/updatepayload.go @@ -306,8 +306,7 @@ func copyPayloadCmd(tdir string) string { } // findUpdateFromConfig identifies a desired update from user input or returns false. It will -// resolve payload if the user specifies a version and a matching available update or previous -// update is in the history. +// resolve payload if the user specifies a version and a matching available update. func findUpdateFromConfig(config *configv1.ClusterVersion) (configv1.Update, bool) { update := config.Spec.DesiredUpdate if update == nil { @@ -329,14 +328,5 @@ func findUpdateFromConfigVersion(config *configv1.ClusterVersion, version string }, true } } - for _, history := range config.Status.History { - if history.Version == version && len(history.Image) > 0 { - return configv1.Update{ - Version: version, - Image: history.Image, - Force: force, - }, true - } - } return configv1.Update{}, false }