<div dir="ltr">I am gonna add more color to this story by posting my replies on review [1]:<div><br></div><div><p style="margin-top:0px;margin-bottom:0px;padding-top:0.5em;padding-bottom:0.5em;color:rgb(0,0,0);font-family:sans-serif">
Hi Angus,</p><p style="margin-top:0px;margin-bottom:0px;padding-top:0.5em;padding-bottom:0.5em;color:rgb(0,0,0);font-family:sans-serif">You touched on a number of points. Let me try to give you an answer to all of them.</p>
<p style="margin-top:0px;margin-bottom:0px;padding-top:0.5em;padding-bottom:0.5em;color:rgb(0,0,0);font-family:sans-serif">>> (I'll create a bug report too. I still haven't worked out which class of changes need an accompanying bug report and which don't.)</p>
<p style="margin-top:0px;margin-bottom:0px;padding-top:0.5em;padding-bottom:0.5em;color:rgb(0,0,0);font-family:sans-serif">The long story can be read below:</p><p style="margin-top:0px;margin-bottom:0px;padding-top:0.5em;padding-bottom:0.5em;color:rgb(0,0,0);font-family:sans-serif">
<a href="https://wiki.openstack.org/wiki/BugFilingRecommendations" target="_blank" style="text-decoration:none;color:rgb(6,84,172)">https://wiki.openstack.org/wiki/BugFilingRecommendations</a></p><p style="margin-top:0px;margin-bottom:0px;padding-top:0.5em;padding-bottom:0.5em;color:rgb(0,0,0);font-family:sans-serif">
<a href="https://wiki.openstack.org/wiki/GitCommitMessages" target="_blank" style="text-decoration:none;color:rgb(6,84,172)">https://wiki.openstack.org/wiki/GitCommitMessages</a></p><p style="margin-top:0px;margin-bottom:0px;padding-top:0.5em;padding-bottom:0.5em;color:rgb(0,0,0);font-family:sans-serif">
IMO, there's a grey area for some of the issues you found, but when I am faced with a bug, I tend to answer myself? Would a bug report be useful to someone else? The author of the code? A consumer of the code? Not everyone follow the core review system all the time, whereas Launchpad is pretty much the tool everyone uses to stay abreast with the OpenStack release cycle. Obviously if you're fixing a grammar nit, or filing a cosmetic change that has no functional impact then I warrant the lack of a test, but in this case you're fixing a genuine error: let's say we want to backport this to icehouse, how else would we make the release manager of that? He/she is looking at Launchpad.</p>
<p style="margin-top:0px;margin-bottom:0px;padding-top:0.5em;padding-bottom:0.5em;color:rgb(0,0,0);font-family:sans-serif">>> I can add a unittest for this particular code path, but it would only check this particular short segment of code, would need to be maintained as the code changes, and wouldn't catch another occurrence somewhere else. This seems an unsatisfying return on the additional work :(</p>
<p style="margin-top:0px;margin-bottom:0px;padding-top:0.5em;padding-bottom:0.5em;color:rgb(0,0,0);font-family:sans-serif">You're looking at this from the wrong perspective. This is not about ensuring that other code paths are valid, but that this code path stays valid over time, ensuring that the code path is exercised and that no other regression of any kind creep in. The reason why this error was introduced in the first place is because the code wasn't tested when it should have. If you don't get that this mechanical effort of fixing errors by static analysis is kind of ineffective, which leads me to the last point....</p>
<p style="margin-top:0px;margin-bottom:0px;padding-top:0.5em;padding-bottom:0.5em;color:rgb(0,0,0);font-family:sans-serif">>> I actually found this via static analysis using pylint - and my question is: should I create some sort of pylint unittest that tries to catch this class of problem across the entire codebase? [...]</p>
<p style="margin-top:0px;margin-bottom:0px;padding-top:0.5em;padding-bottom:0.5em;color:rgb(0,0,0);font-family:sans-serif">I value what you're doing, however I would see even more value if we prevented these types of errors from occurring in the first place via automation. You run pylint today, but what about tomorrow, or a week from now? Are you gonna be filing pylint fixes for ever? We might be better off automating the check and catch these types of errors before they land in the tree. This means that the work you are doing it two-pronged: a) automate the detection of some failures by hooking this into tox.ini via HACKING/pep8 or equivalent mechanism and b) file all the fixes that require these validation tests to pass; c) everyone is happy, or at least they should be.</p>
<p style="margin-top:0px;margin-bottom:0px;padding-top:0.5em;padding-bottom:0.5em;color:rgb(0,0,0);font-family:sans-serif">I'd welcome to explore a better strategy to ensure a better quality of the code base, without some degree of automation, nothing will stop these conversation from happening again.</p>
<p style="margin-top:0px;margin-bottom:0px;padding-top:0.5em;padding-bottom:0.5em;color:rgb(0,0,0);font-family:sans-serif">Cheers,</p><p style="margin-top:0px;margin-bottom:0px;padding-top:0.5em;padding-bottom:0.5em;color:rgb(0,0,0);font-family:sans-serif">
Armando</p><p style="margin-top:0px;margin-bottom:0px;padding-top:0.5em;padding-bottom:0.5em;color:rgb(0,0,0);font-family:sans-serif">[1] <a href="https://review.openstack.org/#/c/113777/">https://review.openstack.org/#/c/113777/</a><br>
</p></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 13 August 2014 03:02, Ihar Hrachyshka <span dir="ltr"><<a href="mailto:ihrachys@redhat.com" target="_blank">ihrachys@redhat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA512<br>
<div class=""><br>
On 13/08/14 09:28, Angus Lees wrote:<br>
> I'm doing various small cleanup changes as I explore the neutron<br>
> codebase. Some of these cleanups are to fix actual bugs discovered<br>
> in the code. Almost all of them are tiny and "obviously correct".<br>
><br>
> A recurring reviewer comment is that the change should have had an<br>
> accompanying bug report and that they would rather that change was<br>
> not submitted without one (or at least, they've -1'ed my change).<br>
><br>
> I often didn't discover these issues by encountering an actual<br>
> production issue so I'm unsure what to include in the bug report<br>
> other than basically a copy of the change description. I also<br>
> haven't worked out the pattern yet of which changes should have a<br>
> bug and which don't need one.<br>
><br>
> There's a section describing blueprints in NeutronDevelopment but<br>
> nothing on bugs. It would be great if someone who understands the<br>
> nuances here could add some words on when to file bugs: Which type<br>
> of changes should have accompanying bug reports? What is the<br>
> purpose of that bug, and what should it contain?<br>
><br>
<br>
</div>It was discussed before at:<br>
<a href="http://lists.openstack.org/pipermail/openstack-dev/2014-May/035789.html" target="_blank">http://lists.openstack.org/pipermail/openstack-dev/2014-May/035789.html</a><br>
<br>
/Ihar<br>
-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG/MacGPG2 v2.0.22 (Darwin)<br>
<br>
iQEcBAEBCgAGBQJT6zfOAAoJEC5aWaUY1u570wQIAMpoXIK/p5invp+GW0aMMUK0<br>
C/MR6WIJ83e6e2tOVUrxheK6bncVvidOI4EWGW1xzP1sg9q+8Hs1TNyKHXhJAb+I<br>
c435MMHWsDwj6p1OeDxHnSOVMthcGH96sgRa1+CIk6+oktDF3IMmiOPRkxdpqWCZ<br>
7TkV75mryehrTNwAkVPfpWG3OhWO44d5lLnJFCIMCuOw2NHzyLIOoGQAlWNQpy4V<br>
a869s00WO37GEed6A5Zizc9K/05/6kpDIQVim37tw91JcZ69VelUlZ1THx+RTd33<br>
92r87APm3fC/LioKN3fq1UUo2c94Vzl3gYPFVl8ZateQNMKB7ONMBePOfWR9H1k=<br>
=wCJQ<br>
-----END PGP SIGNATURE-----<br>
<div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</div></div></blockquote></div><br></div>