Skip to content
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

refactor(BA-589): Apply pydantic handling decorator to VFolder APIs in storage-proxy (#3562) #3565

Open
wants to merge 7 commits into
base: feat/add-pydantic-handling-decorator-for-req-res
Choose a base branch
from

Conversation

MintCat98
Copy link

@MintCat98 MintCat98 commented Feb 3, 2025

resolves #3562 (BA-589)

Applied pydantic decorator to vfolder APIs in sotrage-proxy.
Tests are not done yet.

Checklist: (if applicable)

  • Milestone metadata specifying the target backport version
  • Mention to the original issue
  • Installer updates including:
    • Fixtures for db schema changes
    • New mandatory config options
  • Update of end-to-end CLI integration tests in ai.backend.test
  • API server-client counterparts (e.g., manager API -> client SDK)
  • Test case(s) to:
    • Demonstrate the difference of before/after
    • Demonstrate the flow of abstract/conceptual models with a concrete implementation
  • Documentation
    • Contents in the docs directory
    • docstrings in public interfaces and type annotations

📚 Documentation preview 📚: https://sorna--3565.org.readthedocs.build/en/3565/


📚 Documentation preview 📚: https://sorna-ko--3565.org.readthedocs.build/ko/3565/

@github-actions github-actions bot added area:docs Documentations comp:common Related to Common component comp:storage-proxy Related to Storage proxy component size:XL 500~ LoC labels Feb 3, 2025
@MintCat98 MintCat98 force-pushed the refactor/apply-decorator branch from efcd288 to 5475cce Compare February 3, 2025 06:18
@MintCat98 MintCat98 changed the base branch from main to feat/add-pydantic-handling-decorator-for-req-res February 4, 2025 01:45
@MintCat98 MintCat98 changed the title refactor(BA-575): Apply pydantic handling decorator to VFolder APIs in storage-proxy (#3562) refactor(BA-589): Apply pydantic handling decorator to VFolder APIs in storage-proxy (#3562) Feb 4, 2025
@MintCat98
Copy link
Author

I wrote down wrong Jira number in commit messages.
I will revise them when I revise test code.

Comment on lines +1 to +25
# import uuid
# from pathlib import Path
# from unittest.mock import AsyncMock

# import pytest
# from aiohttp import web

# from ai.backend.common.types import BinarySize, QuotaConfig, QuotaScopeID, QuotaScopeType, VFolderID
# from ai.backend.storage.api.vfolder.manager_handler import VFolderHandler
# from ai.backend.storage.api.vfolder.response_model import (
# GetVolumeResponseModel,
# NoContentResponseModel,
# ProcessingResponseModel,
# QuotaScopeResponseModel,
# VFolderMetadataResponseModel,
# )
# from ai.backend.storage.api.vfolder.types import (
# QuotaScopeIDModel,
# QuotaScopeMetadataModel,
# VFolderIDModel,
# VFolderMetadataModel,
# VolumeIDModel,
# VolumeMetadataListModel,
# VolumeMetadataModel,
# )
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why are all the test codes set as comments?

Copy link
Author

@MintCat98 MintCat98 Feb 4, 2025

Choose a reason for hiding this comment

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

I haven’t yet modified the necessary parts of the test code due to the decorator update, which is causing continuous errors, so I temporarily commented it out as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:docs Documentations comp:common Related to Common component comp:storage-proxy Related to Storage proxy component size:XL 500~ LoC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Apply pydantic handling decorator to VFolder APIs in storage-proxy
2 participants