-
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
[App] Add support for running with multiprocessing in the cloud #16624
Conversation
⚡ Required checks status: All passing 🟢Groups summary🟢 lightning_app: Tests workflow
These checks are required after the changes to 🟢 lightning_app: Examples
These checks are required after the changes to 🟢 lightning_app: Azure
These checks are required after the changes to 🟢 lightning_app: Docs
These checks are required after the changes to 🟢 mypy
These checks are required after the changes to 🟢 installThese checks are required after the changes to Thank you for your contribution! 💜
|
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.
LGTM !
(cherry picked from commit fd61ed0)
(cherry picked from commit fd61ed0)
(cherry picked from commit fd61ed0)
(cherry picked from commit fd61ed0)
(cherry picked from commit fd61ed0)
(cherry picked from commit fd61ed0)
What does this PR do?
In the cloud we will set the host and number of exposed ports (starting at 7501). This PR makes changes so that, when those variables are set, we allocate ports sequentially from 7501 without collisions. If the app needs more ports than the number of exposed ports, we raise an error.
This also fixes a potential very rare bug where multiple requests to
find_free_network_port
could get the same port if it isn't being actively used yet. If somehow we fail 10 times to get a free port then an error will be raised to prevent an infinite loop.Does your PR introduce any breaking changes? If yes, please list them.
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