-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Fix: error response handling for splitter and switch nodes #3116
Fix: error response handling for splitter and switch nodes #3116
Conversation
Signed-off-by: Rachit Chauhan <rachitchauhan43@gmail.com>
Signed-off-by: Rachit Chauhan <rachitchauhan43@gmail.com>
/cc @yuzisun |
Signed-off-by: Rachit Chauhan <rachitchauhan43@gmail.com>
Signed-off-by: Rachit Chauhan <rachitchauhan43@gmail.com>
@@ -104,40 +104,44 @@ type EnsembleStepOutput struct { | |||
StepStatusCode int | |||
} | |||
|
|||
// See if reviewer suggests a better name for this function | |||
func handleSplitterORSwitchNode(route *v1alpha1.InferenceStep, graph v1alpha1.InferenceGraphSpec, input []byte, headers http.Header) ([]byte, int, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why it is only applying to splitter or switch node ? The picked route can be any node type imo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the confusing name of the function. The intent here was ti pull out the common code that was repeating in Splitter and Switch if
sections.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you look at if-else
branches for Sequence
and Ensemble
, they already have the handling there. I can refactor more in future PRs.
Thanks @rachitchauhan43 ! Nice tests! /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rachitchauhan43, yuzisun 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:
Approvers can indicate their approval by writing |
* Refactoring common code to a function Signed-off-by: Rachit Chauhan <rachitchauhan43@gmail.com> * Added e2e test cases for splitter nodes Signed-off-by: Rachit Chauhan <rachitchauhan43@gmail.com> * Fixed linting errors Signed-off-by: Rachit Chauhan <rachitchauhan43@gmail.com> * Minor refactoring for error message Signed-off-by: Rachit Chauhan <rachitchauhan43@gmail.com> --------- Signed-off-by: Rachit Chauhan <rachitchauhan43@gmail.com> Signed-off-by: iamlovingit <freecode666@gmail.com>
…mp-ray * 'bump-ray' of https://github.com/ddelange/kserve: Bumping version for 0.11.1 (kserve#3141) Fix validation for custom storageUri (kserve#3134) Fix: error response handling for splitter and switch nodes (kserve#3116)
* 'master' of https://github.com/kserve/kserve: Unpack archive files for hdfs (kserve#3093) Upgrade istio Api and migrate to v1beta1 Api version (kserve#3150) Increase pytest workers for kourier e2e test (kserve#3151) chore: Add design doc template links to feature request template (kserve#3155) Make storage initializer image configurable (kserve#3145) Bumping version for 0.11.1 (kserve#3141) Fix validation for custom storageUri (kserve#3134) Fix: error response handling for splitter and switch nodes (kserve#3116)
* 'master' of https://github.com/kserve/kserve: Unpack archive files for hdfs (kserve#3093) Upgrade istio Api and migrate to v1beta1 Api version (kserve#3150) Increase pytest workers for kourier e2e test (kserve#3151) chore: Add design doc template links to feature request template (kserve#3155) Make storage initializer image configurable (kserve#3145) Bumping version for 0.11.1 (kserve#3141) Fix validation for custom storageUri (kserve#3134) Fix: error response handling for splitter and switch nodes (kserve#3116)
What this PR does / why we need it:
A bit of refactoring to keep router's code simple.
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: Does a refactoring to add uniformity to Splitter node handling. Also, added e2e tests for splitter node.
Type of changes
Please delete options that are not relevant.
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
Test B
Logs
Special notes for your reviewer:
Checklist:
Release note: