-
Notifications
You must be signed in to change notification settings - Fork 32
🎨 moving folders to workspaces #6851
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
🎨 moving folders to workspaces #6851
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6851 +/- ##
===========================================
- Coverage 87.28% 65.29% -21.99%
===========================================
Files 1557 648 -909
Lines 61890 31562 -30328
Branches 2108 263 -1845
===========================================
- Hits 54018 20608 -33410
- Misses 7541 10894 +3353
+ Partials 331 60 -271
*This pull request uses carry forward flags. Click here to find out more.
Continue to review full report in Codecov by Sentry.
|
odeimaiz
left a comment
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.
💅
pcrespov
left a comment
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.
really nice! Having things standardize allows me to follow your changes to a much greater degree. I left some suggestions. If there are not clear lets catch up in offline. thx!
services/web/server/src/simcore_service_webserver/folders/_folders_db.py
Outdated
Show resolved
Hide resolved
...rver/tests/unit/with_dbs/04/workspaces/test_workspaces__moving_folders_between_workspaces.py
Outdated
Show resolved
Hide resolved
...rver/tests/unit/with_dbs/04/workspaces/test_workspaces__moving_folders_between_workspaces.py
Show resolved
Hide resolved
...rver/tests/unit/with_dbs/04/workspaces/test_workspaces__moving_folders_between_workspaces.py
Outdated
Show resolved
Hide resolved
...rver/tests/unit/with_dbs/04/workspaces/test_workspaces__moving_folders_between_workspaces.py
Outdated
Show resolved
Hide resolved
...rver/tests/unit/with_dbs/04/workspaces/test_workspaces__moving_folders_between_workspaces.py
Outdated
Show resolved
Hide resolved
sanderegg
left a comment
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.
nice! thanks
packages/pytest-simcore/src/pytest_simcore/helpers/webserver_projects.py
Show resolved
Hide resolved
...rver/tests/unit/with_dbs/04/workspaces/test_workspaces__moving_folders_between_workspaces.py
Outdated
Show resolved
Hide resolved
odeimaiz
left a comment
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.
Beautiful
pcrespov
left a comment
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.
thx!
|
Nice |
|



What do these changes do?
transaction_contextto make complicated operations on DBHelpers:
Firstly check permissions
Private Workspace Folder --> Shared workspace (root)
projectstable "workspace_id" fieldfolder_v2table "workspace_id" field (all children) and "parent_folder_id" field with NULL (just for the one moving)projects_to_folderstable -> Remove all records with children folders where "user_id" field is not the one movingprojects_to_folderstable -> Update "user_id" field with NoneShared Workspace Folder --> Shared workspace (root)
projectstable "workspace_id" fieldfolder_v2table "workspace_id" field (all children) and "parent_folder_id" field with NULL (just for the one moving)projects_to_folderstable -> Update "user_id" field with NoneShared Workspace Folder --> Private workspace (root)
projectstable "workspace_id" field with NULLfolder_v2table "workspace_id" field (all children) with NULL and "parent_folder_id" field with NULL (just for the one moving)projects_to_folderstable -> Update "user_id" field with USER ID integerRelated issue/s
test_project_workspace_movement_full_workflow#6778How to test
Dev-ops checklist