Skip to content

Commit

Permalink
fix: restore removed deprecated resource policy fields
Browse files Browse the repository at this point in the history
  • Loading branch information
fregataa committed Oct 31, 2023
1 parent 3bf2098 commit 2008788
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/ai/backend/manager/models/resource_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ class KeyPairResourcePolicy(graphene.ObjectType):
idle_timeout = BigInt()
allowed_vfolder_hosts = graphene.JSONString()

max_vfolder_count = graphene.Int(deprecation_reason="Deprecated since 23.09.4")
max_vfolder_size = BigInt(deprecation_reason="Deprecated since 23.09.4")
max_quota_scope_size = BigInt(deprecation_reason="Deprecated since 23.09.4")

@classmethod
def from_row(
cls,
Expand All @@ -161,6 +165,9 @@ def from_row(
max_containers_per_session=row["max_containers_per_session"],
idle_timeout=row["idle_timeout"],
allowed_vfolder_hosts=row["allowed_vfolder_hosts"].to_json(),
max_vfolder_count=0,
max_vfolder_size=0,
max_quota_scope_size=0,
)

@classmethod
Expand Down

0 comments on commit 2008788

Please sign in to comment.