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

fix: avoid checking max_vfolder_count #1397

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions changes/1397.fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Allow projcet vfolder creation regardless of the user (keypair) vfolder count limit
2 changes: 1 addition & 1 deletion src/ai/backend/manager/api/vfolder.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ async def create(request: web.Request, params: Any) -> web.Response:
if keypair_resource_policy["max_vfolder_count"] > 0:
query = sa.select([sa.func.count()]).where(vfolders.c.user == user_uuid)
result = await conn.scalar(query)
if result >= keypair_resource_policy["max_vfolder_count"]:
if result >= keypair_resource_policy["max_vfolder_count"] and ownership_type == "user":
raise InvalidAPIParameters("You cannot create more vfolders.")

# DEPRECATED: Limit vfolder size quota if it is larger than max_vfolder_size of the resource policy.
Expand Down