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

[App] Actually fix launching apps on multiple clusters #15461

Closed

Conversation

luca3rd
Copy link
Contributor

@luca3rd luca3rd commented Nov 2, 2022

What does this PR do?

Actually fix the cross launching apps issue.

Before

After

Screen Shot 2022-11-01 at 9 25 34 PM

Fixes #<issue_number>

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 🙃

@luca3rd luca3rd changed the title Actually fix launching apps on multiple clusters [App] Actually fix launching apps on multiple clusters Nov 2, 2022
@github-actions github-actions bot added the app (removed) Generic label for Lightning App package label Nov 2, 2022
@lantiga
Copy link
Collaborator

lantiga commented Nov 2, 2022

I don't think this is what we want.

App names must be unique per-project, not per-project + per-cluster @edenafek (I feel strongly about this).

If you try to run an app with the same name in a project, targeting a different cluster, the first app needs to be stopped, irrespective of what cluster it is running on. We need to keep the model simple, otherwise the CLI will complicate a ton (now it's not enough to address the app by name, you also need to think whether there's another instance of that app running on another cluster, and instead use the id to address it, e.g. connect, from the CLI).

@rusenask
Copy link

rusenask commented Nov 2, 2022

I don't think this is what we want.

App names must be unique per-project, not per-project + per-cluster @edenafek (I feel strongly about this).

If you try to run an app with the same name in a project, targeting a different cluster, the first app needs to be stopped, irrespective of what cluster it is running on. We need to keep the model simple, otherwise the CLI will complicate a ton (now it's not enough to address the app by name, you also need to think whether there's another instance of that app running on another cluster, and instead use the id to address it, e.g. connect, from the CLI).

👍 I also don't think this is useful for any scenario. Why would you have the same name @edenafek ? If I wanted this as a user I would just create two apps muse-east-1 and muse-east-2 and then I don't have to think about it. This is almost as having two files in your directory with the same name, while possible, doesn't make things good :)

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.

Requested change (throughout the system): app names should be unique per project

app_config.cluster_id = most_recent_instance.spec.cluster_id

# get the existing instance on the cluster, if any
existing_instance = existing_instances_by_cluster.get(app_config.cluster_id, None)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
existing_instance = existing_instances_by_cluster.get(app_config.cluster_id, None)
existing_instance = existing_instances_by_cluster.get(app_config.cluster_id)

Copy link
Member

Choose a reason for hiding this comment

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

None is already the default returning value :)

@luca3rd
Copy link
Contributor Author

luca3rd commented Nov 3, 2022

This was an old PR to prove that we could launch app instances on different clusters.

The PR fixing this issue as we discussed is over here: #15484

@luca3rd luca3rd closed this Nov 3, 2022
@Borda Borda deleted the ENG-1629-fix-launching-apps-on-multiple-clusters branch November 5, 2022 19:28
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants