Charm hooks to be called "upgrade" and "config"
Bug #1566684 reported by
Mark Shuttleworth
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 |
Changed in juju-core: | |
milestone: | 2.0-beta4 → 2.0.1 |
affects: | juju-core → juju |
Changed in juju: | |
milestone: | 2.0.1 → none |
milestone: | none → 2.0.1 |
Changed in juju: | |
milestone: | 2.0.1 → none |
tags: | added: charm hook upgrade-charm |
To post a comment you must log in.
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.