Skip to contentSkip to conversation

ease send-qa-email usage with older history

PATCH New [email protected] 1 participant 4 messages Feb 7, 2023

lore
Share & tools
lore
#0 lore raw

v2 cover ease send-qa-email usage with older history

From: Alexis Lothoré <[email protected]>

Hello,
This is the v2 of minor patch series to ease development/debugging on send-qa-email. There is no functional change in the patches since v1, those are resent to fix some mess in signedoff/from fields from my email configuration. Regards,

Alexis Lothoré (3):
scripts/send-qa-email: force current revision fetch scripts/send-qa-email: reduce testresults shallow clone depth scripts/send-qa-email: add target and base revisions in regression
report

 scripts/send_qa_email.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
Signature · 1 line
2.39.1
#1 lore raw

PATCH v2 1/3 scripts/send-qa-email: force current revision fetch

From: Alexis Lothoré <[email protected]>

If we try to run send-qa-email to simulate past releases (for example, for development or debugging), the execution will very likely fail because the target revision to examine (ie: the poky revision) is too old, and as a consequence is not contained in the testresults shallow clone anymore (because testsresults history keeps moving forward as builds are triggered on autobuilder). As a consequence, force-fetch the "target" revision, as it is already done for the "base" revision

---
 scripts/send_qa_email.py | 1 +
 1 file changed, 1 insertion(+)
scripts/send_qa_email.py +1 -0
index 199fe4e..f8ebe34 100755
@@ -75,6 +75,7 @@ def generate_regression_report(resulttool, targetrepodir, basebranch, resultdir,
         running resulttool
         """
         fetch_testresults(resultdir, baserevision)
+        fetch_testresults(resultdir, comparerevision)
         regreport = subprocess.check_output([resulttool, "regression-git", "-B", basebranch, "--commit", baserevision, "--commit2", comparerevision, resultdir])
         with open(outputdir + "/testresult-regressions-report.txt", "wb") as f:
            f.write(regreport)
Signature · 1 line
2.39.1
#2 lore raw

PATCH v2 2/3 scripts/send-qa-email: reduce testresults shallow clone depth

In reply to [email protected]

From: Alexis Lothoré <[email protected]>

Since we are now force-fetching base revisions and target revisions for regression report generation, we can make testresults clone even more "shallow" to increase clone speed in CI pipelines

---
 scripts/send_qa_email.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
scripts/send_qa_email.py +2 -2
index f8ebe34..b87e822 100755
@@ -139,10 +139,10 @@ def send_qa_email():
             elif basebranch:
                 cloneopts = ["--branch", basebranch]
             try:
-                subprocess.check_call(["git", "clone", "[email protected]:yocto-testresults", tempdir, "--depth", "5"] + cloneopts)
+                subprocess.check_call(["git", "clone", "[email protected]:yocto-testresults", tempdir, "--depth", "1"] + cloneopts)
             except subprocess.CalledProcessError:
                 print("No comparision branch found, falling back to master")
-                subprocess.check_call(["git", "clone", "[email protected]:yocto-testresults", tempdir, "--depth", "5"])
+                subprocess.check_call(["git", "clone", "[email protected]:yocto-testresults", tempdir, "--depth", "1"])
 
             # If the base comparision branch isn't present regression comparision won't work
             # at least until we can tell the tool to ignore internal branch information
Signature · 1 line
2.39.1
#3 lore raw

PATCH v2 3/3 scripts/send-qa-email: add target and base revisions in regression report

In reply to [email protected]

From: Alexis Lothoré <[email protected]>

Current regression reports do not contain information about versions compared when generating reports. While it is still possible to get the information by searching the autobuilder log, it is not convenient. Moreover, future developments will allow to generate multiple reports (with different bases for comparison) in a single build.
As a consequence, embed target and base revisions in the report header

---
 scripts/send_qa_email.py | 4 ++++
 1 file changed, 4 insertions(+)
scripts/send_qa_email.py +4 -0
index b87e822..e2d7284 100755
@@ -78,6 +78,10 @@ def generate_regression_report(resulttool, targetrepodir, basebranch, resultdir,
         fetch_testresults(resultdir, comparerevision)
         regreport = subprocess.check_output([resulttool, "regression-git", "-B", basebranch, "--commit", baserevision, "--commit2", comparerevision, resultdir])
         with open(outputdir + "/testresult-regressions-report.txt", "wb") as f:
+           f.write(str.encode("========================== Regression report ==============================\n"))
+           f.write(str.encode(f'{"=> Target:": <16}{basebranch: <16}({comparerevision})\n'))
+           f.write(str.encode(f'{"=> Base:": <16}{baseversion: <16}({baserevision})\n'))
+           f.write(str.encode("===========================================================================\n\n"))
            f.write(regreport)
     except subprocess.CalledProcessError as e:
         error = str(e)
Signature · 1 line
2.39.1