Skip to content

Commit

Permalink
fix: change max_vfolder_count type from BigInt to Int (#1643)
Browse files Browse the repository at this point in the history
  • Loading branch information
agatha197 authored Oct 23, 2023
1 parent cb9dcb9 commit c011743
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions changes/1643.fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
To resolve the type mismatch between DB and schema, changed all schema types of `max_vfolder_count` to int.
12 changes: 6 additions & 6 deletions src/ai/backend/manager/models/resource_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ class UserResourcePolicy(graphene.ObjectType):
id = graphene.ID(required=True)
name = graphene.String(required=True)
created_at = GQLDateTime(required=True)
max_vfolder_count = BigInt()
max_vfolder_count = graphene.Int()
max_vfolder_size = BigInt() # aliased field
max_quota_scope_size = BigInt()

Expand Down Expand Up @@ -482,12 +482,12 @@ async def batch_load_by_user(


class CreateUserResourcePolicyInput(graphene.InputObjectType):
max_vfolder_count = BigInt(required=True)
max_vfolder_count = graphene.Int(required=True)
max_quota_scope_size = BigInt(required=True)


class ModifyUserResourcePolicyInput(graphene.InputObjectType):
max_vfolder_count = BigInt(required=True)
max_vfolder_count = graphene.Int(required=True)
max_quota_scope_size = BigInt(required=True)


Expand Down Expand Up @@ -585,7 +585,7 @@ class ProjectResourcePolicy(graphene.ObjectType):
id = graphene.ID(required=True)
name = graphene.String(required=True)
created_at = GQLDateTime(required=True)
max_vfolder_count = BigInt()
max_vfolder_count = graphene.Int()
max_vfolder_size = BigInt() # aliased field
max_quota_scope_size = BigInt()

Expand Down Expand Up @@ -660,12 +660,12 @@ async def batch_load_by_project(


class CreateProjectResourcePolicyInput(graphene.InputObjectType):
max_vfolder_count = BigInt(required=True)
max_vfolder_count = graphene.Int(required=True)
max_quota_scope_size = BigInt(required=True)


class ModifyProjectResourcePolicyInput(graphene.InputObjectType):
max_vfolder_count = BigInt(required=True)
max_vfolder_count = graphene.Int(required=True)
max_quota_scope_size = BigInt(required=True)


Expand Down

0 comments on commit c011743

Please sign in to comment.