[libvirt PATCH] ci: move dco-check to a later stage

Ján Tomko posted 1 patch 3 years, 8 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/c22f29fe14735b45d6ac1dbf752ac70ca73ec1f4.1595929127.git.jtomko@redhat.com
.gitlab-ci.yml | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
[libvirt PATCH] ci: move dco-check to a later stage
Posted by Ján Tomko 3 years, 8 months ago
Be less hostile to developers and run the build jobs even
if the dco-check failed. That way they can test their own
"private" branches without a sign-off.

Also specify empty `needs` for it, since it does not depend
on any of the jobs in the container phase and can be run
right away.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
---
https://gitlab.com/jano.tomko/libvirt/-/pipelines/171532004

 .gitlab-ci.yml | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 702198ec8e..b7a1609580 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -2,7 +2,6 @@ variables:
   GIT_DEPTH: 100
 
 stages:
-  - sanity_checks
   - containers
   - builds
 
@@ -479,8 +478,15 @@ potfile:
 # Skip on "libvirt" namespace, since we only need to run
 # this test on developer's personal forks from which
 # merge requests are submitted
+#
+# Put it in the same stage as other tests we expect to fail
+# because of developer's changes as to not frustrate them
+# with partial feedback, but run it as soon as the pipeline
+# starts, since it does not have any `needs` from the previous
+# stages.
 check-dco:
-  stage: sanity_checks
+  stage: builds
+  needs: []
   image: registry.gitlab.com/libvirt/libvirt-ci/check-dco:master
   script:
     - /check-dco
-- 
2.26.2

Re: [libvirt PATCH] ci: move dco-check to a later stage
Posted by Daniel P. Berrangé 3 years, 8 months ago
On Tue, Jul 28, 2020 at 11:39:10AM +0200, Ján Tomko wrote:
> Be less hostile to developers and run the build jobs even
> if the dco-check failed. That way they can test their own
> "private" branches without a sign-off.
> 
> Also specify empty `needs` for it, since it does not depend
> on any of the jobs in the container phase and can be run
> right away.
> 
> Signed-off-by: Ján Tomko <jtomko@redhat.com>
> ---
> https://gitlab.com/jano.tomko/libvirt/-/pipelines/171532004
> 
>  .gitlab-ci.yml | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
> index 702198ec8e..b7a1609580 100644
> --- a/.gitlab-ci.yml
> +++ b/.gitlab-ci.yml
> @@ -2,7 +2,6 @@ variables:
>    GIT_DEPTH: 100
>  
>  stages:
> -  - sanity_checks
>    - containers
>    - builds

Don't get rid of the stage, just move it after builds.

>  
> @@ -479,8 +478,15 @@ potfile:
>  # Skip on "libvirt" namespace, since we only need to run
>  # this test on developer's personal forks from which
>  # merge requests are submitted
> +#
> +# Put it in the same stage as other tests we expect to fail
> +# because of developer's changes as to not frustrate them
> +# with partial feedback, but run it as soon as the pipeline
> +# starts, since it does not have any `needs` from the previous
> +# stages.
>  check-dco:
> -  stage: sanity_checks
> +  stage: builds
> +  needs: []
>    image: registry.gitlab.com/libvirt/libvirt-ci/check-dco:master
>    script:
>      - /check-dco

The 'needs' line will then just do the right thing and parallelize IIUC

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: [libvirt PATCH] ci: move dco-check to a later stage
Posted by Peter Krempa 3 years, 8 months ago
On Tue, Jul 28, 2020 at 11:39:10 +0200, Ján Tomko wrote:
> Be less hostile to developers and run the build jobs even
> if the dco-check failed. That way they can test their own
> "private" branches without a sign-off.
> 
> Also specify empty `needs` for it, since it does not depend
> on any of the jobs in the container phase and can be run
> right away.
> 
> Signed-off-by: Ján Tomko <jtomko@redhat.com>
> ---
> https://gitlab.com/jano.tomko/libvirt/-/pipelines/171532004

I very much welcome this change, since the sign-off is a useful hint if
some patches are incomplete. You still might want to have them compile
tested with the ci though.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>