feat(controller): added reconciliation of inferenceservice url#960
Conversation
6c38ab1 to
99e8b4b
Compare
Signed-off-by: Alessio Pragliola <seth.pro@gmail.com>
Signed-off-by: Alessio Pragliola <seth.pro@gmail.com>
99e8b4b to
636d409
Compare
Signed-off-by: Alessio Pragliola <seth.pro@gmail.com>
|
/cc @pboyd |
| } | ||
|
|
||
| if isvc.Status.URL != nil { | ||
| (*isCreate.CustomProperties)["url"].MetadataStringValue.StringValue = isvc.Status.URL.String() |
There was a problem hiding this comment.
You need to initialize CustomProperties before this, right? (I think you have the same situation as this, which panics).
There was a problem hiding this comment.
Need test cases for all combinations of url and customProperties set/unset, etc. in controller_test.go to verify.
| } | ||
|
|
||
| if isvc.Status.URL != nil { | ||
| (*isCreate.CustomProperties)["url"].MetadataStringValue.StringValue = isvc.Status.URL.String() |
There was a problem hiding this comment.
Need test cases for all combinations of url and customProperties set/unset, etc. in controller_test.go to verify.
| handler := http.NewServeMux() | ||
|
|
||
| servingEnvironments := new(sync.Map) | ||
| inferenceServices := new(sync.Map) |
There was a problem hiding this comment.
Maybe I missed it, but it doesn't look like these sync maps are needed, does it?
There was a problem hiding this comment.
I was trying them while debugging a weird bug in tests and I forgot to switch back to regular maps, good catch reverted in 5847b3c
There was a problem hiding this comment.
If I'm not mistaken, there is only one hardcoded id 1 being used. If so, does it even need a map?
There was a problem hiding this comment.
Not for the time being, I'm going to keep it in case of more complex scenarios
|
@dhirajsb: changing LGTM is restricted to collaborators DetailsIn response to this: Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Co-authored-by: Paul Boyd <paul@camelot.email> Signed-off-by: Alessio Pragliola <83355398+Al-Pragliola@users.noreply.github.com>
Co-authored-by: Paul Boyd <paul@camelot.email> Signed-off-by: Alessio Pragliola <seth.pro@gmail.com>
Signed-off-by: Alessio Pragliola <seth.pro@gmail.com>
Signed-off-by: Alessio Pragliola <seth.pro@gmail.com>
|
added more tests @dhirajsb |
|
@dhirajsb: changing LGTM is restricted to collaborators DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: tarilabs The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/lgtm |
needs #917
Description
In this PR, I have added a new field to the InferenceService customProperties, which is the 'url' field.
This field is used to reconcile the url from the status of the cluster InferenceService, and update the url in the customProperties.
Also, I have also added new unit tests to test the new functionality.
Why a customProperty and not a first class field?
Because the url is part of the InferenceService status, and not the spec so it is ephemeral and should be treated as such in my opinion.
How Has This Been Tested?
make testAnd also, I have created a mock controller that periodically updates the URL in the InferenceService status, and the URL in the customProperties is updated accordingly.
Merge criteria:
DCOcheck)ok-to-testhas been added to the PR.