Activity log for bug #1586465

Date Who What changed Old value New value Message
2016-05-27 16:26:06 Kyle Fazzari bug added bug
2016-05-27 16:26:44 Kyle Fazzari bug task added snapcraft
2016-05-27 16:27:02 Kyle Fazzari bug task added click-reviewers-tools
2016-05-27 16:27:18 Kyle Fazzari snapd (Ubuntu): importance Undecided Wishlist
2016-05-27 16:27:20 Kyle Fazzari snapcraft: importance Undecided Wishlist
2016-05-27 16:27:53 Kyle Fazzari snapd (Ubuntu): assignee Kyle Fazzari (kyrofa)
2016-05-27 16:27:57 Kyle Fazzari snapd (Ubuntu): status New In Progress
2016-05-27 17:58:14 Kyle Fazzari description There are a number of situations where snapd needs to notify a snap that something has happened. For example, when a snap is upgraded, the snap may need to run some sort of migration on the previous version’s data in order to make it consumable by the new version. This is possible today, but it requires that the snap be smart enough to realize that it’s running on old data, and there’s no way for the snap to inform snapd that the upgrade failed. A new global section should be added to the `snap.yaml` (alongside `apps`), called "hooks." To continue with the example of an upgrade, such a section would look something like this: hooks: upgrade: # Actual name TBD plugs: [network] The name of the hook ("upgrade" in this example) directly corresponds to its purpose, and must be one of the yet-to-be-determined hooks supported by snapd. It also directly corresponds to the file name of the hook executable, which by convention is to be placed into the `meta/hooks/` directory within the snap. Similar to apps, the hooks may utilize plugs in order to extend their capabilities. They may be written in any language that is available to the snap. They will be called with no parameters-- if hooks need information from snapd it can be obtained via a yet-to-be-determined API call. If the hook returns a non-zero exit code the hook is considered to have failed, and snapd will take remedial action accordingly. The action taken depends on system choices made for the hook being run. Potential actions are retrying, or failure which would cause the whole change to be undone per existing semantics. There are a number of situations where snapd needs to notify a snap that something has happened. For example, when a snap is upgraded, the snap may need to run some sort of migration on the previous version’s data in order to make it consumable by the new version. This is possible today, but it requires that the snap be smart enough to realize that it’s running on old data, and there’s no way for the snap to inform snapd that the upgrade failed. A new global section should be added to the `snap.yaml` (alongside `apps`), called "hooks." To continue with the example of an upgrade, such a section would look something like this:     hooks:       upgrade: # Actual name TBD         plugs: [network] The name of the hook ("upgrade" in this example) directly corresponds to its purpose, and must be one of the yet-to-be-determined hooks supported by snapd. It also directly corresponds to the file name of the hook executable, which by convention is to be placed into the `meta/hooks/` directory within the snap. Similar to apps, the hooks may utilize plugs in order to extend their capabilities. Note that if the hook doesn't require any plugs, it doesn't need to be present in the YAML at all (i.e. its presence in `meta/hooks/` is enough for snapd to know it should be run). Hooks may be written in any language that is available to the snap. They will be called with no parameters-- if hooks need information from snapd it can be obtained via a yet-to-be-determined API call. If the hook returns a non-zero exit code the hook is considered to have failed, and snapd will take remedial action accordingly. The action taken depends on system choices made for the hook being run. Potential actions are retrying, or failure which would cause the whole change to be undone per existing semantics.
2016-06-22 21:59:40 Ted Gould bug added subscriber Ted Gould
2016-07-15 14:13:15 Alberto Mardegan bug added subscriber Alberto Mardegan
2016-07-25 09:25:01 Chen-Han Hsiao (Stanley) bug added subscriber Chen-Han Hsiao (Stanley)
2016-08-30 19:49:41 Kyle Fazzari snapd (Ubuntu): status In Progress Fix Committed
2016-09-27 18:56:33 Jamie Strandboge click-reviewers-tools: status New Fix Committed
2016-09-27 18:56:36 Jamie Strandboge click-reviewers-tools: assignee Jamie Strandboge (jdstrand)
2016-11-19 03:20:37 Kyle Fazzari snapcraft: status New In Progress
2016-12-21 18:27:28 Kyle Fazzari snapcraft: status In Progress Triaged
2017-01-05 02:15:18 Kyle Fazzari snapcraft: status Triaged In Progress
2017-01-05 02:15:22 Kyle Fazzari snapcraft: assignee Kyle Fazzari (kyrofa)
2017-01-05 23:23:18 Sergio Schvezov snapcraft: status In Progress Fix Committed
2017-01-05 23:23:21 Sergio Schvezov snapcraft: milestone next
2017-01-17 12:43:13 Sergio Schvezov snapcraft: status Fix Committed Fix Released
2017-01-27 07:57:26 Michael Vogt snapd (Ubuntu): status Fix Committed Fix Released
2017-09-11 17:45:41 Jamie Strandboge click-reviewers-tools: status Fix Committed Fix Released