fix(storage): make VikingFS.mkdir() actually create the target directory#96
Merged
qin-ctx merged 2 commits intovolcengine:mainfrom Feb 9, 2026
Merged
fix(storage): make VikingFS.mkdir() actually create the target directory#96qin-ctx merged 2 commits intovolcengine:mainfrom
qin-ctx merged 2 commits intovolcengine:mainfrom
Conversation
mkdir() only called _ensure_parent_dirs() which creates parent directories but not the final component. The method returned without ever calling agfs.mkdir(path), making every mkdir() call a no-op. Add the missing agfs.mkdir(path) call after parent directory creation and exist_ok handling. Fixes #90
10c5957 to
2c70dc8
Compare
qin-ctx
approved these changes
Feb 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
VikingFS.mkdir()calls_ensure_parent_dirs(path)to create all parentdirectories, but never calls
agfs.mkdir(path)to create the target directoryitself. The method unconditionally returns without performing the actual mkdir
operation, making every
mkdir()call a no-op.This affects
TreeBuilder._move_directory_in_agfs,DirectoryInitializer,and
import_ovpack. The system may appear to work only becausewrite_fileindependently calls
_ensure_parent_dirs.Related Issue
Fixes #90
Type of Change
Changes Made
returnat the end ofmkdir()withawait asyncio.to_thread(self.agfs.mkdir, path)to actually create thetarget directory
exist_okbehavior, andparent-before-target call ordering
tests/README.mdwithtest_mkdir.pyentryTesting
Checklist
Screenshots (if applicable)
N/A
Additional Notes
The bug was verified by calling
viking_fs.mkdir("viking://resources/test_dir")followed by
viking_fs.stat()on the same URI, which raisedAGFSClientError: no such file or directory. See issue #90 for fullreproduction steps and output.