canonical / data-platform-libs

A collection of charm libraries curated by the Data Platform Team
https://charmhub.io/data-platform-libs
Apache License 2.0
9 stars 9 forks source link

clean exit when a unit not yet in the upgrade relation #88

Closed paulomach closed 11 months ago

paulomach commented 11 months ago

Issue

edge case: When refreshing from a charm version without upgrade support, on_upgrade_changed hook error if the top_stack unit has not yet joined the relation.

context: mysql need to be able to support upgrade from the current stable version (if possible) to minimize noise from users. Check PR301

marcoppenheimer commented 11 months ago

@paulomach - AFAIK, we weren't supporting upgrades for versions 'before' implementation of build_upgrade_stack. As (I'm assuming) we have to support it, aside from this PR, how are we getting the stack and state (necessary for the lib to work) in to relation data 'manually'?

I'm not sure this PR addresses that.

paulomach commented 11 months ago

@zmraul - yes, it's related to workaround to make upgrade work on non-upgrade enabled charms. And I can workaround on the charm side - closing this. @marcoppenheimer - we want to mitigate noise from current users of the stable channel.