vdsm_pep8_gerrit is broken

Kiril Nesenko knesenko at redhat.com
Wed Dec 25 06:54:49 UTC 2013



----- Original Message -----
> From: "Dan Kenigsberg" <danken at redhat.com>
> To: "Nir Soffer" <nsoffer at redhat.com>
> Cc: "Kiril Nesenko" <knesenko at redhat.com>, infra at 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 at redhat.com>
> > > To: "Nir Soffer" <nsoffer at redhat.com>
> > > Cc: infra at 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 at redhat.com>
> > > > To: infra at 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.
> 



More information about the Infra mailing list