On Fri, Apr 21, 2017 at 4:05 PM Nir Soffer <nsoffer(a)redhat.com> wrote:
On Fri, Apr 21, 2017 at 1:28 PM Dan Kenigsberg
<danken(a)redhat.com> wrote:
> On Fri, Apr 21, 2017 at 1:04 PM, Nir Soffer <nsoffer(a)redhat.com> wrote:
> > On Fri, Apr 21, 2017 at 11:19 AM Dan Kenigsberg <danken(a)redhat.com>
> wrote:
> >>
> >> As we all know, Python is dynamically typed, which requires good
> >> coverage by unit tests.
> >>
> >> As we all know, Vdsm unit tests' coverage is not good.
> >>
> >> We need all the help we can get in order to avoid typos leading to
> >> bugs. Nir's `make pylint-diff` would give some.
> >
> >
> > We can take this patch now, since it does not break the build on errors.
> >
> > It is useful as is so people can run make pylint locally and fix their
> > errors.
> >
> >>
> >> In order to have it
> >> merged, I have posted
> >>
> >>
>
https://gerrit.ovirt.org/#/q/status:open+project:vdsm+branch:master+topic...
> >> to silence existing pylint errors. I hope I did not silence any
> >> serious ones; please review this topic as soon as possible.
> >
> >
> > Thanks for this great work!
> >
> > I think the last patch is too big, and there are some storage issues
> that we
> > can fix
> > now. Can you split by vertical? I would like to take over the the
> storage
> > part.
>
> Please do.
I splitted the patches to:
-
https://gerrit.ovirt.org/75728 pylint: brutally silence two
network-related errors
-
https://gerrit.ovirt.org/75730 pylint: Silence pylint errors in gluster
-
https://gerrit.ovirt.org/75748 pylint: Silence pylint errors in infra
-
https://gerrit.ovirt.org/75749 pylint: Silence pylint errors in virt
-
https://gerrit.ovirt.org/75750 pylint: Silence pylint errors in storage
The storage patch is replaced now by this topic:
https://gerrit.ovirt.org/#/q/topic:pylint-storage+is:open
pylint detected 3 real bugs:
-
https://gerrit.ovirt.org/75786 pylint: Fix AttributeError hiding the real
error
-
https://gerrit.ovirt.org/75787 pylint: Fix IscsiInterface.__getattr__
-
https://gerrit.ovirt.org/75791 pylint: Fix AttributeError when renaming
non-empty directory
This patch fixes infra issues, since it caused many pylint errors in storage
modules. This will also fix the errors in utils.py:
-
https://gerrit.ovirt.org/75792 pylint: Make utils.pidStat pylint friendly
One issue in sp.py cannot be improved now, so I silenced pylint errors:
-
https://gerrit.ovirt.org/75803 pylint: Silence warning about
__securityOverride
The rest of the patches fix the code to make pylint happy and usually make
the code
easier to understand.
Once we merge this, storage will be pylint clean.
Please review,
Nir
I'll handle the storage topic, hopefully Sahina, Piotr, Francesco and Edy
will
care for the others.
Particularly, please look at the true error introduced by
> I8e9bde2a0ad899ae56a18b4c7d6b405360d295f2 (there are two calls to
> _deleteImage missing the new discard value).
>
We know about this, the code calling these is not used for years. The real
fix is to remove the unused code. If we will not have time to remove the
code
I'll leave the pylint comments.
I hope Piotr and Francesco can take over theirs, as the time I had to
> invest in this is basically up (hence the gobbling of assorted fixes
> in one ugly patch).
>
> >
> > I sent this patch making the storage/monitor.py pylint clean:
> >
https://gerrit.ovirt.org/75736
> >
> > Nir
>