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 Deployment model definition #271

Merged
merged 1 commit into from
Mar 21, 2024
Merged

Conversation

mattt
Copy link
Member

@mattt mattt commented Mar 21, 2024

#258 added fields to the Deployment model provided by the new deployments.{get,list,update} endpoints. However, those were implemented against a version of the OpenAPI specification that disagreed with the actual API responses. Specifically, the min_instances and max_instances properties were listed as subproperties of a scaling object rather than direct fields. The result — as reported in #270 — was Pydantic validation errors like this:

raise validation_error
pydantic.v1.error_wrappers.ValidationError: 1 validation error for Deployment
current_release -> configuration -> scaling
field required (type=value_error.missing)"

This PR updates the Deployment model to correctly locate min_instances and max_instances as properties of current_release.configuration.

Signed-off-by: Mattt Zmuda <mattt@replicate.com>
@mattt mattt merged commit 111e5c2 into main Mar 21, 2024
7 checks passed
@mattt mattt deleted the mattt/remove-scaling-property branch March 21, 2024 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant