migration, ci: Tweaks to migration-compat jobs
cover migration, ci: Tweaks to migration-compat jobs
A couple of cleanups to the migration jobs, plus a fix for an issue that may happen during the QEMU release.
Fabiano Rosas (3):
ci: Re-enable python subtests in qtest migration suite
ci: Fix build-previous-qemu when the version tag is absent
ci: Reduce the size of artifacts for build-previous-qemu
.gitlab-ci.d/buildtest.yml | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-)
Signature · 1 line
2.35.3
PATCH 1/3 ci: Re-enable python subtests in qtest migration suite
The migration compatibility tests have been running with the PYTHON variable unset to avoid running a broken test. The faulty test has since been removed, so we can enable the python tests once again.
Aside from the broken test, only one other test uses python and I have been running it locally ever since, so this commit should not expose any new bug.
--- .gitlab-ci.d/buildtest.yml | 8 -------- 1 file changed, 8 deletions(-)
.gitlab-ci.d/buildtest.yml +0 -8
@@ -227,14 +227,6 @@ build-previous-qemu: # testing an old QEMU against new features/tests that it is not # compatible with. - cd build-previous - # Don't allow python-based tests to run. The - # vmstate-checker-script test has a race that causes it to fail - # sometimes. It cannot be fixed it because this job runs the test - # from the old QEMU version. The test will be removed on master, - # but this job will only see the change in the next release. - # - # TODO: remove this line after 9.2 release - - unset PYTHON # old to new - QTEST_QEMU_BINARY_SRC=./qemu-system-${TARGET} QTEST_QEMU_BINARY=../build/qemu-system-${TARGET} ./tests/qtest/migration-test
Signature · 1 line
2.35.3
Re: [PATCH 1/3] ci: Re-enable python subtests in qtest migration suite
Quoted 9 lines · Fabiano Rosas
The migration compatibility tests have been running with the PYTHON variable unset to avoid running a broken test. The faulty test has since been removed, so we can enable the python tests once again.
Aside from the broken test, only one other test uses python and I have been running it locally ever since, so this commit should not expose any new bug.
Signed-off-by Fabiano Rosas <[email protected]>
Signature · 1 line
Peter Xu
PATCH 2/3 ci: Fix build-previous-qemu when the version tag is absent
In reply to Fabiano RosasStefan 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.
--- .gitlab-ci.d/buildtest.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
.gitlab-ci.d/buildtest.yml +7 -1
@@ -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. + - cd build-previous || exit 0 # old to new - QTEST_QEMU_BINARY_SRC=./qemu-system-${TARGET} QTEST_QEMU_BINARY=../build/qemu-system-${TARGET} ./tests/qtest/migration-test
Signature · 1 line
2.35.3
Re: [PATCH 2/3] ci: Fix build-previous-qemu when the version tag is absent
Quoted 10 lines · Fabiano Rosas
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.
Quoted 8 lines
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_failurewould mask any real error in the jobs. It also avoids having an orange ! on every release pipeline.Reported-by Stefan Hajnoczi <[email protected]>Signed-off-by Fabiano Rosas <[email protected]>
This is better than before for sure:
Though nitpicks below.
Quoted 21 lines
--- .gitlab-ci.d/buildtest.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-).gitlab-ci.d/buildtest.yml +5
-0@@ -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
.gitlab-ci.d/buildtest.yml build-previous-qemu: · line 234
Quoted 5 lines
.gitlab-ci.d/buildtest.yml +1
-1@@ -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..
.gitlab-ci.d/buildtest.yml build-previous-qemu: · line 235
Quoted 1 line
.gitlab-ci.d/buildtest.yml +1
-0+ - 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. I wished the CI jobs can have nested "rules:"..
Quoted 6 lines
.gitlab-ci.d/buildtest.yml +0
-0# old to new - QTEST_QEMU_BINARY_SRC=./qemu-system-${TARGET} QTEST_QEMU_BINARY=../build/qemu-system-${TARGET} ./tests/qtest/migration-testSignature · 1 line
2.35.3
Signature · 1 line
Peter Xu
Re: [PATCH 2/3] ci: Fix build-previous-qemu when the version tag is absent
Quoted 56 lines · Peter Xu
Quoted 10 lines · Fabiano Rosas
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.
Quoted 8 lines
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_failurewould mask any real error in the jobs. It also avoids having an orange ! on every release pipeline.Reported-by Stefan Hajnoczi <[email protected]>Signed-off-by Fabiano Rosas <[email protected]>This is better than before for sure:
Reviewed-by Peter Xu <[email protected]>Though nitpicks below.
Quoted 21 lines
--- .gitlab-ci.d/buildtest.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-).gitlab-ci.d/buildtest.yml +5
-0@@ -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.gitlab-ci.d/buildtest.yml build-previous-qemu: · line 234
Quoted 5 lines
.gitlab-ci.d/buildtest.yml +1
-1@@ -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..
Quoted 7 lines
.gitlab-ci.d/buildtest.yml build-previous-qemu: · line 235
Quoted 1 line
.gitlab-ci.d/buildtest.yml +1
-0+ - 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...
Quoted 2 lines
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.
Quoted 6 lines
Quoted 6 lines
.gitlab-ci.d/buildtest.yml +0
-0# old to new - QTEST_QEMU_BINARY_SRC=./qemu-system-${TARGET} QTEST_QEMU_BINARY=../build/qemu-system-${TARGET} ./tests/qtest/migration-testSignature · 1 line
2.35.3
PATCH 3/3 ci: Reduce the size of artifacts for build-previous-qemu
In reply to Fabiano RosasThe build-previous-qemu job is intented to produce a build of the previous QEMU release for consumption by the migration-compat-* jobs. Keep only the pieces of the build that are necessary.
--- .gitlab-ci.d/buildtest.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
.gitlab-ci.d/buildtest.yml +5 -6
@@ -188,12 +188,11 @@ build-previous-qemu: when: on_success expire_in: 2 days paths: - - build-previous - exclude: - - build-previous/**/*.p - - build-previous/**/*.a.p - - build-previous/**/*.c.o - - build-previous/**/*.c.o.d + - build-previous/qemu-bundle + - build-previous/qemu-system-aarch64 + - build-previous/qemu-system-x86_64 + - build-previous/tests/qtest/migration-test + - build-previous/scripts needs: job: amd64-opensuse-leap-container variables:
Signature · 1 line
2.35.3
Re: [PATCH 3/3] ci: Reduce the size of artifacts for build-previous-qemu
Quoted 5 lines · Fabiano Rosas
The build-previous-qemu job is intented to produce a build of the previous QEMU release for consumption by the migration-compat-* jobs. Keep only the pieces of the build that are necessary.
Signed-off-by Fabiano Rosas <[email protected]>
The other thing I'm thinking is maybe we could create migration.yml and move all migration stuff over, having buildtest.yml include that..
Signature · 1 line
Peter Xu