DescriptionMake imagemetadata easier to debug.
I'm losing a lot of time to debugging imagemetadata/simplestreams interaction for the Azure provider, and the format for Azure's simplestreams entries is changing. (There was an irregularity in the format that stopped imagemetadata from finding any matches at all for Azure). The usual failure mode is simply that no images are found, which gives me very little information to work with.
To make all this a little easier, I added debug logging (yes, using loggo) to suspicious results. Some of the code had to be restructured a bit to make suspicious conditions more explicit, where previously they were implicit outcomes of complex loops. The loops were really "extract; filter; process" sequences. Much simpler than the code looked. Loop fission brought this out nicely, and also made suspicious results come out more obviously in the code. Some of the error strings came out a little bit more specific as well.
I touched the imports on the test. I grouped them in the new way. But if you're going to ask me to rename the gocheck import to "gc," then please be patient until I have two reviews! It wouldn't be polite to pollute the diff like that for the next reviewer, and it might lead to conflicts while waiting for the second review.
https://code.launchpad.net/~jtv/juju-core/imagemetadata-debug-logging/+merge/179141
(do not edit description out of merge proposal)
Patch Set 1 #
Total comments: 12
MessagesTotal messages: 5
|