[PATCH 2/3] ci: Remove tag dependency for build-previous-qemu

peterx@redhat.com posted 3 patches 9 months, 3 weeks ago
Maintainers: "Alex Bennée" <alex.bennee@linaro.org>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Thomas Huth <thuth@redhat.com>, Wainer dos Santos Moschetta <wainersm@redhat.com>, Beraldo Leal <bleal@redhat.com>, Peter Xu <peterx@redhat.com>, Fabiano Rosas <farosas@suse.de>, Laurent Vivier <lvivier@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>
There is a newer version of this series
[PATCH 2/3] ci: Remove tag dependency for build-previous-qemu
Posted by peterx@redhat.com 9 months, 3 weeks ago
From: Peter Xu <peterx@redhat.com>

The new build-previous-qemu job relies on QEMU release tag being present,
while that may not be always true for personal git repositories since by
default tag is not pushed.  The job can fail on those CI kicks, as reported
by Peter Maydell.

Fix it by fetching the tags remotely from the official repository, as
suggested by Dan.

[1] https://lore.kernel.org/r/ZcC9ScKJ7VvqektA@redhat.com

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
---
 .gitlab-ci.d/buildtest.yml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml
index 79bbc8585b..df48c9d31d 100644
--- a/.gitlab-ci.d/buildtest.yml
+++ b/.gitlab-ci.d/buildtest.yml
@@ -189,6 +189,8 @@ build-previous-qemu:
     TARGETS: x86_64-softmmu aarch64-softmmu
   before_script:
     - export QEMU_PREV_VERSION="$(sed 's/\([0-9.]*\)\.[0-9]*/v\1.0/' VERSION)"
+    - git remote add upstream https://gitlab.com/qemu-project/qemu
+    - git fetch upstream $QEMU_PRRV_VERSION
     - git checkout $QEMU_PREV_VERSION
   after_script:
     - mv build build-previous
-- 
2.43.0


Re: [PATCH 2/3] ci: Remove tag dependency for build-previous-qemu
Posted by Daniel P. Berrangé 9 months, 3 weeks ago
On Tue, Feb 06, 2024 at 02:31:50PM +0800, peterx@redhat.com wrote:
> From: Peter Xu <peterx@redhat.com>
> 
> The new build-previous-qemu job relies on QEMU release tag being present,
> while that may not be always true for personal git repositories since by
> default tag is not pushed.  The job can fail on those CI kicks, as reported
> by Peter Maydell.
> 
> Fix it by fetching the tags remotely from the official repository, as
> suggested by Dan.
> 
> [1] https://lore.kernel.org/r/ZcC9ScKJ7VvqektA@redhat.com
> 
> Reported-by: Peter Maydell <peter.maydell@linaro.org>
> Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
> Signed-off-by: Peter Xu <peterx@redhat.com>
> ---
>  .gitlab-ci.d/buildtest.yml | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml
> index 79bbc8585b..df48c9d31d 100644
> --- a/.gitlab-ci.d/buildtest.yml
> +++ b/.gitlab-ci.d/buildtest.yml
> @@ -189,6 +189,8 @@ build-previous-qemu:
>      TARGETS: x86_64-softmmu aarch64-softmmu
>    before_script:
>      - export QEMU_PREV_VERSION="$(sed 's/\([0-9.]*\)\.[0-9]*/v\1.0/' VERSION)"
> +    - git remote add upstream https://gitlab.com/qemu-project/qemu
> +    - git fetch upstream $QEMU_PRRV_VERSION

                              Typo^^^

>      - git checkout $QEMU_PREV_VERSION
>    after_script:
>      - mv build build-previous

With that typo fixed, then

  Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>

With 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 2/3] ci: Remove tag dependency for build-previous-qemu
Posted by Peter Xu 9 months, 3 weeks ago
On Tue, Feb 06, 2024 at 08:11:58AM +0000, Daniel P. Berrangé wrote:
> On Tue, Feb 06, 2024 at 02:31:50PM +0800, peterx@redhat.com wrote:
> > From: Peter Xu <peterx@redhat.com>
> > 
> > The new build-previous-qemu job relies on QEMU release tag being present,
> > while that may not be always true for personal git repositories since by
> > default tag is not pushed.  The job can fail on those CI kicks, as reported
> > by Peter Maydell.
> > 
> > Fix it by fetching the tags remotely from the official repository, as
> > suggested by Dan.
> > 
> > [1] https://lore.kernel.org/r/ZcC9ScKJ7VvqektA@redhat.com
> > 
> > Reported-by: Peter Maydell <peter.maydell@linaro.org>
> > Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
> > Signed-off-by: Peter Xu <peterx@redhat.com>
> > ---
> >  .gitlab-ci.d/buildtest.yml | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml
> > index 79bbc8585b..df48c9d31d 100644
> > --- a/.gitlab-ci.d/buildtest.yml
> > +++ b/.gitlab-ci.d/buildtest.yml
> > @@ -189,6 +189,8 @@ build-previous-qemu:
> >      TARGETS: x86_64-softmmu aarch64-softmmu
> >    before_script:
> >      - export QEMU_PREV_VERSION="$(sed 's/\([0-9.]*\)\.[0-9]*/v\1.0/' VERSION)"
> > +    - git remote add upstream https://gitlab.com/qemu-project/qemu
> > +    - git fetch upstream $QEMU_PRRV_VERSION
> 
>                               Typo^^^

Interestingly, this typo won't affect the function, as QEMU_PRRV_VERSION
will be an empty string, and this cmd will simply pull in all the tags..

After the fix, it should only fetch the tag that we need.

> 
> >      - git checkout $QEMU_PREV_VERSION
> >    after_script:
> >      - mv build build-previous
> 
> With that typo fixed, then
> 
>   Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>

Thanks.

-- 
Peter Xu