Skip to content

Commit 60b3cc9

Browse files
ethanwharrisSherin Thomas
andauthored
1.8.4.post release final (#15999)
* Dont try to update an instance that isnt running yet (#15998) * Fix hanging CI Co-authored-by: Sherin Thomas <[email protected]>
1 parent db10422 commit 60b3cc9

File tree

5 files changed

+12
-9
lines changed

5 files changed

+12
-9
lines changed

src/lightning_app/components/serve/streamlit.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ def run(self) -> None:
5858
],
5959
env=env,
6060
)
61+
self._process.wait()
6162

6263
def on_exit(self) -> None:
6364
if self._process is not None:

src/lightning_app/core/app.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -526,14 +526,11 @@ def _update_layout(self) -> None:
526526
component._layout = layout
527527

528528
def _update_is_headless(self) -> None:
529-
is_headless = _is_headless(self)
529+
self.is_headless = _is_headless(self)
530530

531531
# If `is_headless` changed, handle it.
532532
# This ensures support for apps which dynamically add a UI at runtime.
533-
if self.is_headless != is_headless:
534-
self.is_headless = is_headless
535-
536-
_handle_is_headless(self)
533+
_handle_is_headless(self)
537534

538535
def _apply_restarting(self) -> bool:
539536
self._reset_original_state()

src/lightning_app/testing/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
class _Config:
77
id = os.getenv("LIGHTNING_USER_ID")
88
key = os.getenv("LIGHTNING_API_KEY")
9-
url = os.getenv("LIGHTNING_CLOUD_URL", "")
9+
url = os.getenv("LIGHTNING_CLOUD_URL", "https://lightning.ai")
1010
api_key = os.getenv("LIGHTNING_API_KEY")
1111
username = os.getenv("LIGHTNING_USERNAME")
1212
video_location = os.getenv("VIDEO_LOCATION", "./artifacts/videos")

src/lightning_app/utilities/app_helpers.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
import websockets
2121
from deepdiff import Delta
22-
from lightning_cloud.openapi import AppinstancesIdBody, Externalv1LightningappInstance
22+
from lightning_cloud.openapi import AppinstancesIdBody, Externalv1LightningappInstance, V1LightningappInstanceState
2323

2424
import lightning_app
2525
from lightning_app.utilities.exceptions import LightningAppStateException
@@ -556,7 +556,12 @@ def _handle_is_headless(app: "LightningApp"):
556556
"App was not found. Please open an issue at https://github.com/lightning-AI/lightning/issues."
557557
)
558558

559-
if current_lightningapp_instance.spec.is_headless == app.is_headless:
559+
if any(
560+
[
561+
current_lightningapp_instance.spec.is_headless == app.is_headless,
562+
current_lightningapp_instance.status.phase != V1LightningappInstanceState.RUNNING,
563+
]
564+
):
560565
return
561566

562567
current_lightningapp_instance.spec.is_headless = app.is_headless

tests/tests_examples_app/public/test_boring_app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,5 @@ def check_hello_there(*_, **__):
3030

3131
assert result.exit_code == 0
3232
assert result.exception is None
33-
assert any("--filepath=/content/.storage/boring_file.txt" in line for line in lines)
33+
assert any("Received from root.dict.dst_w" in line for line in lines)
3434
print("Succeeded App!")

0 commit comments

Comments
 (0)