@@ -294,6 +294,7 @@ class SocketIONodeProgressCompleteWaiter:
294294 logger : logging .Logger
295295 product_url : AnyUrl
296296 api_request_context : APIRequestContext
297+ is_service_legacy : bool
297298 _current_progress : dict [NodeProgressType , float ] = field (
298299 default_factory = defaultdict
299300 )
@@ -336,7 +337,12 @@ def __call__(self, message: str) -> bool:
336337
337338 _current_timestamp = datetime .now (UTC )
338339 if _current_timestamp - self ._last_poll_timestamp > timedelta (seconds = 5 ):
339- url = f"https://{ self .node_id } .services.{ self .get_partial_product_url ()} "
340+ if self .is_service_legacy :
341+ url = f"https://{ self .get_partial_product_url ()} x/{ self .node_id } /"
342+ else :
343+ url = (
344+ f"https://{ self .node_id } .services.{ self .get_partial_product_url ()} "
345+ )
340346 response = self .api_request_context .get (url , timeout = 1000 )
341347 level = logging .DEBUG
342348 if (response .status >= 400 ) and (response .status not in (502 , 503 )):
@@ -431,6 +437,7 @@ def expected_service_running(
431437 timeout : int ,
432438 press_start_button : bool ,
433439 product_url : AnyUrl ,
440+ is_service_legacy : bool ,
434441) -> Generator [ServiceRunning , None , None ]:
435442 with log_context (
436443 logging .INFO , msg = f"Waiting for node to run. Timeout: { timeout } "
@@ -440,6 +447,7 @@ def expected_service_running(
440447 logger = ctx .logger ,
441448 product_url = product_url ,
442449 api_request_context = page .request ,
450+ is_service_legacy = is_service_legacy ,
443451 )
444452 service_running = ServiceRunning (iframe_locator = None )
445453
@@ -472,6 +480,7 @@ def wait_for_service_running(
472480 timeout : int ,
473481 press_start_button : bool ,
474482 product_url : AnyUrl ,
483+ is_service_legacy : bool ,
475484) -> FrameLocator :
476485 """NOTE: if the service was already started this will not work as some of the required websocket events will not be emitted again
477486 In which case this will need further adjutment"""
@@ -484,6 +493,7 @@ def wait_for_service_running(
484493 logger = ctx .logger ,
485494 product_url = product_url ,
486495 api_request_context = page .request ,
496+ is_service_legacy = is_service_legacy ,
487497 )
488498 with websocket .expect_event ("framereceived" , waiter , timeout = timeout ):
489499 if press_start_button :
0 commit comments