8000 disallow undeploy and redeploy of version endpoint in pending deployment by vinoth-gojek · Pull Request #635 · caraml-dev/merlin · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

disallow undeploy and redeploy of version endpoint in pending deployment #635

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

Merged
merged 4 commits into from
Mar 26, 2025

Conversation

vinoth-gojek
Copy link
Contributor
@vinoth-gojek vinoth-gojek commented Mar 14, 2025

Description

Right now, the model version endpoints in pending state is not allowed to be redeployed/undeployed from UI. But the same is possible via sdk
The change disallow the undeploy and redeploy of version endpoint in pending deployment state

Checklist

  • Added PR label
  • Added unit test, integration, and/or e2e tests
  • Tested locally
  • Updated documentation
  • Update Swagger spec if the PR introduce API changes
  • Regenerated Golang and Python client if the PR introduces API changes

Tested by using an endpoint in pending and the undeploy and redeploy were blocked as expected

➜ ✗ curl localhost:8080/v1/models/411/versions/2/endpoint/4308d895-541d-40e7-b0f8-4e0d7c3ac669 -X PUT
{"error":"Version Endpoint 4308d895-541d-40e7-b0f8-4e0d7c3ac669 is still pending and cannot be redeployed"}
➜ ✗ curl localhost:8080/v1/models/411/versions/2/endpoint/4308d895-541d-40e7-b0f8-4e0d7c3ac669 -X DELETE
{"error":"Version Endpoint 4308d895-541d-40e7-b0f8-4e0d7c3ac669 is still pending and cannot be undeployed"}

@vinoth-gojek vinoth-gojek added the enhancement New feature or request label Mar 14, 2025
@vinoth-gojek vinoth-gojek force-pushed the block_undeploy_redeploy_version_endpoint_pending branch from f6c5a70 to 6d0106a Compare March 14, 2025 09:36
@vinoth-gojek vinoth-gojek force-pushed the block_undeploy_redeploy_version_endpoint_pending branch from 6d0106a to 5946640 Compare March 14, 2025 09:37
Copy link
Contributor
@deadlycoconuts deadlycoconuts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! But can we just add a unit test for this if it's not too complicated? 😅

@vinoth-gojek
Copy link
Contributor Author

hi @deadlycoconuts yes, I have added tests.
Also realised the UpdateEndpoint is already handling the scenario of "disallowing pending deployments from redeployments". So modified to add the check only for delete endpoint

@deadlycoconuts
Copy link
Contributor
deadlycoconuts commented Mar 17, 2025

Got it, thanks for adding the unit tests! Feel free to merge this anytime! 🚀

@vinoth-gojek vinoth-gojek merged commit dbdee07 into main Mar 26, 2025
33 checks passed
@vinoth-gojek vinoth-gojek deleted the block_undeploy_redeploy_version_endpoint_pending branch March 26, 2025 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0