-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[App] Resolved root_folder not parsed properly #16454
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
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
1228799
update
f8aedfc
add changelog
d0b6188
update
d76a130
update
d79419d
update
a77e91e
update
e2c4e1b
update
1ef4cc6
update
8b6acc0
Merge branch 'master' into resolve_bug
tchaton ec49d13
update
1435c3d
Merge branch 'resolve_bug' of https://github.com/Lightning-AI/lightni…
3f51287
update
0475801
update
e72d7a2
update
1f14bf9
update
e487250
Merge branch 'master' into resolve_bug
tchaton 8b0706a
Merge branch 'master' into resolve_bug
tchaton f197389
update
9ab4019
update
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,20 +3,17 @@ | |
from time import sleep | ||
|
||
import pytest | ||
import requests | ||
from integrations_app.public import _PATH_EXAMPLES | ||
|
||
from lightning_app.testing.testing import run_app_in_cloud | ||
from lightning_app.utilities.cloud import _get_project | ||
from lightning_app.utilities.network import LightningClient | ||
|
||
|
||
@pytest.mark.timeout(300) | ||
@pytest.mark.cloud | ||
def test_commands_and_api_example_cloud() -> None: | ||
with run_app_in_cloud(os.path.join(_PATH_EXAMPLES, "app_commands_and_api")) as ( | ||
admin_page, | ||
_, | ||
view_page, | ||
fetch_logs, | ||
app_name, | ||
): | ||
|
@@ -25,29 +22,12 @@ def test_commands_and_api_example_cloud() -> None: | |
cmd_1 = f"python -m lightning connect {app_name}" | ||
cmd_2 = "python -m lightning command with client --name=this" | ||
cmd_3 = "python -m lightning command without client --name=is" | ||
cmd_4 = "lightning disconnect" | ||
process = Popen(" && ".join([cmd_1, cmd_2, cmd_3, cmd_4]), shell=True) | ||
cmd_4 = "python -m lightning command without client --name=awesome" | ||
cmd_5 = "lightning disconnect" | ||
process = Popen(" && ".join([cmd_1, cmd_2, cmd_3, cmd_4, cmd_5]), shell=True) | ||
process.wait() | ||
|
||
# This prevents some flakyness in the CI. Couldn't reproduce it locally. | ||
sleep(5) | ||
|
||
# Send a request to the Rest API directly. | ||
client = LightningClient() | ||
project = _get_project(client) | ||
|
||
lit_apps = [ | ||
lit_app | ||
for lit_app in client.lightningapp_instance_service_list_lightningapp_instances( | ||
project_id=project.project_id, | ||
).lightningapps | ||
if lit_app.name == app_name | ||
] | ||
app = lit_apps[0] | ||
|
||
base_url = app.status.url | ||
resp = requests.post(base_url + "/user/command_without_client?name=awesome") | ||
assert resp.status_code == 200, resp.json() | ||
"/".join(view_page.url.split("/")[:-2]) | ||
|
||
# Validate the logs. | ||
has_logs = False | ||
|
@@ -56,8 +36,3 @@ def test_commands_and_api_example_cloud() -> None: | |
if "['this', 'is', 'awesome']" in log: | ||
has_logs = True | ||
sleep(1) | ||
|
||
# Send a request to the Rest API directly. | ||
resp = requests.get(base_url + "/pure_function") | ||
assert resp.status_code == 200 | ||
assert resp.json() == "Hello World !" | ||
Comment on lines
-62
to
-63
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why were these assets removed? 😕 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.