Merge lp:~jamesodhunt/snappy/log-commands-that-change-system-state into lp:~snappy-dev/snappy/snappy-moved-to-github
Status: | Work in progress |
---|---|
Proposed branch: | lp:~jamesodhunt/snappy/log-commands-that-change-system-state |
Merge into: | lp:~snappy-dev/snappy/snappy-moved-to-github |
Diff against target: |
351 lines (+120/-9) 12 files modified
cmd/snappy-go/cmd_booted.go (+12/-1) cmd/snappy-go/cmd_hwassign.go (+8/-1) cmd/snappy-go/cmd_hwunassign.go (+8/-1) cmd/snappy-go/cmd_rollback.go (+8/-1) cmd/snappy-go/cmd_update.go (+4/-0) partition/partition.go (+16/-0) partition/partition_test.go (+3/-0) snappy/click.go (+4/-0) snappy/install.go (+9/-1) snappy/snapp.go (+9/-1) snappy/systemimage.go (+31/-3) snappy/systemimage_test.go (+8/-0) |
To merge this branch: | bzr merge lp:~jamesodhunt/snappy/log-commands-that-change-system-state |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
John Lenton (community) | Disapprove | ||
Michael Vogt (community) | Needs Information | ||
Sergio Schvezov | Pending | ||
Review via email: mp+254405@code.launchpad.net |
Description of the change
* Added logging calls for commands that modify the system state.
* partition/
- Added RootfsLabel() and OtherRootfsLabel() implementations to enable
rich log messages.
* Upated tests for new functions.
This branch was rather awkward given the way we handle clicks and s-i parts differently. I've tried to keep the log calls as "high up" in the calling stack as possible, but on occasion you'll see that I had to dive down a little lower than desired to fit in with the current code structure.
Note too that there is a small amount of duplication in the logging output:
a) Installing and then removing a snap gives the following:
INFO:snappy:
INFO:snappy:
INFO:snappy:
Which of the 2 "Installed" message do we want to keep?
b) s-i parts:
INFO:snappy:
INFO:snappy:
INFO:snappy:
I wonder if we could retain all the s-i messages since:
a) An installed message should be provided for all parts.
b) The other 2 Updated messages are useful as they provide details of the partition (essential IMHO).
Unmerged revisions
- 268. By James Hunt
-
* Sync with lp:snappy.
- 267. By James Hunt
-
* Added logging calls for commands that modify the system state.
* partition/partition. go:
- Added RootfsLabel() and OtherRootfsLabel() implementations to enable
rich log messages.
* Upated tests for new functions.
I don't have answers to your questions (is an MP the right place to ask the questions? are you really asking, or is it your way of exploring future work?). But the branch looks good.