Skip to content

docs(BA-3994): Add BEP-1036 for Artifact Storage Usage Tracking and Quota Enforcement#8565

Open
jopemachine wants to merge 9 commits intomainfrom
beps/1036_2
Open

docs(BA-3994): Add BEP-1036 for Artifact Storage Usage Tracking and Quota Enforcement#8565
jopemachine wants to merge 9 commits intomainfrom
beps/1036_2

Conversation

@jopemachine
Copy link
Member

@jopemachine jopemachine commented Feb 4, 2026

resolves #8198 (BA-3994)

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

@github-actions github-actions bot added the size:XL 500~ LoC label Feb 4, 2026
@jopemachine jopemachine added this to the 26.2 milestone Feb 4, 2026
@jopemachine jopemachine modified the milestones: 26.2, 26.3 Feb 20, 2026
@jopemachine jopemachine marked this pull request as ready for review March 5, 2026 05:07
Copilot AI review requested due to automatic review settings March 5, 2026 05:07
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 BEP-1036 documentation describing artifact storage usage tracking and quota enforcement for both default (StorageNamespace) and VFolder-destination imports.

Changes:

  • Add draft BEP document for unified quota pre-validation and proposed API surface.
  • Add supporting design notes for StorageNamespace quota and VFolder quota behavior.
  • Add a Towncrier news fragment announcing the documentation addition.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
proposals/BEP-1036/vfolder_storage.md Documents proposed VFolder quota pre-check flow and error behavior.
proposals/BEP-1036/storage_namespace.md Documents proposed StorageNamespace quota model, aggregation query, and API.
proposals/BEP-1036-artifact-storage-quota.md Main BEP describing unified quota service and overall system behavior.
changes/8205.docs.md Adds a changelog/news fragment entry for the new BEP.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

"""
Parse scope type from QuotaScopeID and query the appropriate resource policy.
"""
scope_type, scope_uuid = quota_scope_id.split(":", 1)
Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

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

In the _get_quota_scope_limit() example, quota_scope_id is typed as QuotaScopeID, but the snippet calls quota_scope_id.split(":", 1). In the current codebase QuotaScopeID is an attrs class (with scope_type/scope_id) and does not implement split(), so this example would not work as written. Update the snippet to use quota_scope_id.scope_type / quota_scope_id.scope_id (or convert to str(quota_scope_id) before parsing) to align with the actual type.

Suggested change
scope_type, scope_uuid = quota_scope_id.split(":", 1)
scope_type = quota_scope_id.scope_type
scope_uuid = str(quota_scope_id.scope_id)

Copilot uses AI. Check for mistakes.
@jopemachine jopemachine requested a review from a team March 5, 2026 05:18
Copy link
Member

@fregataa fregataa left a comment

Choose a reason for hiding this comment

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

Is the new feature planned for vfolder_storage only for now?
I am curious how other storages check quota in the import flow

@jopemachine
Copy link
Member Author

Details about how quota limits are handled for artifact storage are documented in storage_namespace.md in the BEP-1036 directory. (For vfolder storage, see vfolder_storage.md.) @fregataa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL 500~ LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Write BEP about ArtifactStorage quota limit

3 participants