operator icon indicating copy to clipboard operation
operator copied to clipboard

Remove legacy code that sets up event symlinks

Open benhoyt opened this issue 1 year ago • 2 comments

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.

benhoyt avatar Aug 20 '24 23:08 benhoyt

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.

jameinel avatar Aug 21 '24 12:08 jameinel

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

dimaqq avatar Aug 26 '24 05:08 dimaqq

@dwilding still planning to do this this cycle.

benhoyt avatar Mar 25 '25 01:03 benhoyt