From: "Dan Kenigsberg" <danken(a)redhat.com>
To: "Nir Soffer" <nsoffer(a)redhat.com>
Cc: "Kiril Nesenko" <knesenko(a)redhat.com>, infra(a)ovirt.org
Sent: Wednesday, December 25, 2013 12:31:00 AM
Subject: Re: vdsm_pep8_gerrit is broken
On Tue, Dec 24, 2013 at 04:47:07PM -0500, Nir Soffer wrote:
> ----- Original Message -----
> > From: "Kiril Nesenko" <knesenko(a)redhat.com>
> > To: "Nir Soffer" <nsoffer(a)redhat.com>
> > Cc: infra(a)ovirt.org
> > Sent: Tuesday, December 24, 2013 11:33:24 PM
> > Subject: Re: vdsm_pep8_gerrit is broken
> >
> > What pep8 version are you using ?
>
> We use
http://danken.fedorapeople.org/python-pep8-1.4.5-2.el6.noarch.rpm
>
> You can check what we use here:
>
http://www.ovirt.org/Vdsm_Developers#Installing_required_packages
>
> > ----- Original Message -----
> > > From: "Nir Soffer" <nsoffer(a)redhat.com>
> > > To: infra(a)ovirt.org
> > > Sent: Tuesday, December 24, 2013 11:27:54 PM
> > > Subject: vdsm_pep8_gerrit is broken
> > >
> > > Hi infra,
> > >
> > > I added a patch [1], breaking pep8 intentionally - it is passed the
> > > pep8
> > > job
> > > [2]
> > >
> > > [1]
http://gerrit.ovirt.org/22724
> > > [2]
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/6260/
> > >
> > > This explains why lately jenkins was rather liberal.
Kiril, could you remind me where the code for the Jenkins jobs can be
seen? Does it have it's own gerrit repo? I'd like vdsm_pep8_gerrit to
call `pep8 --version`.
Currently the code is just inside the job. I assume it should be better to move into our
jenkins git repo.
Here is the code:
rm -f ${WORKSPACE}/violations.txt
pushd $WORKSPACE/vdsm
git diff HEAD~ `git ls-files | grep "\\.py$\|\\.py\\.in$"` | pep8 --diff | sed
's/^.\/*//' > ${WORKSPACE}/violations.txt
if [[ ${PIPESTATUS[1]} -ne 0 ]]; then
echo "PEP8 Failed"
else
echo "PEP8 is ok"
fi
- Kiril
Nir, I suspect that `pep --diff` simply ignores changes in files lacking
the *py suffix.