Skip to contentSkip to conversation

siggen: Work around unihash issues

PATCH New Richard Purdie 1 participant 1 message Oct 7, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 siggen: Work around unihash issues

Currently we have a bit of a determinism issue with hashequiv since there can be a unihash assigned by the server between our original query and this code reporting the outhash. This is fine if the outhashes are the same but if the outhashes are different (a determinism issue or a different arch situation). If the outhashes do differ, build can then proceed in a different path than a later build doing fresh unihash lookups would proceed in.

There are changes on the server side we could make to try and address this but those are invasive this close to release. For now, requery the server and update the unihash. This should avoid the determinism issues and match the behaviour some future server changes will have in a way that is a reasonable workaround for this release.

---
 lib/bb/siggen.py | 6 ++++++
 1 file changed, 6 insertions(+)
lib/bb/siggen.py +6 -0
index 625a9cf3bb..f6694e884b 100644
@@ -612,8 +612,14 @@ class SignatureGeneratorUniHashMixIn(object):
                     method = method + self.extramethod[tid]
 
                 data = self.client().report_unihash(taskhash, method, outhash, unihash, extra_data)
+
                 new_unihash = data['unihash']
 
+                # Check we get the correct unihash back and fixup if not
+                data = self.client().get_unihash(method, taskhash)
+                if data:
+                    new_unihash = data
+
                 if new_unihash != unihash:
                     hashequiv_logger.debug('Task %s unihash changed %s -> %s by server %s' % (taskhash, unihash, new_unihash, self.server))
                     bb.event.fire(bb.runqueue.taskUniHashUpdate(fn + ':do_' + task, new_unihash), d)
Signature · 1 line
2.32.0