@@ -798,11 +798,6 @@ func (a *Operator) copyToNamespace(prototype *v1alpha1.ClusterServiceVersion, ns
798798 return nil , fmt .Errorf ("bug: can not copy to active namespace %v" , nsFrom )
799799 }
800800
801- a .logger .WithFields (logrus.Fields {
802- "nsFrom" : nsFrom ,
803- "nsTo" : nsTo ,
804- }).Info ("copyToNamespace" )
805-
806801 prototype .Namespace = nsTo
807802 prototype .ResourceVersion = ""
808803 prototype .UID = ""
@@ -840,6 +835,10 @@ func (a *Operator) copyToNamespace(prototype *v1alpha1.ClusterServiceVersion, ns
840835 if updated , err = a .client .OperatorsV1alpha1 ().ClusterServiceVersions (nsTo ).Update (context .TODO (), prototype , metav1.UpdateOptions {}); err != nil {
841836 return nil , fmt .Errorf ("failed to update: %w" , err )
842837 }
838+ a .logger .WithFields (logrus.Fields {
839+ "nsFrom" : nsFrom ,
840+ "nsTo" : nsTo ,
841+ }).Info ("copyToNamespace: updated Metadata+Spec" )
843842 } else {
844843 // Avoid mutating cached copied CSV.
845844 updated = prototype
@@ -850,6 +849,10 @@ func (a *Operator) copyToNamespace(prototype *v1alpha1.ClusterServiceVersion, ns
850849 if _ , err = a .client .OperatorsV1alpha1 ().ClusterServiceVersions (nsTo ).UpdateStatus (context .TODO (), updated , metav1.UpdateOptions {}); err != nil {
851850 return nil , fmt .Errorf ("failed to update status: %w" , err )
852851 }
852+ a .logger .WithFields (logrus.Fields {
853+ "nsFrom" : nsFrom ,
854+ "nsTo" : nsTo ,
855+ }).Info ("copyToNamespace: updated Status" )
853856 }
854857 return & v1alpha1.ClusterServiceVersion {
855858 ObjectMeta : metav1.ObjectMeta {
0 commit comments