fix mickledore tests reports
cover fix mickledore tests reports
Hello,
mickledore release 4.2.4-rc3 suffered some tests reporting issue (tests result not pushed, regression report not generated, etc). This is due to the fact that the mickledore branch is not properly described in BUILD_HISTORY_DIRECTPUSH in config.json. This issue has already received the following fixes:
- add the missing mickledore entry
- then replaced the quickfix with a rework on BUILD_HISTORY_DIRECTPUSH to prevent the issue from occuring on any new future release branch
While those fixes made it to any release since Nanbield, we forgot to backport it on yocto-autobuilder-helper, so the fixed issue still occurs on this branch
This series brings the minimal set of patches to be backported **on top of mickledore branch** on yocto-autobuilder-helper. This is from a bare cherry-pick session with minimal conflict fixes, and commit tags untouched
Alexis Lothoré (3):
scripts/utils.py: replace BUILD_HISTORY_DIRECTPUSH with hardcoded
condition
config.json: remove BUILD_HISTORY_DIRECTPUSH scripts/test_utils.py: update test after BUILD_HISTORY_DIRECTPUSH
removal
config.json | 1 - scripts/test_utils.py | 29 +++++++---------------------- scripts/utils.py | 13 +++++++++++-- 3 files changed, 18 insertions(+), 25 deletions(-)
Signature · 1 line
2.42.1
PATCH 1/3 scripts/utils.py: replace BUILD_HISTORY_DIRECTPUSH with hardcoded condition
From: Alexis Lothoré <[email protected]>
It has been observed that when a new release branch is created, it is quite easy to forget to update the BUILD_HISTORY_DIRECTPUSH variable, which leads to failures in autobuilder like test results not being pushed. Replace the BUILD_HISTORY_DIRECTPUSH usage with a hardcoded condition which validates any branch in poky representing a "main" branch, i.e all branches not ending in "-next"
--- scripts/utils.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)
scripts/utils.py +11 -2
@@ -19,6 +19,15 @@ import fnmatch import glob import fcntl + +def is_a_main_branch(reponame, branchname): + """ + Checks if target repo/branch combo represent a main branch. This + includes master and release branches in poky, while excluding "next" + branches + """ + return reponame == "poky" and not branchname.endswith("-next") + # # Check if config contains all the listed params #
@@ -212,7 +221,7 @@ def getbuildhistoryconfig(ourconfig, builddir, target, reponame, branchname, ste reponame = reponame.rsplit("/", 1)[1] if reponame.endswith(".git"): reponame = reponame[:-4] - if (reponame + ":" + branchname) in getconfig("BUILD_HISTORY_DIRECTPUSH", ourconfig): + if is_a_main_branch(reponame, branchname): base = reponame + ":" + branchname if (reponame + ":" + branchname) in getconfig("BUILD_HISTORY_FORKPUSH", ourconfig): base = getconfig("BUILD_HISTORY_FORKPUSH", ourconfig)[reponame + ":" + branchname]
@@ -392,7 +401,7 @@ def getcomparisonbranch(ourconfig, reponame, branchname): comparerepo, comparebranch = base.split(":") print("Comparing to %s\n" % (comparebranch)) return branchname, comparebranch - if (reponame + ":" + branchname) in getconfig("BUILD_HISTORY_DIRECTPUSH", ourconfig): + if is_a_main_branch(reponame, branchname): return branchname, None return None, None
Signature · 1 line
2.42.1
PATCH 2/3 config.json: remove BUILD_HISTORY_DIRECTPUSH
In reply to Alexis LothoréFrom: Alexis Lothoré <[email protected]>
Now that BUILD_HISTORY_DIRECTPUSH has been replaced by a hardcoded condition, remove it from config.json
--- config.json | 1 - 1 file changed, 1 deletion(-)
config.json +0 -1
@@ -5,7 +5,6 @@ "BUILD_HISTORY_DIR" : "buildhistory", "BUILD_HISTORY_REPO" : "ssh://[email protected]/poky-buildhistory", - "BUILD_HISTORY_DIRECTPUSH" : ["poky:morty", "poky:pyro", "poky:rocko", "poky:sumo", "poky:thud", "poky:warrior", "poky:zeus", "poky:dunfell", "poky:gatesgarth", "poky:hardknott", "poky:honister", "poky:kirkstone", "poky:langdale", "poky:master"], "BUILD_HISTORY_FORKPUSH" : {"poky-contrib:ross/mut" : "poky:master", "poky-contrib:abelloni/master-next": "poky:master", "poky:master-next" : "poky:master"}, "BUILDTOOLS_URL_TEMPLOCAL" : "/srv/autobuilder/autobuilder.yocto.io/pub/non-release/20210214-8/buildtools/x86_64-buildtools-extended-nativesdk-standalone-3.2+snapshot-7d38cc8e749aedb8435ee71847e04b353cca541d.sh",
Signature · 1 line
2.42.1
PATCH 3/3 scripts/test_utils.py: update test after BUILD_HISTORY_DIRECTPUSH removal
In reply to Alexis LothoréFrom: Alexis Lothoré <[email protected]>
Update getcomparisonbranch unit tests by removing BUILD_HISTORY_DIRECTPUSH entry in fake configuration
--- scripts/test_utils.py | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-)
scripts/test_utils.py +7 -22
@@ -7,22 +7,7 @@ import utils class TestGetComparisonBranch(unittest.TestCase): TEST_CONFIG = { - "BUILD_HISTORY_DIRECTPUSH": [ - "poky:morty", - "poky:pyro", - "poky:rocko", - "poky:sumo", - "poky:thud", - "poky:warrior", - "poky:zeus", - "poky:dunfell", - "poky:gatesgarth", - "poky:hardknott", - "poky:honister", - "poky:kirkstone", - "poky:langdale", - "poky:master" - ], "BUILD_HISTORY_FORKPUSH": { + "BUILD_HISTORY_FORKPUSH": { "poky-contrib:ross/mut": "poky:master", "poky:master-next": "poky:master", "poky-contrib:abelloni/master-next": "poky:master"
@@ -35,9 +20,9 @@ class TestGetComparisonBranch(unittest.TestCase): basebranch, comparebranch = utils.getcomparisonbranch( self.TEST_CONFIG, repo, branch) self.assertEqual( - basebranch, "master", msg="Repo/branch pair present in BUILD_HISTORY_DIRECTPUSH must return corresponding base branch") + basebranch, "master", msg="Release branch in poky must return corresponding base branch") self.assertEqual( - comparebranch, None, msg="Repo/branch pair present in BUILD_HISTORY_DIRECTPUSH must return corresponding compare branch") + comparebranch, None, msg="Release branch in poky must return corresponding compare branch") def test_release_kirkstone(self): repo = "ssh://[email protected]/poky"
@@ -45,9 +30,9 @@ class TestGetComparisonBranch(unittest.TestCase): basebranch, comparebranch = utils.getcomparisonbranch( self.TEST_CONFIG, repo, branch) self.assertEqual(basebranch, "kirkstone", - msg="Repo/branch pair present in BUILD_HISTORY_DIRECTPUSH must return corresponding base branch") + msg="Release branch in poky must return corresponding base branch") self.assertEqual( - comparebranch, None, msg="Repo/branch pair present in BUILD_HISTORY_DIRECTPUSH must return corresponding compare branch") + comparebranch, None, msg="Release branch in poky must return corresponding compare branch") def test_release_langdale(self): repo = "ssh://[email protected]/poky"
@@ -55,9 +40,9 @@ class TestGetComparisonBranch(unittest.TestCase): basebranch, comparebranch = utils.getcomparisonbranch( self.TEST_CONFIG, repo, branch) self.assertEqual(basebranch, "langdale", - msg="Repo/branch pair present in BUILD_HISTORY_DIRECTPUSH must return corresponding base branch") + msg="Release branch in poky must return corresponding base branch") self.assertEqual( - comparebranch, None, msg="Repo/branch pair present in BUILD_HISTORY_DIRECTPUSH must return corresponding compare branch") + comparebranch, None, msg="Release branch in poky must return corresponding compare branch") def test_master_next(self): repo = "ssh://[email protected]/poky"
Signature · 1 line
2.42.1
Mickledore is already end-of-life, so no further builds are scheduled.
There is a dunfell release that I plan to build this weekend, so a patchset for dunfell would be much appreciated if you would like me to test it with the 3.1.30 build.
And a kirkstone release is due shortly thereafter, so we also need it there too!
Thanks for looking into this!
Steve
Quoted 43 lines · Alexis Lothoré via lists.yoctoproject.org
Hello,
mickledore release 4.2.4-rc3 suffered some tests reporting issue (tests result not pushed, regression report not generated, etc). This is due to the fact that the mickledore branch is not properly described inBUILD_HISTORY_DIRECTPUSHin config.json. This issue has already received the following fixes:
- add the missing mickledore entry
- then replaced the quickfix with a rework onBUILD_HISTORY_DIRECTPUSHto prevent the issue from occuring on any new future release branchWhile those fixes made it to any release since Nanbield, we forgot to backport it on yocto-autobuilder-helper, so the fixed issue still occurs on this branch
This series brings the minimal set of patches to be backported **on top of mickledore branch** on yocto-autobuilder-helper. This is from a bare cherry-pick session with minimal conflict fixes, and commit tags untouched
Alexis Lothoré (3):
scripts/utils.py: replaceBUILD_HISTORY_DIRECTPUSHwith hardcoded
condition
config.json: removeBUILD_HISTORY_DIRECTPUSHscripts/test_utils.py: update test afterBUILD_HISTORY_DIRECTPUSH
removalconfig.json | 1 - scripts/test_utils.py | 29 +++++++---------------------- scripts/utils.py | 13 +++++++++++-- 3 files changed, 18 insertions(+), 25 deletions(-)--
2.42.1-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#61845): https://lists.yoctoproject.org/g/yocto/message/61845
Mute This Topic: https://lists.yoctoproject.org/mt/103064175/3620601
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Hello Steve,
Quoted 1 line · Steve Sakoman
Mickledore is already end-of-life, so no further builds are scheduled.
Ah, yes, I checked that before sending because I had a doubt about whether this series would still be useful on top of mickledore, but since the 4.2.4.rc3 is still in progress, I was not sure.
So ok, feel free to drop this series.
Quoted 5 lines
There is a dunfell release that I plan to build this weekend, so a patchset for dunfell would be much appreciated if you would like me to test it with the 3.1.30 build.
And a kirkstone release is due shortly thereafter, so we also need it there too!
I am not sure that a backport is really needed on dunfell and kirkstone, because
- "dunfell" is properly described in BUILD_HISTORY_DIRECTPUSH in config.json, on dunfell branch
- "kirkstone" is properly described in BUILD_HISTORY_DIRECTPUSH in config.json, on kirkstone branch
(so yes, the issue was really affecting mickledore specifically)
Anyway, the wider issue is that those branches are lacking almost all developments I did since ~January on send-qa-email, so some things may work (test results storage), some other may not (regression reports based on those results). It is also true for poky. A whole backport is of course possible, but that would definitely need some thorough testing before using it for releases.
Kind regards,
Alexis
Signature · 3 lines
Alexis Lothoré, Bootlin Embedded Linux and Kernel engineering https://bootlin.com