* [PATCH] toaster: race condition for end-of-build
@ 2022-03-19 2:58 David Reyna
0 siblings, 0 replies; only message in thread
From: David Reyna @ 2022-03-19 2:58 UTC (permalink / raw)
To: toaster
From: David Reyna <David.Reyna@windriver.com>
Force a sync point for end-of build event handler force
the build's outcome status commit, to resolve a race
condition with the build completion takedown.
[YOCTO #14765]
Signed-off-by: David Reyna <David.Reyna@windriver.com>
---
bitbake/lib/bb/ui/buildinfohelper.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
index 5559387d8e..ec036e3b14 100644
--- a/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/bitbake/lib/bb/ui/buildinfohelper.py
@@ -228,6 +228,12 @@ class ORMWrapper(object):
build.completed_on = timezone.now()
build.outcome = outcome
build.save()
+
+ # We force a sync point here to force the outcome status commit,
+ # which resolves a race condition with the build completion takedown
+ transaction.set_autocommit(True)
+ transaction.set_autocommit(False)
+
signal_runbuilds()
def update_target_set_license_manifest(self, target, license_manifest_path):
--
2.17.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-03-19 2:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-19 2:58 [PATCH] toaster: race condition for end-of-build David Reyna
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).