Skip to contentSkip to conversation

cooker: Add debug for parsing being complete

PATCH New Richard Purdie 1 participant 2 messages Mar 10, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 cooker: Add debug for parsing being complete

We have a "parsing started" event in the cooker deamon log but we don't currently log the corresponding "parsing complete" event which is confusing. Add this so that the logs are more logical.

---
 lib/bb/cooker.py | 1 +
 1 file changed, 1 insertion(+)
lib/bb/cooker.py +1 -0
index e21815daad..1810bcc604 100644
@@ -1636,6 +1636,7 @@ You can also remove the BB_HASHSERVE_UPSTREAM setting, but this may result in si
         self.state = State.PARSING
 
         if not self.parser.parse_next():
+            bb.server.process.serverlog("Parsing completed")
             collectlog.debug("parsing complete")
             if self.parser.error:
                 raise bb.BBHandledException()
#1 lore raw

PATCH 2/2 command: Fix command complete event ordering

The command complete event triggers the UI to start new commands. We should send this once we've cleaned up existing commands since on very slow systems, this could otherwise cause failures. There is a 30s timeout on incomming commands but slow systems have been known to hit this on poorly configured I setups.

---
 lib/bb/command.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
lib/bb/command.py +2 -2
index baa7cbade1..59a979ee90 100644
@@ -143,14 +143,14 @@ class Command:
                 return bb.server.process.idleFinish(traceback.format_exc())
 
     def finishAsyncCommand(self, msg=None, code=None):
+        self.cooker.finishcommand()
+        self.process_server.clear_async_cmd()
         if msg or msg == "":
             bb.event.fire(CommandFailed(msg), self.cooker.data)
         elif code:
             bb.event.fire(CommandExit(code), self.cooker.data)
         else:
             bb.event.fire(CommandCompleted(), self.cooker.data)
-        self.cooker.finishcommand()
-        self.process_server.clear_async_cmd()
 
     def reset(self):
         if self.remotedatastores: