diff mbox series

[2/2] bitbake: cooker: the hashserv client ping is not suitable

Message ID 20241031120015.3651707-2-jose.quaresma@foundries.io
State New
Headers show
Series [1/2] bitbake: hashserv: client: immediately test the server address | expand

Commit Message

Jose Quaresma Oct. 31, 2024, noon UTC
The ping function of the asyncrpc client doesn't work as it should
to test the connection to the server and if the server doesn't exist
or is not reachable we have a fatal error in bitbake.

| Timeout while waiting for a reply from the bitbake server (60s at 11:52:15.476236)

Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
---
 bitbake/lib/bb/cooker.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 2e80986640..2fcf4dc144 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -315,8 +315,7 @@  class BBCooker:
                 upstream = self.data.getVar("BB_HASHSERVE_UPSTREAM") or None
                 if upstream:
                     try:
-                        with hashserv.create_client(upstream) as client:
-                            client.ping()
+                        hashserv.create_client(upstream)
                     except (ConnectionError, ImportError) as e:
                         bb.warn("BB_HASHSERVE_UPSTREAM is not valid, unable to connect hash equivalence server at '%s': %s"
                                  % (upstream, repr(e)))