Skip to content

Commit

Permalink
Deployment.concurrency_limit cannot be zero. (#15228)
Browse files Browse the repository at this point in the history
  • Loading branch information
collincchoy authored Sep 5, 2024
1 parent 0dedc32 commit ce50e5e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/3.0/api-ref/rest-api/server/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -15125,7 +15125,7 @@
"anyOf": [
{
"type": "integer",
"minimum": 0.0
"exclusiveMinimum": 0.0
},
{
"type": "null"
Expand Down Expand Up @@ -16352,7 +16352,7 @@
"anyOf": [
{
"type": "integer",
"minimum": 0.0
"exclusiveMinimum": 0.0
},
{
"type": "null"
Expand Down
4 changes: 2 additions & 2 deletions src/prefect/server/schemas/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ class DeploymentCreate(ActionBaseModel):
default_factory=list,
description="A list of schedules for the deployment.",
)
concurrency_limit: Optional[NonNegativeInteger] = Field(
concurrency_limit: Optional[PositiveInteger] = Field(
default=None, description="The deployment's concurrency limit."
)
enforce_parameter_schema: bool = Field(
Expand Down Expand Up @@ -267,7 +267,7 @@ def remove_old_fields(cls, values):
default_factory=list,
description="A list of schedules for the deployment.",
)
concurrency_limit: Optional[NonNegativeInteger] = Field(
concurrency_limit: Optional[PositiveInteger] = Field(
default=None, description="The deployment's concurrency limit."
)
parameters: Optional[Dict[str, Any]] = Field(
Expand Down
2 changes: 1 addition & 1 deletion src/prefect/server/schemas/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ class Deployment(ORMBaseModel):
schedules: List[DeploymentSchedule] = Field(
default_factory=list, description="A list of schedules for the deployment."
)
concurrency_limit: Optional[NonNegativeInteger] = Field(
concurrency_limit: Optional[PositiveInteger] = Field(
default=None, description="The concurrency limit for the deployment."
)
job_variables: Dict[str, Any] = Field(
Expand Down

0 comments on commit ce50e5e

Please sign in to comment.