-
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
[CLI] Move storage from app prefix to project/app prefix #14583
Conversation
I think for this we can actually get rid of that conditional and the old way of doing things entirely. This code would only ever run on newly created apps, not currently running apps that don't know the about the environment variable. We just need to start injecting the env var on the cloud (before this is merged so that e2e tests can pass) and call it a day :) |
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.
Could we add a tiny test case (or modify existing one) just to make sure we understand what the exact value of LIGHTNING_STORAGE_PATH
would look like and how it's returned from this function.
@dmitsf Just double checking, is the milestone correct, as this is a new addition/breaking change rather than a bugfix? |
…om:Lightning-AI/lightning into grid-10433-move-storage-from-app-prefix-to
…om:Lightning-AI/lightning into grid-10433-move-storage-from-app-prefix-to
Thanks! Changed to |
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 !
Codecov Report
@@ Coverage Diff @@
## master #14583 +/- ##
=========================================
+ Coverage 61% 85% +24%
=========================================
Files 381 327 -54
Lines 27588 25791 -1797
=========================================
+ Hits 16899 21925 +5026
+ Misses 10689 3866 -6823 |
* Move storage from app prefix to project/app prefix: checking and legacy support * Changelog message Co-authored-by: Jirka Borovec <[email protected]>
* Move storage from app prefix to project/app prefix: checking and legacy support * Changelog message Co-authored-by: Jirka Borovec <[email protected]>
What does this PR do?
We decided to move app storage prefix from
app_id
toproject_id/app_id
.This PR makes the change. The environment variable
LIGHTNING_STORAGE_PATH
will be set inside the workflow container, and we will take the storage path from this environment variable.If it's not specified, it will use the previous logic for defining app storage prefix.
Does your PR introduce any breaking changes? If yes, please list them.
Yes! App storage prefix will be different for new apps.
@rlizzo @panos-is @rusenask please take a look should we check do we have something from previously created app storages in the new logic, e.g. here: https://github.com/Lightning-AI/lightning/blob/master/src/lightning_app/storage/orchestrator.py#L90:L92 ?
We will deprecate old-way created storages in ~1 month.
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 🙃