Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-38339: Remove lab_settle_time configuration #221

Merged
merged 1 commit into from
Mar 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions src/mobu/models/business/jupyterloginloop.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,6 @@ class JupyterLoginOptions(BusinessOptions):
title="Jupyter lab spawning configuration",
)

lab_settle_time: int = Field(
0,
title="How long to wait after spawn before using a lab, in seconds",
description=(
"Wait this long after a lab successfully spawns before starting"
" to use it"
),
example=0,
)

spawn_settle_time: int = Field(
10,
title="How long to wait before polling spawn progress in seconds",
Expand Down
6 changes: 0 additions & 6 deletions src/mobu/services/business/jupyterloginloop.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,6 @@ async def execute(self) -> None:
self.image = None
if not await self.spawn_lab():
return
if not await self.lab_settle():
return
await self.lab_login()
await self.lab_business()
if self.options.delete_lab:
Expand Down Expand Up @@ -173,10 +171,6 @@ async def spawn_lab(self) -> bool:
else:
raise JupyterSpawnError(self.user.username, log)

async def lab_settle(self) -> bool:
with self.timings.start("lab_settle"):
return await self.pause(self.options.lab_settle_time)

async def lab_login(self) -> None:
with self.timings.start("lab_login", self.annotations()):
await self._client.lab_login()
Expand Down
8 changes: 0 additions & 8 deletions tests/business/jupyterloginloop_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ async def test_run(
"type": "JupyterLoginLoop",
"options": {
"spawn_settle_time": 0,
"lab_settle_time": 0,
"login_idle_time": 0,
},
},
Expand Down Expand Up @@ -94,7 +93,6 @@ async def test_reuse_lab(
"type": "JupyterLoginLoop",
"options": {
"spawn_settle_time": 0,
"lab_settle_time": 0,
"login_idle_time": 0,
"delete_lab": False,
},
Expand Down Expand Up @@ -128,7 +126,6 @@ async def test_delayed_lab_delete(
"type": "JupyterLoginLoop",
"options": {
"spawn_settle_time": 0,
"lab_settle_time": 0,
"login_idle_time": 0,
"delete_lab": False,
},
Expand Down Expand Up @@ -165,7 +162,6 @@ async def test_alert(
"type": "JupyterLoginLoop",
"options": {
"spawn_settle_time": 0,
"lab_settle_time": 0,
"login_idle_time": 0,
"delete_lab": False,
},
Expand Down Expand Up @@ -242,7 +238,6 @@ async def test_redirect_loop(
"type": "JupyterLoginLoop",
"options": {
"spawn_settle_time": 0,
"lab_settle_time": 0,
"login_idle_time": 0,
"delete_lab": False,
},
Expand Down Expand Up @@ -322,7 +317,6 @@ async def test_spawn_timeout(
"type": "JupyterLoginLoop",
"options": {
"spawn_settle_time": 0,
"lab_settle_time": 0,
"spawn_timeout": 1,
},
},
Expand Down Expand Up @@ -390,7 +384,6 @@ async def test_spawn_failed(
"type": "JupyterLoginLoop",
"options": {
"spawn_settle_time": 0,
"lab_settle_time": 0,
"spawn_timeout": 1,
},
},
Expand Down Expand Up @@ -472,7 +465,6 @@ async def test_delete_timeout(
"type": "JupyterLoginLoop",
"options": {
"spawn_settle_time": 0,
"lab_settle_time": 0,
"login_idle_time": 0,
"delete_timeout": 1,
},
Expand Down
4 changes: 0 additions & 4 deletions tests/business/jupyterpythonloop_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ async def test_run(
"type": "JupyterPythonLoop",
"options": {
"spawn_settle_time": 0,
"lab_settle_time": 0,
"max_executions": 3,
},
},
Expand Down Expand Up @@ -87,7 +86,6 @@ async def test_server_shutdown(
"type": "JupyterPythonLoop",
"options": {
"spawn_settle_time": 0,
"lab_settle_time": 0,
"max_executions": 3,
},
},
Expand Down Expand Up @@ -122,7 +120,6 @@ async def test_alert(
"options": {
"code": 'raise Exception("some error")',
"spawn_settle_time": 0,
"lab_settle_time": 0,
"max_executions": 1,
},
},
Expand Down Expand Up @@ -232,7 +229,6 @@ async def test_long_error(
),
},
"spawn_settle_time": 0,
"lab_settle_time": 0,
"max_executions": 1,
},
},
Expand Down
2 changes: 0 additions & 2 deletions tests/business/notebookrunner_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ async def test_run(
"type": "NotebookRunner",
"options": {
"spawn_settle_time": 0,
"lab_settle_time": 0,
"execution_idle_time": 0,
"max_executions": 1,
"repo_url": str(repo_path),
Expand Down Expand Up @@ -125,7 +124,6 @@ async def test_alert(
"restart": True,
"options": {
"spawn_settle_time": 0,
"lab_settle_time": 0,
"execution_idle_time": 0,
"max_executions": 1,
"repo_url": str(repo_path),
Expand Down