[] and None are both falsey in Python. When the final unit had been popped from the list, we would attempt to set that empty list to relation data by referencing the property. The property checks for if not X: fetch, getting the un-popped value from the relation data
When we recursed on the leader, we'd get recursion limit errors, as it would never exit due to it just re-setting the original stack
Fixed by specifically checking for if self._upgrade_stack is None
fix: actually set default idle state on relation created
When unset, we'd handle relation events before upgrades had progressed
Changes Made
fix: avoid recursion limit errors on leader
[]
andNone
are both falsey in Python. When the final unit had been popped from the list, we would attempt to set that empty list to relation data by referencing the property. The property checks forif not X: fetch
, getting the un-popped value from the relation dataif self._upgrade_stack is None
fix: actually set default idle state on relation created
idle
and exit