From: Fabiano Rosas <farosas@suse.de>
To: Peter Xu <peterx@redhat.com>
Cc: qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [PATCH 2/3] ci: Fix build-previous-qemu when the version tag is absent
Date: Wed, 07 May 2025 16:39:19 -0300 [thread overview]
Message-ID: <87jz6sfbx4.fsf@suse.de> (raw)
In-Reply-To: <aBuvb1adcWnw3Jim@x1.local>
Peter Xu <peterx@redhat.com> writes:
> On Wed, May 07, 2025 at 12:58:34PM -0300, Fabiano Rosas wrote:
>> Stefan reports that during QEMU release, pushing a series with the
>> VERSION bump commit, but not pushing the new git tag in the same
>> command will cause a failure of the build-previous-qemu job at the git
>> fetch step.
>>
>> Since the job is intended to produce a build of the previous QEMU
>> version for consumption by the migration-compat-* jobs, there's no
>> reason to produce a build of the release commit because the migration
>> job would end up testing the release against itself.
>>
>> Skip the job when VERSION contains the newly release version number.
>>
>> I'm opting for 'exit 0' for both the build and the test jobs because
>> allow_failure would mask any real error in the jobs. It also avoids
>> having an orange ! on every release pipeline.
>>
>> Reported-by: Stefan Hajnoczi <stefanha@redhat.com>
>> Signed-off-by: Fabiano Rosas <farosas@suse.de>
>
> This is better than before for sure:
>
> Reviewed-by: Peter Xu <peterx@redhat.com>
>
> Though nitpicks below.
>
>> ---
>> .gitlab-ci.d/buildtest.yml | 8 +++++++-
>> 1 file changed, 7 insertions(+), 1 deletion(-)
>>
>> diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml
>> index ccf69fb8dd..159bdde2e8 100644
>> --- a/.gitlab-ci.d/buildtest.yml
>> +++ b/.gitlab-ci.d/buildtest.yml
>> @@ -203,6 +203,11 @@ build-previous-qemu:
>> GIT_FETCH_EXTRA_FLAGS: --prune --quiet
>> before_script:
>> - source scripts/ci/gitlab-ci-section
>> + # Skip if this series contains the release bump commit. During the
>> + # release process there might be a window of commits when the
>> + # version tag is not yet present in the remote and git fetch would
>> + # fail.
>> + - if grep -q "\.0$" VERSION; then exit 0; fi
>> - 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 refs/tags/$QEMU_PREV_VERSION:refs/tags/$QEMU_PREV_VERSION
>> @@ -226,7 +231,8 @@ build-previous-qemu:
>> # Use the migration-tests from the older QEMU tree. This avoids
>> # testing an old QEMU against new features/tests that it is not
>> # compatible with.
>> - - cd build-previous
>> + # Skip if build-previous-qemu has failed.
>
> This is inaccurate? As this job could only run if the dependent job
> succeeded IIUC (aka, exit 0 means success). Meanwhile..
>
>> + - cd build-previous || exit 0
>
> .. It'll be nice if we could still fail this job if something wrong
> happened in build-previous..
>
> Maybe it's clearer we check .0 here too? It's oneliner so we could dup it
> I guess.
Ok, let me respin...
> I wished the CI jobs can have nested "rules:"..
>
IIUC, we can't use rules because they're evaluated before the pipeline
starts, so the repo would not have been cloned yet.
>> # old to new
>> - QTEST_QEMU_BINARY_SRC=./qemu-system-${TARGET}
>> QTEST_QEMU_BINARY=../build/qemu-system-${TARGET} ./tests/qtest/migration-test
>> --
>> 2.35.3
>>
next prev parent reply other threads:[~2025-05-07 19:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-07 15:58 [PATCH 0/3] migration, ci: Tweaks to migration-compat jobs Fabiano Rosas
2025-05-07 15:58 ` [PATCH 1/3] ci: Re-enable python subtests in qtest migration suite Fabiano Rosas
2025-05-07 18:48 ` Peter Xu
2025-05-07 15:58 ` [PATCH 2/3] ci: Fix build-previous-qemu when the version tag is absent Fabiano Rosas
2025-05-07 19:07 ` Peter Xu
2025-05-07 19:39 ` Fabiano Rosas [this message]
2025-05-07 15:58 ` [PATCH 3/3] ci: Reduce the size of artifacts for build-previous-qemu Fabiano Rosas
2025-05-07 19:08 ` Peter Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87jz6sfbx4.fsf@suse.de \
--to=farosas@suse.de \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.