@@ -221,19 +221,20 @@ func (in *CoherenceReconciler) Reconcile(ctx context.Context, request ctrl.Reque
221221
222222 if found {
223223 // The "storeHash" is not "", so it must have been processed by the Operator (could have been a previous version).
224- // There was a bug prior to 3.2.8 where the hash was calculated at the wrong point in the defaulting web-hook,
225- // so the "currentHash" may be wrong, and hence differ from the recalculated "hash".
226- if deployment .IsBeforeVersion ("3.3.0" ) {
224+ // There was a bug prior to 3.4.2 where the hash was calculated at the wrong point in the defaulting web-hook,
225+ // and the has used only a portion of the spec, so the "currentHash" may be wrong, and hence differ from the
226+ // recalculated "hash".
227+ if deployment .IsBeforeVersion ("3.4.2" ) {
227228 // the AnnotationOperatorVersion annotation was added in the 3.2.8 web-hook, so if it is missing
228- // the Coherence resource was added or updated prior to 3.2.8
229- // In this case we just ignore the difference in hash.
229+ // the Coherence resource was added or updated prior to 3.2.8, or the version is present but is
230+ // prior to 3.4.2. In this case we just ignore the difference in hash.
230231 // There is an edge case where the Coherence resource could have legitimately been updated whilst
231232 // the Operator and web-hooks were uninstalled. In that case we would ignore the update until another
232233 // update is made. The simplest way for the customer to work around this is to add the
233234 // AnnotationOperatorVersion annotation with some value, which will then be overwritten by the web-hook
234235 // and the Coherence resource will be correctly processes.
235236 desiredResources = storage .GetLatest ()
236- log .Info ("Ignoring hash difference for pre-3.2.8 resource" , "hash" , hash , "store" , storeHash )
237+ log .Info ("Ignoring hash difference for pre-3.4.2 resource" , "hash" , hash , "store" , storeHash )
237238 }
238239 }
239240 } else {
@@ -340,6 +341,7 @@ func (in *CoherenceReconciler) SetupWithManager(mgr ctrl.Manager, cs clients.Cli
340341func (in * CoherenceReconciler ) GetReconciler () reconcile.Reconciler { return in }
341342
342343// ensureHashApplied ensures that the hash label is present in the Coherence resource, patching it if required
344+ // Returns true if the hash label was applied to the Coherence resource, or false if the label was already present
343345func (in * CoherenceReconciler ) ensureHashApplied (ctx context.Context , c * coh.Coherence ) (bool , error ) {
344346 currentHash := ""
345347 labels := c .GetLabels ()
0 commit comments