feat(BA-5425): Create VFolder Adapter skeleton with conversion helpers#10569
Open
seedspirit wants to merge 5 commits intomainfrom
Open
feat(BA-5425): Create VFolder Adapter skeleton with conversion helpers#10569seedspirit wants to merge 5 commits intomainfrom
seedspirit wants to merge 5 commits intomainfrom
Conversation
Add api/adapters/vfolder.py with VFolderAdapter class extending BaseAdapter. Includes stub signatures for get(), admin_search(), my_search(), and _service_info_to_node() conversion helper. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Maps VFolderBaseInfo + VFolderOwnershipInfo + VFolderUsageInfo service types to VFolderNode DTO with nested sub-models (BasicInfo, PermissionInfo, OwnerInfo, UsageInfo). Handles enum conversions via to_field() methods. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
seedspirit
added a commit
that referenced
this pull request
Mar 26, 2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a VFolder adapter layer to bridge manager VFolder processors to manager-v2 DTOs, including new request/response models for admin and self-scoped searches.
Changes:
- Introduces
VFolderAdapterwithget(),admin_search(), andmy_search()methods. - Adds DTO request inputs (
AdminSearchVFoldersInput,MySearchVFoldersInput) and response payloads (AdminSearchVFoldersPayload,MySearchVFoldersPayload). - Implements
_service_info_to_node()to map service-layer vfolder info into nestedVFolderNodeDTOs.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| src/ai/backend/manager/api/adapters/vfolder.py | New adapter that calls vfolder processors and maps service results into DTOs with pagination. |
| src/ai/backend/common/dto/manager/v2/vfolder/response.py | Adds paginated search payload DTOs for admin and my-search endpoints. |
| src/ai/backend/common/dto/manager/v2/vfolder/request.py | Adds pagination input DTOs for admin and my-search endpoints. |
| changes/10569.feature.md | Changelog entry for the new VFolder adapter/search functionality. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Align with codebase convention of _{data_type}_to_node naming pattern.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
VFolderAdapterclass inapi/adapters/vfolder.pyextendingBaseAdapter_service_info_to_node()conversion helper mapping service-layer types (VFolderBaseInfo, VFolderOwnershipInfo, VFolderUsageInfo) to nested DTO VFolderNode (BasicInfo, PermissionInfo, OwnerInfo, UsageInfo)Test plan
pants checkpasses for manager package_to_vfolder_node()maps all field groups with correct enum conversionsResolves BA-5425