File tree Expand file tree Collapse file tree 5 files changed +12
-9
lines changed
tests/tests_examples_app/public Expand file tree Collapse file tree 5 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ def run(self) -> None:
58
58
],
59
59
env = env ,
60
60
)
61
+ self ._process .wait ()
61
62
62
63
def on_exit (self ) -> None :
63
64
if self ._process is not None :
Original file line number Diff line number Diff line change @@ -526,14 +526,11 @@ def _update_layout(self) -> None:
526
526
component ._layout = layout
527
527
528
528
def _update_is_headless (self ) -> None :
529
- is_headless = _is_headless (self )
529
+ self . is_headless = _is_headless (self )
530
530
531
531
# If `is_headless` changed, handle it.
532
532
# 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 )
537
534
538
535
def _apply_restarting (self ) -> bool :
539
536
self ._reset_original_state ()
Original file line number Diff line number Diff line change 6
6
class _Config :
7
7
id = os .getenv ("LIGHTNING_USER_ID" )
8
8
key = os .getenv ("LIGHTNING_API_KEY" )
9
- url = os .getenv ("LIGHTNING_CLOUD_URL" , "" )
9
+ url = os .getenv ("LIGHTNING_CLOUD_URL" , "https://lightning.ai " )
10
10
api_key = os .getenv ("LIGHTNING_API_KEY" )
11
11
username = os .getenv ("LIGHTNING_USERNAME" )
12
12
video_location = os .getenv ("VIDEO_LOCATION" , "./artifacts/videos" )
Original file line number Diff line number Diff line change 19
19
20
20
import websockets
21
21
from deepdiff import Delta
22
- from lightning_cloud .openapi import AppinstancesIdBody , Externalv1LightningappInstance
22
+ from lightning_cloud .openapi import AppinstancesIdBody , Externalv1LightningappInstance , V1LightningappInstanceState
23
23
24
24
import lightning_app
25
25
from lightning_app .utilities .exceptions import LightningAppStateException
@@ -556,7 +556,12 @@ def _handle_is_headless(app: "LightningApp"):
556
556
"App was not found. Please open an issue at https://github.com/lightning-AI/lightning/issues."
557
557
)
558
558
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
+ ):
560
565
return
561
566
562
567
current_lightningapp_instance .spec .is_headless = app .is_headless
Original file line number Diff line number Diff line change @@ -30,5 +30,5 @@ def check_hello_there(*_, **__):
30
30
31
31
assert result .exit_code == 0
32
32
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 )
34
34
print ("Succeeded App!" )
You can’t perform that action at this time.
0 commit comments