8000 Auto-update annotation for isvc. by andresllh · Pull Request #4342 · kserve/kserve · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Auto-update annotation for isvc. #4342

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

Open
wants to merge 24 commits into
base: master
Choose a base branch
from

Conversation

andresllh
Copy link
Contributor

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #3299

Type of changes
Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Feature/Issue validation/testing:

Please describe the tests that you ran to verify your changes and relevant result summary. Provide instructions so it can be reproduced.
Please also list any relevant details for your test configuration.

  • Test A No Annotation
  1. Created a serving runtime
  2. Created an isvc that uses that serving runtime and no annotation
  3. Verified that the deployment has been created with the image specified in the serving runtime
  4. Updated the serving runtime spec.containers[0].image with a new image
  5. Verified that the deployment now had the updated image
  • Test B Annotation set to auto-update=true
  1. Created a serving runtime
  2. Created an isvc that uses that serving runtime with the annotation set to true
  3. Verified the deployment was created correctly
  4. Updated the serving runtime spec.containers[0].image with a new image
  5. Verified that the deployment now had the updated image
  • Test C Annotation set to auto-update=false
  1. Created a serving runtime
  2. Created an isvc that uses that serving runtime with the annotation set to true
  3. Verified the deployment was created correctly
  4. Updated the serving runtime spec.containers[0].image with a new image
  5. Verified that the deployment DID NOT have the updated image
  • Logs

Special notes for your reviewer:

  1. Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

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?
  • Have you made corresponding changes to the documentation?

Release note:


Re-running failed tests

  • /rerun-all - rerun all failed workflows.
  • /rerun-workflow <workflow name> - rerun a specific failed workflow. Only one workflow name can be specified. Multiple /rerun-workflow commands are allowed per comment.

@andresllh andresllh force-pushed the fix-e2e-graph-tests-kserve-upstream branch from a4d4c44 to 886db72 Compare March 27, 2025 20:28
@andresllh
Copy link
Contributor Author

/cc @spolti @israel-hdez

@andresllh andresllh changed the title [RHOAIENG-7127] Auto-update annotation for isvc. Auto-update annotation for isvc. Mar 28, 2025
Copy link
Contributor
@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

terrytangyuan
terrytangyuan previously approved these changes Apr 4, 2025
Copy link
Member
@terrytangyuan terrytangyuan left a comment

Choose a reason for hiding this comment

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

Thanks!

/lgtm
/approve

@andresllh
Copy link
Contributor Author

/rerun-all

1 similar comment
@andresllh
Copy link
Contributor Author
andresllh commented < 8000 a href="#issuecomment-2783702121" id="issuecomment-2783702121-permalink" class="Link--secondary js-timestamp">Apr 7, 2025

/rerun-all

terrytangyuan
terrytangyuan previously approved these changes Apr 7, 2025
Copy link
Member
@terrytangyuan terrytangyuan left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@andresllh
Copy link
Contributor Author

/rerun-all

@andresllh andresllh force-pushed the fix-e2e-graph-tests-kserve-upstream branch from b8b563f to c0c750c Compare April 7, 2025 18:47
@yuzisun
Copy link
Member
yuzisun commented Apr 8, 2025

@andresllh from what I understand even when the annotation auto-update is set to false, the kserve controller can still “auto” update the deployment with period resync which happens every 10 hours. It is a bit counterintuitive for users with this behavior.

@andresllh
Copy link
Contributor Author

@andresllh from what I understand even when the annotation auto-update is set to false, the kserve controller can still “auto” update the deployment with period resync which happens every 10 hours. It is a bit counterintuitive for users with this behavior.

@yuzisun based my implementation on this open issue. Specifically @Jooho comment. #3299 (comment)

@andresllh
Copy link
Contributor Author

/rerun-all

1 similar comment
@andresllh
Copy link
Contributor Author

/rerun-all

@andresllh andresllh force-pushed the fix-e2e-graph-tests-kserve-upstream branch from 4e9f15e to 7239beb Compare April 8, 2025 19:10
@terrytangyuan
Copy link
Member

/lgtm
/approve

github-actions[bot]
github-actions bot previously approved these changes Apr 8, 2025
@github-actions github-actions bot added the lgtm label Apr 8, 2025
@terrytangyuan terrytangyuan removed the lgtm label Apr 8, 2025
@terrytangyuan terrytangyuan requested a review from yuzisun April 8, 2025 19:16
@terrytangyuan
Copy link
Member

Let’s make sure the comment from @yuzisun is addressed. @yuzisun Can you take another look?

@sivanantha321
Copy link
Member

@andresllh I think this needs a rebase from master

@spolti
Copy link
Contributor
spolti commented Apr 14, 2025

@andresllh can you please sign your commits?

@andresllh andresllh force-pushed the fix-e2e-graph-tests-kserve-upstream branch from a7db076 to 708ef8b Compare April 15, 2025 13:58
@andresllh
Copy link
Contributor Author

/rerun-all

@andresllh
Copy link
Contributor Author

@yuzisun do you still have any comments or concerns regarding this?

@israel-hdez
Copy link
Contributor

@andresllh from what I understand even when the annotation auto-update is set to false, the kserve controller can still “auto” update the deployment with period resync which happens every 10 hours. It is a bit counterintuitive for users with this behavior.

I agree with this. If we want a consistent experience, we need a way to freeze the deployment.

if isvc.Spec.Predictor.Model.ProtocolVersion == nil {
continue
}
if slices.Contains(supportedModelFormatNames, isvc.Spec.Predictor.Model.ModelFormat.Name) && slices.Contains(protocolVersionsAsStrings, string(*isvc.Spec.Predictor.Model.ProtocolVersion)) {
Copy link
Member
@yuzisun yuzisun May 5, 2025

Choose a reason for hiding this comment

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

runtime matching also includes priority, if the lower priority runtime is updated the inference service probably should not be reconciled. Also there is case that user explicitly the serving runtime name.

cc @sivanantha321 to take a look at this, feel it is duplicating with the logic we have in other places.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good, let me know how you would like me to proceed with this. I'll wait for a response from @sivanantha321 as well before I make any changes.

Copy link
Member
@sivanantha321 sivanantha321 May 13, 2025

Choose a reason for hiding this comment

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

@andresllh How about adding a field for runtime in the ISVC status ? This will be also useful for the users to track what runtime is used by the current revision of ISVC. In this way we can avoid the complexities here. If the runtime name matches with the status field, we trigger the reconcil 9E88 e request for that ISVC.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sivanantha321 that is a great idea, any objections @israel-hdez @yuzisun?
If not, I'll start on making this update.

Copy link
Contributor

Choose a reason for hiding this comment

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

One question, though, shouldn't it be updated in case the SR is updated, regardless of whether the ISVC has the annotation?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correct, that is the current behavior. If the SR is updated and ISVC has the auto-update annotation set to true, or if it's missing, then it will update the ISVC.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Only if the auto-update annotation is set to false will it skip over.

Copy link
Contributor

Choose a reason for hiding this comment

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

right.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, the idea proposed by @sivanantha321 would make things easier as well.
+1 to the suggested approach.

@spolti spolti self-requested a review May 16, 2025 13:59
andresllh added 4 commits May 21, 2025 16:21
…new servingRuntimeName to isvc status

Signed-off-by: Andres Llausas <allausas@redhat.com>
Signed-off-by: Andres Llausas <allausas@redhat.com>
…on initial creation.

Signed-off-by: Andres Llausas <allausas@redhat.com>
Signed-off-by: Andres Llausas <allausas@redhat.com>
@andresllh
Copy link
Contributor Author

@spolti @yuzisun @sivanantha321 I've made the changes. Can you please review when you get a chance?

@andresllh
Copy link
Contributor Author

@andresllh from what I understand even when the annotation auto-update is set to false, the kserve controller can still “auto” update the deployment with period resync which happens every 10 hours. It is a bit counterintuitive for users with this behavior.

I agree with this. If we want a consistent experience, we need a way to freeze the deployment.

@israel-hdez my new implementation can "freeze" the deployment. Please take a look.

andresllh added 5 commits May 22, 2025 10:06
Signed-off-by: Andres Llausas <allausas@redhat.com>
Signed-off-by: Andres Llausas <allausas@redhat.com>
Signed-off-by: Andres Llausas <allausas@redhat.com>
Signed-off-by: Andres Llausas <allausas@redhat.com>
Signed-off-by: Andres Llausas <allausas@redhat.com>
Copy link
Contributor
@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.

Thanks @andresllh , imho it looks good.
/lgtm

@spolti
Copy link
Contributor
spolti commented Jun 3, 2025

@andresllh looks like there are some conflicts, can you please help with fixing them?

andresllh and others added 6 commits June 6, 2025 09:37
Signed-off-by: Andres Llausas <allausas@redhat.com>
Signed-off-by: Andres Llausas <allausas@redhat.com>
Signed-off-by: Andres Llausas <allausas@redhat.com>
@yuzisun
Copy link
Member
yuzisun commented Jun 11, 2025

@andresllh the test is failing

Summarizing 1 Failure:
  [FAIL] v1beta1 inference service controller When Updating a Serving Runtime [It] InferenceService should not reconcile the deployment if auto-update is disabled
  /home/runner/work/kserve/kserve/pkg/controller/v1beta1/inferenceservice/rawkube_controller_test.go:2330

@andresllh
Copy link
Contributor Author

@andresllh the test is failing

Summarizing 1 Failure:
  [FAIL] v1beta1 inference service controller When Updating a Serving Runtime [It] InferenceService should not reconcile the deployment if auto-update is disabled
  /home/runner/work/kserve/kserve/pkg/controller/v1beta1/inferenceservice/rawkube_controller_test.go:2330

@yuzisun Yeah, I'm looking into this. It passes when I run it locally, but for some reason it consistently fails in the CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update InferenceService when ServingRuntimes are updated
6 participants
0