Charm hooks to be called "upgrade" and "config"

Bug #1566684 reported by Mark Shuttleworth
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Low
Unassigned

Bug Description

For Juju 2.0 I would ask that we support charms which use a slightly different schema for hook names:

 * "upgrade" instead of "upgrade-charm"
 * "config" instead of "config-changed"

Happy to discuss the rationale for the original naming or the new naming. We should use the min-juju-version of course to ensure that these charms don't b0rk on older juju.

Changed in juju-core:
status: New → Triaged
importance: Undecided → High
milestone: none → 2.0-beta4
Revision history for this message
Marco Ceppi (marcoceppi) wrote :

I fear this might break forward compatibility for charms that still have upgrade-charm and config-changed hooks. Could this be amended to have the following logic instead?

Juju 2.0 Upgrade sequence:
 - Look for upgrade hook, if fail
 - Look for upgrade-charm, if fail
 - Skip

Juju 2.0 Configure sequence:
 - Look for config hook, if fail
 - Look for config-changed, if fail
 - Skip

This way charms developed with <=1.25 will still work in 2.0 since we don't have a max-juju-version field

Also, nitpick, since we're renaming things, `configure` seems more complete than `config` but that's just the color of the shed I'd prefer.

Revision history for this message
Dean Henrichsmeyer (dean) wrote :

I just want to point out that there will be a substantial cost for existing consumers of Juju to pay if this actually happens and we're already asking a lot of them with 2.0.

Revision history for this message
Richard Harding (rharding) wrote :

The bug states that we'll allow the new names. I see this as a completely forward compatible addition to Juju that we can apply.

As Marco notes, it'd be a check, first for this new hook and if not found fall back to the upgrade-charm hook.

Juju 2.0 is getting frozen and the 2.0 release cut in the next 2 days for Xenial. We do not have the resources to make this change in the next 48hrs, however, I would like oi discuss the goal and when we want to have the charm that can utilize this in place and make sure that we add this as a point release to Juju 2.0 soon after it's released.

We know we'll have a minimun of two of those in the coming months and so I think we can align this with those very easily.

Changed in juju-core:
milestone: 2.0-beta4 → 2.0.1
Revision history for this message
Adam Collard (adam-collard) wrote :

Can I humbly suggest that such a change would be too much of an impact for a point release? At the very least it should be a minor version bump IMHO.

Revision history for this message
Mark Shuttleworth (sabdfl) wrote : Re: [Bug 1566684] Re: Charm hooks to be called "upgrade" and "config"

Thanks Marco, I did intend for it to be easily forward-compatible, with
symlinks, unless min-juju-version is used.

Mark

affects: juju-core → juju
Changed in juju:
milestone: 2.0.1 → none
milestone: none → 2.0.1
Curtis Hovey (sinzui)
Changed in juju:
milestone: 2.0.1 → none
tags: added: charm hook upgrade-charm
Revision history for this message
Canonical Juju QA Bot (juju-qa-bot) wrote :

This bug has not been updated in 2 years, so we're marking it Low importance. If you believe this is incorrect, please update the importance.

Changed in juju:
importance: High → Low
tags: added: expirebugs-bot
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.