Open benhoyt opened 3 weeks ago
Correct. Ops added setup event symlinks so that if it was invoked with 2.7 it would see an install
hook and set up the rest of the symlinks. New versions of charmcraft are going to stop creating hooks/install, so everything will have to go via dispatch
, but 2.7 has been out of support for a while.
There's also this on the code path:
# When a charm is force-upgraded and a unit is in an error state Juju
# does not run upgrade-charm and instead runs the failed hook followed
# by config-changed. Given the nature of force-upgrading the hook setup
# code is not triggered on config-changed.
#
# 'start' event is included as Juju does not fire the install event for
# K8s charms (see LP: #1854635).
The referenced ticket, https://bugs.launchpad.net/juju/+bug/1854635
Is stamped as resolved in Juju 2.7.6 and 2.8.0
Per discussion with @jameinel, these haven't been needed since
JUJU_DISPATCH_PATH
was invented, since about Juju 2.7. Let's get rid of the code in main.py.