[PATCH 0/3] gitlab: add jobs for checking paches

Daniel P. Berrangé posted 3 patches 3 years, 6 months ago
Test docker-quick@centos7 failed
Test docker-mingw@fedora failed
Test checkpatch failed
Test FreeBSD failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200918132903.1848939-1-berrange@redhat.com
.gitlab-ci.d/check-dco.py   | 94 +++++++++++++++++++++++++++++++++++++
.gitlab-ci.d/check-patch.py | 48 +++++++++++++++++++
.gitlab-ci.yml              | 22 +++++++++
MAINTAINERS                 |  1 +
4 files changed, 165 insertions(+)
create mode 100755 .gitlab-ci.d/check-dco.py
create mode 100755 .gitlab-ci.d/check-patch.py
[PATCH 0/3] gitlab: add jobs for checking paches
Posted by Daniel P. Berrangé 3 years, 6 months ago
This introduces two new jobs to GitLab. The first runs "checkpatch.pl"
across all patches, while the second is a dedicated DCO signoff check.

While checkpatch.pl does validate DCO signoff, it is sub-optimal as we
need to allow the checkpatch.pl job to fail as there are always patches
which intentionally violate some rules, and we've no mechanism for marking
permitted exceptions in code. Thus the checkpatch.pl jobs needs to be
non-fatal allowing failure.

By having a separate DCO job, we can make that particular job mandatory.

Checking patches themselves in GitLab CI is a little difficult, as the
CI job receives no indication of what the base ancestor was for the
branch being tested. To work around this, we add the master QEMU git
repo as a new remote and ask git to find the common ancestor vs the
branch being tested.

An example pipeline showing failure of these two jobs is here:

  https://gitlab.com/berrange/qemu/-/pipelines/191219666

The checkpatch.pl job failure output:

  https://gitlab.com/berrange/qemu/-/jobs/743439455

And the DCO signoff job failure output:

  https://gitlab.com/berrange/qemu/-/jobs/743439456

I think the latter shows the benefit of having a dedicated DCO signoff
job checker, as the info presented to the user is much clearer about
what they did wrong and how & why they must address it.

_+#          base:  master

Daniel P. Berrangé (3):
  gitlab: add a CI job for running checkpatch.pl
  gitlab: add a CI job to validate the DCO sign off
  gitlab: assign python helper files to GitLab maintainers section

 .gitlab-ci.d/check-dco.py   | 94 +++++++++++++++++++++++++++++++++++++
 .gitlab-ci.d/check-patch.py | 48 +++++++++++++++++++
 .gitlab-ci.yml              | 22 +++++++++
 MAINTAINERS                 |  1 +
 4 files changed, 165 insertions(+)
 create mode 100755 .gitlab-ci.d/check-dco.py
 create mode 100755 .gitlab-ci.d/check-patch.py

-- 
2.26.2



Re: [PATCH 0/3] gitlab: add jobs for checking paches
Posted by no-reply@patchew.org 3 years, 6 months ago
Patchew URL: https://patchew.org/QEMU/20200918132903.1848939-1-berrange@redhat.com/



Hi,

This series failed build test on FreeBSD host. Please find the details below.






The full log is available at
http://patchew.org/logs/20200918132903.1848939-1-berrange@redhat.com/testing.FreeBSD/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
Re: [PATCH 0/3] gitlab: add jobs for checking paches
Posted by no-reply@patchew.org 3 years, 6 months ago
Patchew URL: https://patchew.org/QEMU/20200918132903.1848939-1-berrange@redhat.com/



Hi,

This series failed build test on FreeBSD host. Please find the details below.






The full log is available at
http://patchew.org/logs/20200918132903.1848939-1-berrange@redhat.com/testing.FreeBSD/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
Re: [PATCH 0/3] gitlab: add jobs for checking paches
Posted by Thomas Huth 3 years, 6 months ago
On 18/09/2020 15.29, Daniel P. Berrangé wrote:
> This introduces two new jobs to GitLab. The first runs "checkpatch.pl"
> across all patches, while the second is a dedicated DCO signoff check.

This feels quite redundant since we're checking the patches with Patchew
already ... or are there plans to get rid of this check in Patchew?

 Thomas


Re: [PATCH 0/3] gitlab: add jobs for checking paches
Posted by Philippe Mathieu-Daudé 3 years, 6 months ago
On 9/18/20 4:07 PM, Thomas Huth wrote:
> On 18/09/2020 15.29, Daniel P. Berrangé wrote:
>> This introduces two new jobs to GitLab. The first runs "checkpatch.pl"
>> across all patches, while the second is a dedicated DCO signoff check.
> 
> This feels quite redundant since we're checking the patches with Patchew
> already ... or are there plans to get rid of this check in Patchew?

The plan is to use GitLab-CI gating :)

Also this free patchew community resources and use the user's
resources instead. From a patchew sysadmin PoV this is a win
IMO.

> 
>  Thomas
> 


Re: [PATCH 0/3] gitlab: add jobs for checking paches
Posted by Daniel P. Berrangé 3 years, 6 months ago
On Fri, Sep 18, 2020 at 04:07:22PM +0200, Thomas Huth wrote:
> On 18/09/2020 15.29, Daniel P. Berrangé wrote:
> > This introduces two new jobs to GitLab. The first runs "checkpatch.pl"
> > across all patches, while the second is a dedicated DCO signoff check.
> 
> This feels quite redundant since we're checking the patches with Patchew
> already ... or are there plans to get rid of this check in Patchew?

patchew only runs once the contributor has sent their patches to the
mailing list, whci his too late.

We want contributors to test their series in GitLab CI ahead of sending
it, so that patchew never has to report any failure, because the code is
already perfect once on the list (except if git master has moved and
causes conflicts of course).

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|


Re: [PATCH 0/3] gitlab: add jobs for checking paches
Posted by 罗勇刚 (Yonggang Luo) 3 years, 6 months ago
On Fri, Sep 18, 2020 at 10:16 PM Daniel P. Berrangé <berrange@redhat.com>
wrote:
>
> On Fri, Sep 18, 2020 at 04:07:22PM +0200, Thomas Huth wrote:
> > On 18/09/2020 15.29, Daniel P. Berrangé wrote:
> > > This introduces two new jobs to GitLab. The first runs "checkpatch.pl"
> > > across all patches, while the second is a dedicated DCO signoff check.
> >
> > This feels quite redundant since we're checking the patches with Patchew
> > already ... or are there plans to get rid of this check in Patchew?
>
> patchew only runs once the contributor has sent their patches to the
> mailing list, whci his too late.
>
> We want contributors to test their series in GitLab CI ahead of sending
> it, so that patchew never has to report any failure, because the code is
> already perfect once on the list (except if git master has moved and
> causes conflicts of course).
>
> Regards,
> Daniel
> --
> |: https://berrange.com      -o-
https://www.flickr.com/photos/dberrange :|
> |: https://libvirt.org         -o-
https://fstop138.berrange.com :|
> |: https://entangle-photo.org    -o-
https://www.instagram.com/dberrange :|
>
>
agreed, and ineed patchew are broken now.

--
         此致
礼
罗勇刚
Yours
    sincerely,
Yonggang Luo
Re: [PATCH 0/3] gitlab: add jobs for checking paches
Posted by no-reply@patchew.org 3 years, 6 months ago
Patchew URL: https://patchew.org/QEMU/20200918132903.1848939-1-berrange@redhat.com/



Hi,

This series failed the docker-quick@centos7 build test. Please find the testing commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.






The full log is available at
http://patchew.org/logs/20200918132903.1848939-1-berrange@redhat.com/testing.docker-quick@centos7/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com