Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

feat: Allow mounting vfolder subdirectory into session container #537

Merged
merged 22 commits into from
Mar 10, 2022

Conversation

SonMinWoo
Copy link
Contributor

@SonMinWoo SonMinWoo commented Feb 17, 2022

resolves: lablup/backend.ai#360
related: https://github.com/lablup/backend.ai-agent/pull/343

Let's allow using a "partial" view of a vfolder inside sessions.
For example, if a vfolder mystuff has a/b/c subdirectories, let's allow mounting mystuff/a/b as /home/work/bbb.

When vfolders are mounted, for verification existence of it db query is used. However, that have only top path of subdirectory and make object with necessary information to mount including only top path of subdirectory as folder name.

To solve this problem, after making other information to mount using top path of subdirectory edit only top path of folder names to full folder name including subdirectories.

issue360

* feat: Check resource by root of subdirectory
* feat: Apply mount info of root to its subdirectory
@codecov
Copy link

codecov bot commented Feb 17, 2022

Codecov Report

Merging #537 (5aa69ac) into main (ff5a197) will increase coverage by 0.02%.
The diff coverage is 34.59%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #537      +/-   ##
==========================================
+ Coverage   49.04%   49.06%   +0.02%     
==========================================
  Files          54       55       +1     
  Lines        9066     9155      +89     
==========================================
+ Hits         4446     4492      +46     
- Misses       4620     4663      +43     
Impacted Files Coverage Δ
src/ai/backend/manager/models/scaling_group.py 66.25% <ø> (ø)
src/ai/backend/manager/registry.py 17.72% <9.09%> (+0.75%) ⬆️
src/ai/backend/manager/models/vfolder.py 33.57% <11.47%> (-6.62%) ⬇️
src/ai/backend/manager/models/dotfile.py 31.81% <31.81%> (ø)
src/ai/backend/manager/models/storage.py 44.02% <66.66%> (+0.35%) ⬆️
src/ai/backend/manager/models/base.py 53.80% <67.85%> (+0.78%) ⬆️
src/ai/backend/manager/models/__init__.py 100.00% <100.00%> (ø)
src/ai/backend/manager/models/kernel.py 44.13% <100.00%> (ø)
src/ai/backend/manager/scheduler/types.py 76.24% <100.00%> (-0.14%) ⬇️
src/ai/backend/manager/types.py 94.11% <100.00%> (+5.22%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ff5a197...5aa69ac. Read the comment docs.

@SonMinWoo SonMinWoo requested a review from achimnol February 17, 2022 16:44
@SonMinWoo SonMinWoo self-assigned this Feb 17, 2022
@achimnol achimnol changed the title feat: Allow mounting subdirectory into session container feat: Allow mounting vfolder subdirectory into session container Feb 18, 2022
@achimnol achimnol merged commit 2e3824e into main Mar 10, 2022
@achimnol achimnol deleted the feature/allow-mount-subdirectory branch March 10, 2022 14:28
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow mounting subdirectory of a vfolder into session containers
2 participants