[PATCH buildbot] phase1, phase2: don't mark the build failed if a non-critical step fails

Baptiste Jonglez baptiste at bitsofnetworks.org
Wed Mar 24 22:48:13 GMT 2021


From: Baptiste Jonglez <git at bitsofnetworks.org>

Some steps are informative or optional (haltOnFailure=False), so it makes
no sense to mark the whole build as failed if such a step fails.

Depending on the case, we either mark the build as "warning"
(warnOnFailure=True) or as successful (warnOnFailure=False).

Signed-off-by: Baptiste Jonglez <git at bitsofnetworks.org>
---
 phase1/master.cfg |  6 ++++++
 phase2/master.cfg | 18 +++++++++++++++---
 2 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/phase1/master.cfg b/phase1/master.cfg
index 725d55e..a1f7dea 100644
--- a/phase1/master.cfg
+++ b/phase1/master.cfg
@@ -1350,6 +1350,8 @@ for target in targets:
 			command=["../rsync.sh", "--delete", "--delay-updates", "--partial-dir=.~tmp~%s~%s" %(ts[0], ts[1]), "-a"] + rsync_bin_defopts + ["bin/packages/", "%s/packages/" %(rsync_bin_url)],
 			env={'RSYNC_PASSWORD': rsync_bin_key},
 			haltOnFailure = False,
+			flunkOnFailure = False,
+			warnOnFailure = True,
 			logEnviron = False,
 		))
 
@@ -1361,6 +1363,8 @@ for target in targets:
 			command=["../rsync.sh", "--delete", "--delay-updates", "--partial-dir=.~tmp~%s~%s" %(ts[0], ts[1]), "-az"] + rsync_bin_defopts + ["logs/", "%s/logs/%s/%s/" %(rsync_bin_url, ts[0], ts[1])],
 			env={'RSYNC_PASSWORD': rsync_bin_key},
 			haltOnFailure = False,
+			flunkOnFailure = False,
+			warnOnFailure = True,
 			alwaysRun = True,
 			logEnviron = False,
 		))
@@ -1371,6 +1375,8 @@ for target in targets:
 		command=["df", "-h", "."],
 		env={'LC_ALL': 'C'},
 		haltOnFailure = False,
+		flunkOnFailure = False,
+		warnOnFailure = False,
 		alwaysRun = True
 	))
 
diff --git a/phase2/master.cfg b/phase2/master.cfg
index 7b103e8..b5050e5 100644
--- a/phase2/master.cfg
+++ b/phase2/master.cfg
@@ -604,7 +604,9 @@ for arch in arches:
 		description = "Clearing failure logs",
 		workdir = "build/sdk",
 		command = ["rm", "-rf", "logs/package/error.txt", "faillogs/"],
-		haltOnFailure = False
+		haltOnFailure = False,
+		flunkOnFailure = False,
+		warnOnFailure = True,
 	))
 
 	factory.addStep(ShellCommand(
@@ -701,7 +703,9 @@ for arch in arches:
 		description = "Finding failure logs",
 		workdir = "build/sdk/logs/package/feeds",
 		command = ["sh", "-c", "sed -ne 's!^ *ERROR: package/feeds/\\([^ ]*\\) .*$!\\1!p' ../error.txt | sort -u | xargs -r find > ../../../logs.txt"],
-		haltOnFailure = False
+		haltOnFailure = False,
+		flunkOnFailure = False,
+		warnOnFailure = True,
 	))
 
 	factory.addStep(ShellCommand(
@@ -709,7 +713,9 @@ for arch in arches:
 		description = "Collecting failure logs",
 		workdir = "build/sdk",
 		command = ["rsync", "-av", "--files-from=logs.txt", "logs/package/feeds/", "faillogs/"],
-		haltOnFailure = False
+		haltOnFailure = False,
+		flunkOnFailure = False,
+		warnOnFailure = True,
 	))
 
 	factory.addStep(ShellCommand(
@@ -719,6 +725,8 @@ for arch in arches:
 		command = ["rsync", "-4", "--progress", "--delete", "--delay-updates", "--partial-dir=.~tmp~%s" %(arch[0]), "-avz", "faillogs/", WithProperties("%s/faillogs%%(suffix)s/%s/" %(rsync_bin_url, arch[0]), suffix=GetDirectorySuffix)],
 		env={'RSYNC_PASSWORD': rsync_bin_key},
 		haltOnFailure = False,
+		flunkOnFailure = False,
+		warnOnFailure = True,
 		logEnviron = False
 	))
 
@@ -739,6 +747,8 @@ for arch in arches:
 			           WithProperties("--partial-dir=.~tmp~%s~%%(workername)s" %(arch[0])), "-avz", "dl/", "%s/" %(rsync_src_url)],
 			env={'RSYNC_PASSWORD': rsync_src_key},
 			haltOnFailure = False,
+			flunkOnFailure = False,
+			warnOnFailure = True,
 			logEnviron = False
 		))
 
@@ -748,6 +758,8 @@ for arch in arches:
 		command=["df", "-h", "."],
 		env={'LC_ALL': 'C'},
 		haltOnFailure = False,
+		flunkOnFailure = False,
+		warnOnFailure = False,
 		alwaysRun = True
 	))
 
-- 
2.30.1




More information about the openwrt-devel mailing list