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:
5858 ],
5959 env = env ,
6060 )
61+ self ._process .wait ()
6162
6263 def on_exit (self ) -> None :
6364 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:
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 ()
Original file line number Diff line number Diff line change 66class _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" )
Original file line number Diff line number Diff line change 1919
2020import websockets
2121from deepdiff import Delta
22- from lightning_cloud .openapi import AppinstancesIdBody , Externalv1LightningappInstance
22+ from lightning_cloud .openapi import AppinstancesIdBody , Externalv1LightningappInstance , V1LightningappInstanceState
2323
2424import lightning_app
2525from 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
Original file line number Diff line number Diff 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!" )
You can’t perform that action at this time.
0 commit comments