Code review comment for ~chad.smith/cloud-init:cyaml-loading

Scott Moser (smoser) wrote :

On Fri, 5 May 2017, Ryan Harper wrote:

> > Best case, i think the amount of yaml that cloud-init loads is probably
> > small enough to look like noise here.
> >
> Ideally we'll generate some actual numbers here; if it's not worth it, then
> we can dump the whole thing. If it is, ideally we'd have
> a path through both w.r.t tox/unittesting; I can't say that it's
> over-engineering to want to exercise both paths we might expect
> cloud-init users might execute.

There are literally hundreds of different paths that software under
cloud-init might take based on some condition. We should have reasonable
code coverage on code we write, but we can't possibly excercise all
possible paths of code underneith us.

As an example, consider the affect on code path through common libraries
based on locale. Should cloud-init run unit tests with multiple different
locales? If that is a non-trivial operation in development time or in
runtime, should we still do that?

It is quite reasonable that pyyaml project should test their coverage of
CLoader and the python path. It is also quite reasonable that cloud-init
assume that path function as it is expected to when it is available.

« Back to merge proposal