File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -233,6 +233,10 @@ def reconcile(self, event=None) -> None: # noqa: C901
233233 logger .debug ("Peer relation not ready" )
234234 return
235235 workload_ = self .get_workload (event = event )
236+ if self ._unit_lifecycle .authorized_leader and not self ._upgrade .in_progress :
237+ # Run before checking `self._upgrade.is_compatible` in case incompatible upgrade was
238+ # forced & completed on all units.
239+ self ._upgrade .set_versions_in_app_databag ()
236240 if self ._upgrade .unit_state == "restarting" : # Kubernetes only
237241 if not self ._upgrade .is_compatible :
238242 logger .info (
@@ -300,8 +304,6 @@ def reconcile(self, event=None) -> None: # noqa: C901
300304 self ._upgrade .unit_state = "healthy"
301305 if self ._unit_lifecycle .authorized_leader :
302306 self ._upgrade .reconcile_partition ()
303- if not self ._upgrade .in_progress :
304- self ._upgrade .set_versions_in_app_databag ()
305307 self .set_status (event = event )
306308 except server_exceptions .Error as e :
307309 # If not for `unit=False`, another `server_exceptions.Error` could be thrown here
You can’t perform that action at this time.
0 commit comments