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

On InferenceService deletion, validate no references to it #475

Conversation

israel-hdez
Copy link

@israel-hdez israel-hdez commented Jan 29, 2025

What this PR does / why we need it:

InferenceGraphs can reference InferenceServices to create an inference pipeline using multiple models. Deleting an InferenceService that is being referenced by an InferenceGraph can turn unusable the InferenceGraph.

This adds a validation to prevent deletion of InferenceServices that are being used in InferenceGraphs.

Fixes https://issues.redhat.com/browse/RHOAIENG-17829

Type of changes

  • Bug fix (non-breaking change which fixes an issue)

Feature/Issue validation/testing:

  1. Create some InferenceServices
  2. Create an InferenceGraph that uses some of the InferenceServices
  3. Try to delete an InferenceService that is used by the InferenceGraph
  • The InferenceService should be blocked from being deleted
  1. Try to delete an InferenceService that is NOT used by the InferenceGraph
  • The InferenceService should be deleted successfully

Checklist:

  • Have you added unit/e2e tests that prove your fix is effective or that this feature works?
  • Has code been commented, particularly in hard-to-understand areas?
  • [N/A] Have you made corresponding changes to the documentation?

Copy link
Member

@spolti spolti left a comment

Choose a reason for hiding this comment

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

may we contribute this with KServe upstream?

@israel-hdez
Copy link
Author

may we contribute this with KServe upstream?

@spolti Yes. This is the reason for doing it here, instead of odh-model-controller. I'll send a PR to upstream once you are good with this PR on our fork.

Copy link
Member

@spolti spolti left a comment

Choose a reason for hiding this comment

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

minor comment, otherwise looks good.

InferenceGraphs can reference InferenceServices to create an inference pipeline using multiple models. Deleting an InferenceService that is being referenced by an InferenceGraph can turn unusable the InferenceGraph.

This adds a validation to prevent deletion of InferenceServices that are being used in InferenceGraphs.

Signed-off-by: Edgar Hernández <[email protected]>
@israel-hdez israel-hdez force-pushed the j17829-prevent-deleting-referenced-isvcs branch from 7a7931b to 5e17418 Compare January 29, 2025 19:50
@VedantMahabaleshwarkar
Copy link

/approve

Copy link
Member

@spolti spolti left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link

openshift-ci bot commented Jan 29, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: israel-hdez, spolti, VedantMahabaleshwarkar

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [VedantMahabaleshwarkar,israel-hdez,spolti]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit 5325636 into opendatahub-io:release-v0.14 Jan 29, 2025
20 checks passed
@israel-hdez
Copy link
Author

may we contribute this with KServe upstream?

@spolti Proposed to upstream: kserve#4235

@israel-hdez israel-hdez deleted the j17829-prevent-deleting-referenced-isvcs branch February 7, 2025 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants