Skip to content

feat(BA-5425): Create VFolder Adapter skeleton with conversion helpers#10569

Open
seedspirit wants to merge 5 commits intomainfrom
BA-5425
Open

feat(BA-5425): Create VFolder Adapter skeleton with conversion helpers#10569
seedspirit wants to merge 5 commits intomainfrom
BA-5425

Conversation

@seedspirit
Copy link
Contributor

@seedspirit seedspirit commented Mar 26, 2026

Summary

  • Create VFolderAdapter class in api/adapters/vfolder.py extending BaseAdapter
  • Implement _service_info_to_node() conversion helper mapping service-layer types (VFolderBaseInfo, VFolderOwnershipInfo, VFolderUsageInfo) to nested DTO VFolderNode (BasicInfo, PermissionInfo, OwnerInfo, UsageInfo)
  • Method stubs for get(), admin_search(), my_search() (implementations in BA-5440, BA-5441)

Test plan

  • pants check passes for manager package
  • VFolderAdapter class extends BaseAdapter correctly
  • _to_vfolder_node() maps all field groups with correct enum conversions

Resolves BA-5425

seedspirit and others added 2 commits March 26, 2026 17:20
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>
Copilot AI review requested due to automatic review settings March 26, 2026 08:39
@github-actions github-actions bot added size:L 100~500 LoC comp:manager Related to Manager component comp:common Related to Common component labels Mar 26, 2026
seedspirit added a commit that referenced this pull request Mar 26, 2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 VFolderAdapter with get(), admin_search(), and my_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 nested VFolderNode DTOs.

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.

@github-actions github-actions bot added size:M 30~100 LoC and removed size:L 100~500 LoC labels Mar 26, 2026
@seedspirit seedspirit changed the title feat(BA-5425): create VFolder adapter with get/search methods feat(BA-5425): create VFolder Adapter skeleton with conversion helpers Mar 26, 2026
@seedspirit seedspirit changed the title feat(BA-5425): create VFolder Adapter skeleton with conversion helpers feat(BA-5425): Create VFolder Adapter skeleton with conversion helpers Mar 26, 2026
seedspirit and others added 3 commits March 26, 2026 18:38
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>
@seedspirit seedspirit added this to the 26.4 milestone Mar 26, 2026
@seedspirit seedspirit requested a review from a team March 26, 2026 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp:common Related to Common component comp:manager Related to Manager component size:M 30~100 LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants