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

Add support for deployments endpoints #258

Merged
merged 2 commits into from
Mar 19, 2024
Merged

Conversation

mattt
Copy link
Member

@mattt mattt commented Mar 15, 2024

@mattt mattt force-pushed the mattt/deployments-endpoints branch from 88c03a5 to 21dd8cd Compare March 18, 2024 12:52
@mattt mattt marked this pull request as ready for review March 18, 2024 13:30
Signed-off-by: Mattt Zmuda <mattt@replicate.com>
Signed-off-by: Mattt Zmuda <mattt@replicate.com>
@mattt mattt force-pushed the mattt/deployments-endpoints branch from 21dd8cd to 308b15c Compare March 19, 2024 10:42
@mattt mattt merged commit d7388c5 into main Mar 19, 2024
8 checks passed
@mattt mattt deleted the mattt/deployments-endpoints branch March 19, 2024 10:46
mattt added a commit that referenced this pull request 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>
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