Skip to content

Commit eee5413

Browse files
authored
Merge branch 'master' into pr-osparc-retry-tools-upgrade
2 parents 4f70ed6 + 8bed900 commit eee5413

File tree

8 files changed

+39
-1
lines changed

8 files changed

+39
-1
lines changed

packages/pytest-simcore/src/pytest_simcore/helpers/playwright.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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:

packages/pytest-simcore/src/pytest_simcore/helpers/playwright_sim4life.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ def wait_for_launched_s4l(
106106
autoscaled: bool,
107107
copy_workspace: bool,
108108
product_url: AnyUrl,
109+
is_service_legacy: bool,
109110
) -> WaitForS4LDict:
110111
with log_context(logging.INFO, "launch S4L") as ctx:
111112
predicate = S4LWaitForWebsocket(logger=ctx.logger)
@@ -132,6 +133,7 @@ def wait_for_launched_s4l(
132133
+ (_S4L_COPY_WORKSPACE_TIME if copy_workspace else 0),
133134
press_start_button=False,
134135
product_url=product_url,
136+
is_service_legacy=is_service_legacy,
135137
)
136138
s4l_websocket = ws_info.value
137139
ctx.logger.info("acquired S4L websocket!")

services/static-webserver/client/source/class/osparc/auth/ui/RequestAccount.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,13 @@ qx.Class.define("osparc.auth.ui.RequestAccount", {
8686
switch (osparc.product.Utils.getProductName()) {
8787
case "s4l":
8888
this._form.add(organization, this.tr("Company Name"), null, "company");
89+
organization.setRequired(true);
8990
break;
9091
case "s4lacad":
9192
case "s4ldesktopacad":
93+
this._form.add(organization, this.tr("University"), null, "university");
94+
organization.setRequired(true);
95+
break;
9296
case "tiplite":
9397
this._form.add(organization, this.tr("University"), null, "university");
9498
break;

tests/e2e-playwright/tests/conftest.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,12 @@ def pytest_addoption(parser: pytest.Parser) -> None:
106106
default=None,
107107
help="Service Key",
108108
)
109+
group.addoption(
110+
"--service-is-legacy",
111+
action="store_true",
112+
default=False,
113+
help="Whether service is a legacy service (no sidecar)",
114+
)
109115
group.addoption(
110116
"--template-id",
111117
action="store",
@@ -260,6 +266,12 @@ def service_key(request: pytest.FixtureRequest) -> str:
260266
return os.environ["SERVICE_KEY"]
261267

262268

269+
@pytest.fixture(scope="session")
270+
def is_service_legacy(request: pytest.FixtureRequest) -> bool:
271+
autoscaled = request.config.getoption("--service-is-legacy")
272+
return TypeAdapter(bool).validate_python(autoscaled)
273+
274+
263275
@pytest.fixture(scope="session")
264276
def template_id(request: pytest.FixtureRequest) -> str | None:
265277
if key := request.config.getoption("--template-id"):

tests/e2e-playwright/tests/jupyterlabs/test_jupyterlab.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ def test_jupyterlab(
7070
large_file_size: ByteSize,
7171
large_file_block_size: ByteSize,
7272
product_url: AnyUrl,
73+
is_service_legacy: bool,
7374
):
7475
# NOTE: this waits for the jupyter to send message, but is not quite enough
7576
with (
@@ -101,6 +102,7 @@ def test_jupyterlab(
101102
timeout=_WAITING_FOR_SERVICE_TO_START,
102103
press_start_button=False,
103104
product_url=product_url,
105+
is_service_legacy=is_service_legacy,
104106
)
105107

106108
iframe = page.frame_locator("iframe")

tests/e2e-playwright/tests/sim4life/test_sim4life.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ def test_sim4life(
3232
is_autoscaled: bool,
3333
check_videostreaming: bool,
3434
product_url: AnyUrl,
35+
is_service_legacy: bool,
3536
):
3637
if use_plus_button:
3738
project_data = create_project_from_new_button(service_key)
@@ -54,6 +55,7 @@ def test_sim4life(
5455
autoscaled=is_autoscaled,
5556
copy_workspace=False,
5657
product_url=product_url,
58+
is_service_legacy=is_service_legacy,
5759
)
5860
s4l_websocket = resp["websocket"]
5961
s4l_iframe = resp["iframe"]

tests/e2e-playwright/tests/sim4life/test_template.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ def test_template(
2828
is_autoscaled: bool,
2929
check_videostreaming: bool,
3030
product_url: AnyUrl,
31+
is_service_legacy: bool,
3132
):
3233
project_data = create_project_from_template_dashboard(template_id)
3334

@@ -45,6 +46,7 @@ def test_template(
4546
autoscaled=is_autoscaled,
4647
copy_workspace=True,
4748
product_url=product_url,
49+
is_service_legacy=is_service_legacy,
4850
)
4951
s4l_websocket = resp["websocket"]
5052
s4l_iframe = resp["iframe"]

tests/e2e-playwright/tests/tip/test_ti_plan.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ def test_classic_ti_plan( # noqa: PLR0915
9595
is_product_lite: bool,
9696
create_tip_plan_from_dashboard: Callable[[str], dict[str, Any]],
9797
product_url: AnyUrl,
98+
is_service_legacy: bool,
9899
):
99100
with log_context(logging.INFO, "Checking 'Access TIP' teaser"):
100101
# click to open and expand
@@ -145,6 +146,7 @@ def test_classic_ti_plan( # noqa: PLR0915
145146
),
146147
press_start_button=False,
147148
product_url=product_url,
149+
is_service_legacy=is_service_legacy,
148150
)
149151
# NOTE: Sometimes this iframe flicks and shows a white page. This wait will avoid it
150152
page.wait_for_timeout(_ELECTRODE_SELECTOR_FLICKERING_WAIT_TIME)
@@ -205,6 +207,7 @@ def test_classic_ti_plan( # noqa: PLR0915
205207
),
206208
press_start_button=False,
207209
product_url=product_url,
210+
is_service_legacy=is_service_legacy,
208211
) as service_running:
209212
app_mode_trigger_next_app(page)
210213
ti_iframe = service_running.iframe_locator
@@ -318,6 +321,7 @@ def test_classic_ti_plan( # noqa: PLR0915
318321
),
319322
press_start_button=False,
320323
product_url=product_url,
324+
is_service_legacy=is_service_legacy,
321325
) as service_running:
322326
app_mode_trigger_next_app(page)
323327
s4l_postpro_iframe = service_running.iframe_locator

0 commit comments

Comments
 (0)