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

Allow force run app on cloud if loading locally errors #15019

Merged
merged 28 commits into from
Oct 31, 2022

Conversation

manskx
Copy link
Contributor

@manskx manskx commented Oct 6, 2022

What does this PR do?

User story:
As a user, I want to be able to run lightning apps on the cloud and I don't need to install the dependencies locally.

If the app() cannot be loaded locally, it shows the following (the message needs to be revisited to tell the user it's better to save debugging time torun the app locally before running on cloud):

"Could not load the app() locally. Starting the app directly on the cloud."

Limitations:

  • features like defining the flow cloudconfig might not be supported/
  • DO NOT MERGE until the lightning backend supports dynamic flow server loading

TODO:

Add e2e test for this feature or add it to one of the apps.

Does your PR introduce any breaking changes? If yes, please list them.

Before submitting

  • Was this discussed/approved via a GitHub issue? (not for typos and docs)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes? (if necessary)
  • Did you write any new necessary tests? (not for typos and docs)
  • Did you verify new and existing tests pass locally with your changes?
  • Did you list all the breaking changes introduced by this pull request?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or minor internal changes/refactors)

PR review

Anyone in the community is welcome to review the PR.
Before you start reviewing, make sure you have read the review guidelines. In short, see the following bullet-list:

  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self-explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified

Did you have fun?

Make sure you had fun coding 🙃

cc @Borda

@github-actions github-actions bot added the app (removed) Generic label for Lightning App package label Oct 6, 2022
@nicolai86
Copy link
Contributor

isn't

features like defining the flow cloudconfig might not be supported/

a blocker for co-locating work and flow on the same nodes?

@manskx
Copy link
Contributor Author

manskx commented Oct 11, 2022

isn't

features like defining the flow cloudconfig might not be supported/

a blocker for co-locating work and flow on the same nodes?

It depends on how it is implemented, if it requires the load of the app() before running on the cloud then yes it won't be compatible with this PR. I believe that ideally we should try to avoid loading app() as much as we can.

@manskx manskx marked this pull request as ready for review October 27, 2022 10:41
@manskx
Copy link
Contributor Author

manskx commented Oct 27, 2022

This message could be improved.
Could not load the app() locally. Starting the app directly on the cloud.

we want to inform the user that it's better to make sure the app runs locally first before running on cloud because it might contain errors.

@edenafek what do you think ?

@mergify mergify bot removed the has conflicts label Oct 31, 2022
@Borda Borda added this to the v1.8 milestone Oct 31, 2022
Copy link
Contributor

@tchaton tchaton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving for now, but we would need a smarter mechanism to better collect the specs.

src/lightning_app/utilities/load_app.py Outdated Show resolved Hide resolved
src/lightning_app/utilities/load_app.py Outdated Show resolved Hide resolved
src/lightning_app/runners/runtime.py Show resolved Hide resolved
@mergify mergify bot added the ready PRs ready to be merged label Oct 31, 2022
@awaelchli awaelchli enabled auto-merge (squash) October 31, 2022 16:30
Copy link
Collaborator

@lantiga lantiga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, a tiny nit

src/lightning_app/runners/cloud.py Outdated Show resolved Hide resolved
@awaelchli awaelchli merged commit 19df40d into master Oct 31, 2022
@awaelchli awaelchli deleted the manskx/app/allow-run-without-loading-app branch October 31, 2022 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app (removed) Generic label for Lightning App package ready PRs ready to be merged
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

7 participants