-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Prevent bug when launching apps on multiple clusters #15226
Prevent bug when launching apps on multiple clusters #15226
Conversation
c67aed8
to
b0fb647
Compare
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great
Let's also add a changelog entry in src/lightning_app/changelog.md? |
…-it-already-run-in-another
…-it-already-run-in-another
…-it-already-run-in-another
…-it-already-run-in-another
…-it-already-run-in-another
@@ -305,6 +292,15 @@ def dispatch( | |||
|
|||
if find_instances_resp.lightningapps: | |||
existing_instance = find_instances_resp.lightningapps[0] | |||
|
|||
# TODO: support multiple instances / 1 instance per cluster | |||
if existing_instance.spec.cluster_id != cluster_id: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@luca3rd I am confused about this. If the app already exists on a cluster, than it means the user is going to restart it when a new release.
What does this PR do?
Stops a bug when cross-launching an app between clusters.
Currently the platform does not allow running multiple app instances. If you have
app-1
running oncluster-1
and try to run it oncluster-2
, the CLI will succeed but the app will never start.This PR prevents this disconnect. The app should not be uploaded / released if it won't run. An error is presented to the user explaining what happened and how to proceed (specify a different
--name
: e.g.app-2
).Once the platform supports multiple app instances / running individual apps on multiple clusters, this PR can be reverted.
Does your PR introduce any breaking changes? If yes, please list them.
No
Before submitting
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:
Did you have fun?
Make sure you had fun coding 🙃
cc @Borda