Skip to content

Commit f9c2fdb

Browse files
Add comment about side effect from #231 (#235)
Ported from canonical/mysql-router-operator#138
1 parent 0318021 commit f9c2fdb

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/abstract_charm.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,13 @@ def reconcile(self, event=None) -> None: # noqa: C901
253253
if self._unit_lifecycle.authorized_leader and not self._upgrade.in_progress:
254254
# Run before checking `self._upgrade.is_compatible` in case incompatible upgrade was
255255
# forced & completed on all units.
256+
# Side effect: on machines, if charm was upgraded to a charm with the same snap
257+
# revision, compatibility checks will be skipped.
258+
# (The only real use case for this would be upgrading the charm code to an incompatible
259+
# version without upgrading the snap. In that situation, the upgrade may appear
260+
# successful and the user will not be notified of the charm incompatibility. This case
261+
# is much less likely than the forced incompatible upgrade & the impact is not as bad
262+
# as the impact if we did not handle the forced incompatible upgrade case.)
256263
self._upgrade.set_versions_in_app_databag()
257264
if self._upgrade.unit_state is upgrade.UnitState.RESTARTING: # Kubernetes only
258265
if not self._upgrade.is_compatible:

0 commit comments

Comments
 (0)