-
Notifications
You must be signed in to change notification settings - Fork 24
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
UPI E2E Test #262
UPI E2E Test #262
Conversation
* update fiber version and patch backward compatibility issues * update go mod to fork for testing * update go mod with fiber fix for testing * update mission control to use grpc fiber on env var * add missing setup go to workflow and fix linting * test workflow * test workflow * minor refactor on error message * update fiber version and minor tidy up * refactor errors from HTTPError to TuringError and logging to support grpc payloads * fix lint, add logging to grpc call * refactor metrics logging, extract common func * refactor folder structure. ignore experiment engine for grpc default turing strat * fix import * minor refactoring, add mission_control_grpc test * shifting logic between grpc and mission control grpc. added mc grpc test * add test for metrics and grpc server * add mock and fix metrics test * add log test * add benchmarking to upi * update interceptor as error response are not proto message * fix typo in benchmark payload * remove upi payload in http * refactor bencharmk, remove stopping of server * add upi large payload for http * removing upi payload for http missioncontrol as its similar to the existing payload test result * reverting workflow as not pointing to fork anymore * fix yaml indent * fix yaml indent * fix wrong yaml revert * renaming of grpc to upi and addition of protocol in config * Add grpc metadata transmission from fiber endpoint back to client * update upi proto and benchmark plain grpc gen client * add mock for transport stream for grpc unit test to work with sending header * update readme * refactoring base on PR comments * refactoring base on PR comments * create utilty to generate proto for benchmark. remove logger sync * minor refactoring to comment. change router protocol to be set as default for now * use latest implementation of fiber who reduce marshalling and usage of dynamicpb * update go fiber in api server and fix lintint * using fiber fork. introducing cmux for prom http on grpc * update fiber version * update api server config test file * rework benchmarking for http and grpc * refactor benchmarking * add benchmem to benchmark * refactor test upi server * minor refactoring on fiber package improts * fix config test indent Co-authored-by: ningjie.lee <ningjie.lee@gojek.com>
* Add protocol to router and routers in api server. Refactor and combine service+method of grpc config in fiber * fix integration and rename router protocol * fix integration e2e test * fix integration e2e test * fix migration script * patch router probe implementation * update e2e test files * fix typo in e2e file * add h2c container for upi router and remove httpmatches * changing endpoint for grpc, remove json unmarshalling for http * remove liveness probe for upi due to knative * add sdk changes for protocol * add assertion for e2e test for http protocol * make protocol default to http and add test * Mupdate fiber version and test e2e * update fiber version and test e2e * update go mod * test e2e * test e2e * test e2e * test e2e * test e2e * test e2e and add python e2e * test api and python e2e - patch json * test api and python e2e * test api and python e2e * test api and python e2e * test api and python e2e * test api and python e2e * test api and python e2e - update endpoint with port * test api and python e2e - update e2e endpoint * test api and python e2e - refactor and add debug to sdk * test api and python e2e - refactor and add debug to sdk * test api and python e2e - refactor and add debug to sdk * test api and python e2e - refactor and add debug to sdk * update go.mod * remove dns from mockserver for testing * patch sdk mockserver * remove python client option for python sdk e2e * minor refactor, rename container port name correctly * add basic upi and http service builder test * remove redundant make cmd * minor refactoring per pr comment * heavy refactoring, remove route_protocol * remove redundant code * update ci * update ci Co-authored-by: ningjie.lee <ningjie.lee@gojek.com>
* Grpc fiber integration with UPI in router (#238) * update fiber version and patch backward compatibility issues * update go mod to fork for testing * update go mod with fiber fix for testing * update mission control to use grpc fiber on env var * add missing setup go to workflow and fix linting * test workflow * test workflow * minor refactor on error message * update fiber version and minor tidy up * refactor errors from HTTPError to TuringError and logging to support grpc payloads * fix lint, add logging to grpc call * refactor metrics logging, extract common func * refactor folder structure. ignore experiment engine for grpc default turing strat * fix import * minor refactoring, add mission_control_grpc test * shifting logic between grpc and mission control grpc. added mc grpc test * add test for metrics and grpc server * add mock and fix metrics test * add log test * add benchmarking to upi * update interceptor as error response are not proto message * fix typo in benchmark payload * remove upi payload in http * refactor bencharmk, remove stopping of server * add upi large payload for http * removing upi payload for http missioncontrol as its similar to the existing payload test result * reverting workflow as not pointing to fork anymore * fix yaml indent * fix yaml indent * fix wrong yaml revert * renaming of grpc to upi and addition of protocol in config * Add grpc metadata transmission from fiber endpoint back to client * update upi proto and benchmark plain grpc gen client * add mock for transport stream for grpc unit test to work with sending header * update readme * refactoring base on PR comments * refactoring base on PR comments * create utilty to generate proto for benchmark. remove logger sync * minor refactoring to comment. change router protocol to be set as default for now * use latest implementation of fiber who reduce marshalling and usage of dynamicpb * update go fiber in api server and fix lintint * using fiber fork. introducing cmux for prom http on grpc * update fiber version * update api server config test file * rework benchmarking for http and grpc * refactor benchmarking * add benchmem to benchmark * refactor test upi server * minor refactoring on fiber package improts * fix config test indent Co-authored-by: ningjie.lee <ningjie.lee@gojek.com> * Simplify SelectRoute implementation * Implement traffic splitting for UPI * Move testutils to allow to be reused outside of fiberapi * Add test for TestUPIRequest * Add test for GetValueFromUPIRequest * Temporarily enable CI * Fix lint issue in engines/experiment * Change experiment engine sample base docker image to golang 1.18 * Fix test in routing_strategy_test.go * Fix lint error in router * Update go.mod * Reconfigure CI * Update openapi spec * Add traffic rules validation * Fix lint issue * Move back testutils to internal package * Rename GetValueFromRequest to GetValueFromHTTPRequest * Move traffic rules validation to validation package * Fix request_test.go * Rename GetValueFromRequest to GetValueFromHTTPRequest * Fix lint Co-authored-by: leonlnj <leenj.leon@gmail.com> Co-authored-by: ningjie.lee <ningjie.lee@gojek.com>
There were no particular tests that failed because of this. It's more that the enricher and ensembler's |
Yeah it looks like it's happening for enricher and ensembler only. I try increasing cpu request from 100m -> 200m . What is your recommended value @terryyylim ? |
Looks like increasing cpu request for ensembler and enricher is enough. The test is more stable (at least 3 times without failing) |
@pradithya I increased it to 200m too! 👍🏻 |
@terryyylim @krithika369 @leonlnj Good to merge? |
I didn't review the PR fully yet, I'll do it this morning. |
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.
LGTM
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.
LGTM! Thanks for digging into the flaky test cases too.
defer conn.Close() | ||
|
||
client := upiv1.NewUniversalPredictionServiceClient(conn) | ||
t.Log("Testing router endpoint with request that satisfy traffic rule treatment-1") |
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.
Nit: that satisfy traffic rule treatment-1
-> that generates treatment-a
?
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.
Updated
@@ -115,7 +115,7 @@ def __init__(self, field_source, field, values, *args, **kwargs): # noqa: E501 | |||
|
|||
Args: | |||
field_source (FieldSource): | |||
field (str): If `field_source` is `header`, then `field` should contain the name of the request header, otherwise, if `field_source` is `payload`, then `field` should be a valid json path | |||
field (str): For HTTP_JSON protocol, the valid `field_source` are `header` and `payload`. Whereas, for UPIV1 protocol the valid `field_source` are `header` and `prediction_context` If `field_source` is `header`, then `field` should contain the name of the request header, otherwise, if `field_source` is `payload`, then `field` should be a valid json path. If `field_source` is `header`, then `field` should contain the name of the request header, otherwise, if `field_source` is `prediction_context`, then `field` should contains variable name. |
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
field_source
isheader
, thenfield
should contain the name of the request header
I think this part of the comment is repeated. From the way the description is written here, it's not clear that the lines 2 and 3 correspond to different protocols and I'm not sure it's important to distinguish. Shall we simply remove the duplicated line?
description: >
For HTTP_JSON protocol, the valid `field_source` are `header` and `payload`. Whereas, for UPIV1 protocol the valid `field_source` are `header` and `prediction_context`
If `field_source` is `header`, then `field` should contain the name of the request header. If `field_source` is `payload`, then `field` should be a valid json path. If `field_source` is `prediction_context`, then `field` should contains variable name.
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.
Yeah, rephrased the documentation.
* Grpc fiber integration with UPI in router (#238) * update fiber version and patch backward compatibility issues * update go mod to fork for testing * update go mod with fiber fix for testing * update mission control to use grpc fiber on env var * add missing setup go to workflow and fix linting * test workflow * test workflow * minor refactor on error message * update fiber version and minor tidy up * refactor errors from HTTPError to TuringError and logging to support grpc payloads * fix lint, add logging to grpc call * refactor metrics logging, extract common func * refactor folder structure. ignore experiment engine for grpc default turing strat * fix import * minor refactoring, add mission_control_grpc test * shifting logic between grpc and mission control grpc. added mc grpc test * add test for metrics and grpc server * add mock and fix metrics test * add log test * add benchmarking to upi * update interceptor as error response are not proto message * fix typo in benchmark payload * remove upi payload in http * refactor bencharmk, remove stopping of server * add upi large payload for http * removing upi payload for http missioncontrol as its similar to the existing payload test result * reverting workflow as not pointing to fork anymore * fix yaml indent * fix yaml indent * fix wrong yaml revert * renaming of grpc to upi and addition of protocol in config * Add grpc metadata transmission from fiber endpoint back to client * update upi proto and benchmark plain grpc gen client * add mock for transport stream for grpc unit test to work with sending header * update readme * refactoring base on PR comments * refactoring base on PR comments * create utilty to generate proto for benchmark. remove logger sync * minor refactoring to comment. change router protocol to be set as default for now * use latest implementation of fiber who reduce marshalling and usage of dynamicpb * update go fiber in api server and fix lintint * using fiber fork. introducing cmux for prom http on grpc * update fiber version * update api server config test file * rework benchmarking for http and grpc * refactor benchmarking * add benchmem to benchmark * refactor test upi server * minor refactoring on fiber package improts * fix config test indent Co-authored-by: ningjie.lee <ningjie.lee@gojek.com> * [UPI] Api Server (#255) * Add protocol to router and routers in api server. Refactor and combine service+method of grpc config in fiber * fix integration and rename router protocol * fix integration e2e test * fix integration e2e test * fix migration script * patch router probe implementation * update e2e test files * fix typo in e2e file * add h2c container for upi router and remove httpmatches * changing endpoint for grpc, remove json unmarshalling for http * remove liveness probe for upi due to knative * add sdk changes for protocol * add assertion for e2e test for http protocol * make protocol default to http and add test * Mupdate fiber version and test e2e * update fiber version and test e2e * update go mod * test e2e * test e2e * test e2e * test e2e * test e2e * test e2e and add python e2e * test api and python e2e - patch json * test api and python e2e * test api and python e2e * test api and python e2e * test api and python e2e * test api and python e2e * test api and python e2e - update endpoint with port * test api and python e2e - update e2e endpoint * test api and python e2e - refactor and add debug to sdk * test api and python e2e - refactor and add debug to sdk * test api and python e2e - refactor and add debug to sdk * test api and python e2e - refactor and add debug to sdk * update go.mod * remove dns from mockserver for testing * patch sdk mockserver * remove python client option for python sdk e2e * minor refactor, rename container port name correctly * add basic upi and http service builder test * remove redundant make cmd * minor refactoring per pr comment * heavy refactoring, remove route_protocol * remove redundant code * update ci * update ci Co-authored-by: ningjie.lee <ningjie.lee@gojek.com> * UPI Traffic Splitting (#259) * Grpc fiber integration with UPI in router (#238) * update fiber version and patch backward compatibility issues * update go mod to fork for testing * update go mod with fiber fix for testing * update mission control to use grpc fiber on env var * add missing setup go to workflow and fix linting * test workflow * test workflow * minor refactor on error message * update fiber version and minor tidy up * refactor errors from HTTPError to TuringError and logging to support grpc payloads * fix lint, add logging to grpc call * refactor metrics logging, extract common func * refactor folder structure. ignore experiment engine for grpc default turing strat * fix import * minor refactoring, add mission_control_grpc test * shifting logic between grpc and mission control grpc. added mc grpc test * add test for metrics and grpc server * add mock and fix metrics test * add log test * add benchmarking to upi * update interceptor as error response are not proto message * fix typo in benchmark payload * remove upi payload in http * refactor bencharmk, remove stopping of server * add upi large payload for http * removing upi payload for http missioncontrol as its similar to the existing payload test result * reverting workflow as not pointing to fork anymore * fix yaml indent * fix yaml indent * fix wrong yaml revert * renaming of grpc to upi and addition of protocol in config * Add grpc metadata transmission from fiber endpoint back to client * update upi proto and benchmark plain grpc gen client * add mock for transport stream for grpc unit test to work with sending header * update readme * refactoring base on PR comments * refactoring base on PR comments * create utilty to generate proto for benchmark. remove logger sync * minor refactoring to comment. change router protocol to be set as default for now * use latest implementation of fiber who reduce marshalling and usage of dynamicpb * update go fiber in api server and fix lintint * using fiber fork. introducing cmux for prom http on grpc * update fiber version * update api server config test file * rework benchmarking for http and grpc * refactor benchmarking * add benchmem to benchmark * refactor test upi server * minor refactoring on fiber package improts * fix config test indent Co-authored-by: ningjie.lee <ningjie.lee@gojek.com> * Simplify SelectRoute implementation * Implement traffic splitting for UPI * Move testutils to allow to be reused outside of fiberapi * Add test for TestUPIRequest * Add test for GetValueFromUPIRequest * Temporarily enable CI * Fix lint issue in engines/experiment * Change experiment engine sample base docker image to golang 1.18 * Fix test in routing_strategy_test.go * Fix lint error in router * Update go.mod * Reconfigure CI * Update openapi spec * Add traffic rules validation * Fix lint issue * Move back testutils to internal package * Rename GetValueFromRequest to GetValueFromHTTPRequest * Move traffic rules validation to validation package * Fix request_test.go * Rename GetValueFromRequest to GetValueFromHTTPRequest * Fix lint Co-authored-by: leonlnj <leenj.leon@gmail.com> Co-authored-by: ningjie.lee <ningjie.lee@gojek.com> * Deploy 3 upi echo server in end to end test * Update incorrect test setup * Update python sdk * Add test helper * Update sdk * Simplify model name * Add test for traffic splitting * Include in test suite * Reduce mock server cpu request * Temporary comment passing tests * Add logging * Add debugging logs * Rename router for upi traffic splitting e2e test * Print properly * Improve assertion in the withDeployedRouter * Reduce cpu request for all e2e test * Add default_route_id * Move response logging before status code assertion * Add e2e test for standard ensembler * Rename router name * Associate control with all traffic rule * Fix incorrect router file name * Temporary disable sdk e2e test * Temporary exclude sdk test * Use require instead of assert * Change ordering of waiting for component ready * Shorten router name * Exclude tests * Add debugging code * Add pod log * Change protocol * Change protobuf equality check * Add more detailed error info * Try fiber without cloning * Replace deprecated library * Fix debugging code * Read configmap * Print type * Try printing configmap * Update fiber * Update end to end test for traffic rule * Fix unit tests in router * Update go.mod in turing api * Remove mockserver-b deployment since it's not used * Add end to end test for sdk * Reenable all end to end test * Reduce cpu resource request to improve e2e test stability * Remove debugging code * Fix formatting in README.md * Add debuging code for sdk e2e test * Change test name * Include UPI test * Change incorrect comment * Increase cpu request to 100m * Add kubectl top nodes before each e2e test group * Remove kubectl top nodes since it's not supported * Increase enricher and ensembler cpu request * Remove misleading comment * Update test comment * Update api spec comments and generated code Co-authored-by: leonlnj <leenj.leon@gmail.com> Co-authored-by: ningjie.lee <ningjie.lee@gojek.com>
* Grpc fiber integration with UPI in router (#238) * update fiber version and patch backward compatibility issues * update go mod to fork for testing * update go mod with fiber fix for testing * update mission control to use grpc fiber on env var * add missing setup go to workflow and fix linting * test workflow * test workflow * minor refactor on error message * update fiber version and minor tidy up * refactor errors from HTTPError to TuringError and logging to support grpc payloads * fix lint, add logging to grpc call * refactor metrics logging, extract common func * refactor folder structure. ignore experiment engine for grpc default turing strat * fix import * minor refactoring, add mission_control_grpc test * shifting logic between grpc and mission control grpc. added mc grpc test * add test for metrics and grpc server * add mock and fix metrics test * add log test * add benchmarking to upi * update interceptor as error response are not proto message * fix typo in benchmark payload * remove upi payload in http * refactor bencharmk, remove stopping of server * add upi large payload for http * removing upi payload for http missioncontrol as its similar to the existing payload test result * reverting workflow as not pointing to fork anymore * fix yaml indent * fix yaml indent * fix wrong yaml revert * renaming of grpc to upi and addition of protocol in config * Add grpc metadata transmission from fiber endpoint back to client * update upi proto and benchmark plain grpc gen client * add mock for transport stream for grpc unit test to work with sending header * update readme * refactoring base on PR comments * refactoring base on PR comments * create utilty to generate proto for benchmark. remove logger sync * minor refactoring to comment. change router protocol to be set as default for now * use latest implementation of fiber who reduce marshalling and usage of dynamicpb * update go fiber in api server and fix lintint * using fiber fork. introducing cmux for prom http on grpc * update fiber version * update api server config test file * rework benchmarking for http and grpc * refactor benchmarking * add benchmem to benchmark * refactor test upi server * minor refactoring on fiber package improts * fix config test indent Co-authored-by: ningjie.lee <ningjie.lee@gojek.com> * [UPI] Api Server (#255) * Add protocol to router and routers in api server. Refactor and combine service+method of grpc config in fiber * fix integration and rename router protocol * fix integration e2e test * fix integration e2e test * fix migration script * patch router probe implementation * update e2e test files * fix typo in e2e file * add h2c container for upi router and remove httpmatches * changing endpoint for grpc, remove json unmarshalling for http * remove liveness probe for upi due to knative * add sdk changes for protocol * add assertion for e2e test for http protocol * make protocol default to http and add test * Mupdate fiber version and test e2e * update fiber version and test e2e * update go mod * test e2e * test e2e * test e2e * test e2e * test e2e * test e2e and add python e2e * test api and python e2e - patch json * test api and python e2e * test api and python e2e * test api and python e2e * test api and python e2e * test api and python e2e * test api and python e2e - update endpoint with port * test api and python e2e - update e2e endpoint * test api and python e2e - refactor and add debug to sdk * test api and python e2e - refactor and add debug to sdk * test api and python e2e - refactor and add debug to sdk * test api and python e2e - refactor and add debug to sdk * update go.mod * remove dns from mockserver for testing * patch sdk mockserver * remove python client option for python sdk e2e * minor refactor, rename container port name correctly * add basic upi and http service builder test * remove redundant make cmd * minor refactoring per pr comment * heavy refactoring, remove route_protocol * remove redundant code * update ci * update ci Co-authored-by: ningjie.lee <ningjie.lee@gojek.com> * UPI Traffic Splitting (#259) * Grpc fiber integration with UPI in router (#238) * update fiber version and patch backward compatibility issues * update go mod to fork for testing * update go mod with fiber fix for testing * update mission control to use grpc fiber on env var * add missing setup go to workflow and fix linting * test workflow * test workflow * minor refactor on error message * update fiber version and minor tidy up * refactor errors from HTTPError to TuringError and logging to support grpc payloads * fix lint, add logging to grpc call * refactor metrics logging, extract common func * refactor folder structure. ignore experiment engine for grpc default turing strat * fix import * minor refactoring, add mission_control_grpc test * shifting logic between grpc and mission control grpc. added mc grpc test * add test for metrics and grpc server * add mock and fix metrics test * add log test * add benchmarking to upi * update interceptor as error response are not proto message * fix typo in benchmark payload * remove upi payload in http * refactor bencharmk, remove stopping of server * add upi large payload for http * removing upi payload for http missioncontrol as its similar to the existing payload test result * reverting workflow as not pointing to fork anymore * fix yaml indent * fix yaml indent * fix wrong yaml revert * renaming of grpc to upi and addition of protocol in config * Add grpc metadata transmission from fiber endpoint back to client * update upi proto and benchmark plain grpc gen client * add mock for transport stream for grpc unit test to work with sending header * update readme * refactoring base on PR comments * refactoring base on PR comments * create utilty to generate proto for benchmark. remove logger sync * minor refactoring to comment. change router protocol to be set as default for now * use latest implementation of fiber who reduce marshalling and usage of dynamicpb * update go fiber in api server and fix lintint * using fiber fork. introducing cmux for prom http on grpc * update fiber version * update api server config test file * rework benchmarking for http and grpc * refactor benchmarking * add benchmem to benchmark * refactor test upi server * minor refactoring on fiber package improts * fix config test indent Co-authored-by: ningjie.lee <ningjie.lee@gojek.com> * Simplify SelectRoute implementation * Implement traffic splitting for UPI * Move testutils to allow to be reused outside of fiberapi * Add test for TestUPIRequest * Add test for GetValueFromUPIRequest * Temporarily enable CI * Fix lint issue in engines/experiment * Change experiment engine sample base docker image to golang 1.18 * Fix test in routing_strategy_test.go * Fix lint error in router * Update go.mod * Reconfigure CI * Update openapi spec * Add traffic rules validation * Fix lint issue * Move back testutils to internal package * Rename GetValueFromRequest to GetValueFromHTTPRequest * Move traffic rules validation to validation package * Fix request_test.go * Rename GetValueFromRequest to GetValueFromHTTPRequest * Fix lint Co-authored-by: leonlnj <leenj.leon@gmail.com> Co-authored-by: ningjie.lee <ningjie.lee@gojek.com> * Upi exp engine (#263) * add parsing of proto to http for experiment engine * add new upi request type to persist payload to prevent multiple marshalling. refactor server.go and mc_upi for consistency * remove upi_response in fiberapi which is not required for now. rename upi_request to request.go * update test to use upi request * add upi test for routing strategy * add docs Co-authored-by: ningjie.lee <ningjie.lee@gojek.com> * UPI E2E Test (#262) * Grpc fiber integration with UPI in router (#238) * update fiber version and patch backward compatibility issues * update go mod to fork for testing * update go mod with fiber fix for testing * update mission control to use grpc fiber on env var * add missing setup go to workflow and fix linting * test workflow * test workflow * minor refactor on error message * update fiber version and minor tidy up * refactor errors from HTTPError to TuringError and logging to support grpc payloads * fix lint, add logging to grpc call * refactor metrics logging, extract common func * refactor folder structure. ignore experiment engine for grpc default turing strat * fix import * minor refactoring, add mission_control_grpc test * shifting logic between grpc and mission control grpc. added mc grpc test * add test for metrics and grpc server * add mock and fix metrics test * add log test * add benchmarking to upi * update interceptor as error response are not proto message * fix typo in benchmark payload * remove upi payload in http * refactor bencharmk, remove stopping of server * add upi large payload for http * removing upi payload for http missioncontrol as its similar to the existing payload test result * reverting workflow as not pointing to fork anymore * fix yaml indent * fix yaml indent * fix wrong yaml revert * renaming of grpc to upi and addition of protocol in config * Add grpc metadata transmission from fiber endpoint back to client * update upi proto and benchmark plain grpc gen client * add mock for transport stream for grpc unit test to work with sending header * update readme * refactoring base on PR comments * refactoring base on PR comments * create utilty to generate proto for benchmark. remove logger sync * minor refactoring to comment. change router protocol to be set as default for now * use latest implementation of fiber who reduce marshalling and usage of dynamicpb * update go fiber in api server and fix lintint * using fiber fork. introducing cmux for prom http on grpc * update fiber version * update api server config test file * rework benchmarking for http and grpc * refactor benchmarking * add benchmem to benchmark * refactor test upi server * minor refactoring on fiber package improts * fix config test indent Co-authored-by: ningjie.lee <ningjie.lee@gojek.com> * [UPI] Api Server (#255) * Add protocol to router and routers in api server. Refactor and combine service+method of grpc config in fiber * fix integration and rename router protocol * fix integration e2e test * fix integration e2e test * fix migration script * patch router probe implementation * update e2e test files * fix typo in e2e file * add h2c container for upi router and remove httpmatches * changing endpoint for grpc, remove json unmarshalling for http * remove liveness probe for upi due to knative * add sdk changes for protocol * add assertion for e2e test for http protocol * make protocol default to http and add test * Mupdate fiber version and test e2e * update fiber version and test e2e * update go mod * test e2e * test e2e * test e2e * test e2e * test e2e * test e2e and add python e2e * test api and python e2e - patch json * test api and python e2e * test api and python e2e * test api and python e2e * test api and python e2e * test api and python e2e * test api and python e2e - update endpoint with port * test api and python e2e - update e2e endpoint * test api and python e2e - refactor and add debug to sdk * test api and python e2e - refactor and add debug to sdk * test api and python e2e - refactor and add debug to sdk * test api and python e2e - refactor and add debug to sdk * update go.mod * remove dns from mockserver for testing * patch sdk mockserver * remove python client option for python sdk e2e * minor refactor, rename container port name correctly * add basic upi and http service builder test * remove redundant make cmd * minor refactoring per pr comment * heavy refactoring, remove route_protocol * remove redundant code * update ci * update ci Co-authored-by: ningjie.lee <ningjie.lee@gojek.com> * UPI Traffic Splitting (#259) * Grpc fiber integration with UPI in router (#238) * update fiber version and patch backward compatibility issues * update go mod to fork for testing * update go mod with fiber fix for testing * update mission control to use grpc fiber on env var * add missing setup go to workflow and fix linting * test workflow * test workflow * minor refactor on error message * update fiber version and minor tidy up * refactor errors from HTTPError to TuringError and logging to support grpc payloads * fix lint, add logging to grpc call * refactor metrics logging, extract common func * refactor folder structure. ignore experiment engine for grpc default turing strat * fix import * minor refactoring, add mission_control_grpc test * shifting logic between grpc and mission control grpc. added mc grpc test * add test for metrics and grpc server * add mock and fix metrics test * add log test * add benchmarking to upi * update interceptor as error response are not proto message * fix typo in benchmark payload * remove upi payload in http * refactor bencharmk, remove stopping of server * add upi large payload for http * removing upi payload for http missioncontrol as its similar to the existing payload test result * reverting workflow as not pointing to fork anymore * fix yaml indent * fix yaml indent * fix wrong yaml revert * renaming of grpc to upi and addition of protocol in config * Add grpc metadata transmission from fiber endpoint back to client * update upi proto and benchmark plain grpc gen client * add mock for transport stream for grpc unit test to work with sending header * update readme * refactoring base on PR comments * refactoring base on PR comments * create utilty to generate proto for benchmark. remove logger sync * minor refactoring to comment. change router protocol to be set as default for now * use latest implementation of fiber who reduce marshalling and usage of dynamicpb * update go fiber in api server and fix lintint * using fiber fork. introducing cmux for prom http on grpc * update fiber version * update api server config test file * rework benchmarking for http and grpc * refactor benchmarking * add benchmem to benchmark * refactor test upi server * minor refactoring on fiber package improts * fix config test indent Co-authored-by: ningjie.lee <ningjie.lee@gojek.com> * Simplify SelectRoute implementation * Implement traffic splitting for UPI * Move testutils to allow to be reused outside of fiberapi * Add test for TestUPIRequest * Add test for GetValueFromUPIRequest * Temporarily enable CI * Fix lint issue in engines/experiment * Change experiment engine sample base docker image to golang 1.18 * Fix test in routing_strategy_test.go * Fix lint error in router * Update go.mod * Reconfigure CI * Update openapi spec * Add traffic rules validation * Fix lint issue * Move back testutils to internal package * Rename GetValueFromRequest to GetValueFromHTTPRequest * Move traffic rules validation to validation package * Fix request_test.go * Rename GetValueFromRequest to GetValueFromHTTPRequest * Fix lint Co-authored-by: leonlnj <leenj.leon@gmail.com> Co-authored-by: ningjie.lee <ningjie.lee@gojek.com> * Deploy 3 upi echo server in end to end test * Update incorrect test setup * Update python sdk * Add test helper * Update sdk * Simplify model name * Add test for traffic splitting * Include in test suite * Reduce mock server cpu request * Temporary comment passing tests * Add logging * Add debugging logs * Rename router for upi traffic splitting e2e test * Print properly * Improve assertion in the withDeployedRouter * Reduce cpu request for all e2e test * Add default_route_id * Move response logging before status code assertion * Add e2e test for standard ensembler * Rename router name * Associate control with all traffic rule * Fix incorrect router file name * Temporary disable sdk e2e test * Temporary exclude sdk test * Use require instead of assert * Change ordering of waiting for component ready * Shorten router name * Exclude tests * Add debugging code * Add pod log * Change protocol * Change protobuf equality check * Add more detailed error info * Try fiber without cloning * Replace deprecated library * Fix debugging code * Read configmap * Print type * Try printing configmap * Update fiber * Update end to end test for traffic rule * Fix unit tests in router * Update go.mod in turing api * Remove mockserver-b deployment since it's not used * Add end to end test for sdk * Reenable all end to end test * Reduce cpu resource request to improve e2e test stability * Remove debugging code * Fix formatting in README.md * Add debuging code for sdk e2e test * Change test name * Include UPI test * Change incorrect comment * Increase cpu request to 100m * Add kubectl top nodes before each e2e test group * Remove kubectl top nodes since it's not supported * Increase enricher and ensembler cpu request * Remove misleading comment * Update test comment * Update api spec comments and generated code Co-authored-by: leonlnj <leenj.leon@gmail.com> Co-authored-by: ningjie.lee <ningjie.lee@gojek.com> * Update go mod sum * Fix go mod * Add nil check * Add debugging statement * Print error * Add more debugging statement in logging * Add debugging statement * Temporarily allow publishing from branch * Fix logging issue * Ensure that prediction id and request timestamp are populated * Refactor * Fix lint * Port UPI End to End test to ginkgo * Update UPI version * Update UPI version * Undo change in CI * Cleanup go mod and go sum * Rename field * Replace proto comparison with proto.Equal * Minor refactoring * Log upi proto as json * Revert changes to CI condition * Translate BadResponse to status code internal * Fix test * Update ginkgo version * Remove log.SetGlobalLogger in test to avoid data race * Fix test * Update ginkgo version in Makefile * Fix lint * Pin ginkgo and gomega version * Update comment in SelectRoute * Remove CreateFiberRequestHandler * Add logging in test * Update e2e test description * Move import * Update TODO * Fix lint Co-authored-by: ningjie.lee <ningjie.lee@gojek.com> Co-authored-by: aria <pradithya.aria@gmail.com> Co-authored-by: Pradithya Aria <pradithya.pura@go-jek.com>
* Grpc fiber integration with UPI in router (#238) * update fiber version and patch backward compatibility issues * update go mod to fork for testing * update go mod with fiber fix for testing * update mission control to use grpc fiber on env var * add missing setup go to workflow and fix linting * test workflow * test workflow * minor refactor on error message * update fiber version and minor tidy up * refactor errors from HTTPError to TuringError and logging to support grpc payloads * fix lint, add logging to grpc call * refactor metrics logging, extract common func * refactor folder structure. ignore experiment engine for grpc default turing strat * fix import * minor refactoring, add mission_control_grpc test * shifting logic between grpc and mission control grpc. added mc grpc test * add test for metrics and grpc server * add mock and fix metrics test * add log test * add benchmarking to upi * update interceptor as error response are not proto message * fix typo in benchmark payload * remove upi payload in http * refactor bencharmk, remove stopping of server * add upi large payload for http * removing upi payload for http missioncontrol as its similar to the existing payload test result * reverting workflow as not pointing to fork anymore * fix yaml indent * fix yaml indent * fix wrong yaml revert * renaming of grpc to upi and addition of protocol in config * Add grpc metadata transmission from fiber endpoint back to client * update upi proto and benchmark plain grpc gen client * add mock for transport stream for grpc unit test to work with sending header * update readme * refactoring base on PR comments * refactoring base on PR comments * create utilty to generate proto for benchmark. remove logger sync * minor refactoring to comment. change router protocol to be set as default for now * use latest implementation of fiber who reduce marshalling and usage of dynamicpb * update go fiber in api server and fix lintint * using fiber fork. introducing cmux for prom http on grpc * update fiber version * update api server config test file * rework benchmarking for http and grpc * refactor benchmarking * add benchmem to benchmark * refactor test upi server * minor refactoring on fiber package improts * fix config test indent Co-authored-by: ningjie.lee <ningjie.lee@gojek.com> * [UPI] Api Server (#255) * Add protocol to router and routers in api server. Refactor and combine service+method of grpc config in fiber * fix integration and rename router protocol * fix integration e2e test * fix integration e2e test * fix migration script * patch router probe implementation * update e2e test files * fix typo in e2e file * add h2c container for upi router and remove httpmatches * changing endpoint for grpc, remove json unmarshalling for http * remove liveness probe for upi due to knative * add sdk changes for protocol * add assertion for e2e test for http protocol * make protocol default to http and add test * Mupdate fiber version and test e2e * update fiber version and test e2e * update go mod * test e2e * test e2e * test e2e * test e2e * test e2e * test e2e and add python e2e * test api and python e2e - patch json * test api and python e2e * test api and python e2e * test api and python e2e * test api and python e2e * test api and python e2e * test api and python e2e - update endpoint with port * test api and python e2e - update e2e endpoint * test api and python e2e - refactor and add debug to sdk * test api and python e2e - refactor and add debug to sdk * test api and python e2e - refactor and add debug to sdk * test api and python e2e - refactor and add debug to sdk * update go.mod * remove dns from mockserver for testing * patch sdk mockserver * remove python client option for python sdk e2e * minor refactor, rename container port name correctly * add basic upi and http service builder test * remove redundant make cmd * minor refactoring per pr comment * heavy refactoring, remove route_protocol * remove redundant code * update ci * update ci Co-authored-by: ningjie.lee <ningjie.lee@gojek.com> * UPI Traffic Splitting (#259) * Grpc fiber integration with UPI in router (#238) * update fiber version and patch backward compatibility issues * update go mod to fork for testing * update go mod with fiber fix for testing * update mission control to use grpc fiber on env var * add missing setup go to workflow and fix linting * test workflow * test workflow * minor refactor on error message * update fiber version and minor tidy up * refactor errors from HTTPError to TuringError and logging to support grpc payloads * fix lint, add logging to grpc call * refactor metrics logging, extract common func * refactor folder structure. ignore experiment engine for grpc default turing strat * fix import * minor refactoring, add mission_control_grpc test * shifting logic between grpc and mission control grpc. added mc grpc test * add test for metrics and grpc server * add mock and fix metrics test * add log test * add benchmarking to upi * update interceptor as error response are not proto message * fix typo in benchmark payload * remove upi payload in http * refactor bencharmk, remove stopping of server * add upi large payload for http * removing upi payload for http missioncontrol as its similar to the existing payload test result * reverting workflow as not pointing to fork anymore * fix yaml indent * fix yaml indent * fix wrong yaml revert * renaming of grpc to upi and addition of protocol in config * Add grpc metadata transmission from fiber endpoint back to client * update upi proto and benchmark plain grpc gen client * add mock for transport stream for grpc unit test to work with sending header * update readme * refactoring base on PR comments * refactoring base on PR comments * create utilty to generate proto for benchmark. remove logger sync * minor refactoring to comment. change router protocol to be set as default for now * use latest implementation of fiber who reduce marshalling and usage of dynamicpb * update go fiber in api server and fix lintint * using fiber fork. introducing cmux for prom http on grpc * update fiber version * update api server config test file * rework benchmarking for http and grpc * refactor benchmarking * add benchmem to benchmark * refactor test upi server * minor refactoring on fiber package improts * fix config test indent Co-authored-by: ningjie.lee <ningjie.lee@gojek.com> * Simplify SelectRoute implementation * Implement traffic splitting for UPI * Move testutils to allow to be reused outside of fiberapi * Add test for TestUPIRequest * Add test for GetValueFromUPIRequest * Temporarily enable CI * Fix lint issue in engines/experiment * Change experiment engine sample base docker image to golang 1.18 * Fix test in routing_strategy_test.go * Fix lint error in router * Update go.mod * Reconfigure CI * Update openapi spec * Add traffic rules validation * Fix lint issue * Move back testutils to internal package * Rename GetValueFromRequest to GetValueFromHTTPRequest * Move traffic rules validation to validation package * Fix request_test.go * Rename GetValueFromRequest to GetValueFromHTTPRequest * Fix lint Co-authored-by: leonlnj <leenj.leon@gmail.com> Co-authored-by: ningjie.lee <ningjie.lee@gojek.com> * Upi exp engine (#263) * add parsing of proto to http for experiment engine * add new upi request type to persist payload to prevent multiple marshalling. refactor server.go and mc_upi for consistency * remove upi_response in fiberapi which is not required for now. rename upi_request to request.go * update test to use upi request * add upi test for routing strategy * add docs Co-authored-by: ningjie.lee <ningjie.lee@gojek.com> * UPI E2E Test (#262) * Grpc fiber integration with UPI in router (#238) * update fiber version and patch backward compatibility issues * update go mod to fork for testing * update go mod with fiber fix for testing * update mission control to use grpc fiber on env var * add missing setup go to workflow and fix linting * test workflow * test workflow * minor refactor on error message * update fiber version and minor tidy up * refactor errors from HTTPError to TuringError and logging to support grpc payloads * fix lint, add logging to grpc call * refactor metrics logging, extract common func * refactor folder structure. ignore experiment engine for grpc default turing strat * fix import * minor refactoring, add mission_control_grpc test * shifting logic between grpc and mission control grpc. added mc grpc test * add test for metrics and grpc server * add mock and fix metrics test * add log test * add benchmarking to upi * update interceptor as error response are not proto message * fix typo in benchmark payload * remove upi payload in http * refactor bencharmk, remove stopping of server * add upi large payload for http * removing upi payload for http missioncontrol as its similar to the existing payload test result * reverting workflow as not pointing to fork anymore * fix yaml indent * fix yaml indent * fix wrong yaml revert * renaming of grpc to upi and addition of protocol in config * Add grpc metadata transmission from fiber endpoint back to client * update upi proto and benchmark plain grpc gen client * add mock for transport stream for grpc unit test to work with sending header * update readme * refactoring base on PR comments * refactoring base on PR comments * create utilty to generate proto for benchmark. remove logger sync * minor refactoring to comment. change router protocol to be set as default for now * use latest implementation of fiber who reduce marshalling and usage of dynamicpb * update go fiber in api server and fix lintint * using fiber fork. introducing cmux for prom http on grpc * update fiber version * update api server config test file * rework benchmarking for http and grpc * refactor benchmarking * add benchmem to benchmark * refactor test upi server * minor refactoring on fiber package improts * fix config test indent Co-authored-by: ningjie.lee <ningjie.lee@gojek.com> * [UPI] Api Server (#255) * Add protocol to router and routers in api server. Refactor and combine service+method of grpc config in fiber * fix integration and rename router protocol * fix integration e2e test * fix integration e2e test * fix migration script * patch router probe implementation * update e2e test files * fix typo in e2e file * add h2c container for upi router and remove httpmatches * changing endpoint for grpc, remove json unmarshalling for http * remove liveness probe for upi due to knative * add sdk changes for protocol * add assertion for e2e test for http protocol * make protocol default to http and add test * Mupdate fiber version and test e2e * update fiber version and test e2e * update go mod * test e2e * test e2e * test e2e * test e2e * test e2e * test e2e and add python e2e * test api and python e2e - patch json * test api and python e2e * test api and python e2e * test api and python e2e * test api and python e2e * test api and python e2e * test api and python e2e - update endpoint with port * test api and python e2e - update e2e endpoint * test api and python e2e - refactor and add debug to sdk * test api and python e2e - refactor and add debug to sdk * test api and python e2e - refactor and add debug to sdk * test api and python e2e - refactor and add debug to sdk * update go.mod * remove dns from mockserver for testing * patch sdk mockserver * remove python client option for python sdk e2e * minor refactor, rename container port name correctly * add basic upi and http service builder test * remove redundant make cmd * minor refactoring per pr comment * heavy refactoring, remove route_protocol * remove redundant code * update ci * update ci Co-authored-by: ningjie.lee <ningjie.lee@gojek.com> * UPI Traffic Splitting (#259) * Grpc fiber integration with UPI in router (#238) * update fiber version and patch backward compatibility issues * update go mod to fork for testing * update go mod with fiber fix for testing * update mission control to use grpc fiber on env var * add missing setup go to workflow and fix linting * test workflow * test workflow * minor refactor on error message * update fiber version and minor tidy up * refactor errors from HTTPError to TuringError and logging to support grpc payloads * fix lint, add logging to grpc call * refactor metrics logging, extract common func * refactor folder structure. ignore experiment engine for grpc default turing strat * fix import * minor refactoring, add mission_control_grpc test * shifting logic between grpc and mission control grpc. added mc grpc test * add test for metrics and grpc server * add mock and fix metrics test * add log test * add benchmarking to upi * update interceptor as error response are not proto message * fix typo in benchmark payload * remove upi payload in http * refactor bencharmk, remove stopping of server * add upi large payload for http * removing upi payload for http missioncontrol as its similar to the existing payload test result * reverting workflow as not pointing to fork anymore * fix yaml indent * fix yaml indent * fix wrong yaml revert * renaming of grpc to upi and addition of protocol in config * Add grpc metadata transmission from fiber endpoint back to client * update upi proto and benchmark plain grpc gen client * add mock for transport stream for grpc unit test to work with sending header * update readme * refactoring base on PR comments * refactoring base on PR comments * create utilty to generate proto for benchmark. remove logger sync * minor refactoring to comment. change router protocol to be set as default for now * use latest implementation of fiber who reduce marshalling and usage of dynamicpb * update go fiber in api server and fix lintint * using fiber fork. introducing cmux for prom http on grpc * update fiber version * update api server config test file * rework benchmarking for http and grpc * refactor benchmarking * add benchmem to benchmark * refactor test upi server * minor refactoring on fiber package improts * fix config test indent Co-authored-by: ningjie.lee <ningjie.lee@gojek.com> * Simplify SelectRoute implementation * Implement traffic splitting for UPI * Move testutils to allow to be reused outside of fiberapi * Add test for TestUPIRequest * Add test for GetValueFromUPIRequest * Temporarily enable CI * Fix lint issue in engines/experiment * Change experiment engine sample base docker image to golang 1.18 * Fix test in routing_strategy_test.go * Fix lint error in router * Update go.mod * Reconfigure CI * Update openapi spec * Add traffic rules validation * Fix lint issue * Move back testutils to internal package * Rename GetValueFromRequest to GetValueFromHTTPRequest * Move traffic rules validation to validation package * Fix request_test.go * Rename GetValueFromRequest to GetValueFromHTTPRequest * Fix lint Co-authored-by: leonlnj <leenj.leon@gmail.com> Co-authored-by: ningjie.lee <ningjie.lee@gojek.com> * Deploy 3 upi echo server in end to end test * Update incorrect test setup * Update python sdk * Add test helper * Update sdk * Simplify model name * Add test for traffic splitting * Include in test suite * Reduce mock server cpu request * Temporary comment passing tests * Add logging * Add debugging logs * Rename router for upi traffic splitting e2e test * Print properly * Improve assertion in the withDeployedRouter * Reduce cpu request for all e2e test * Add default_route_id * Move response logging before status code assertion * Add e2e test for standard ensembler * Rename router name * Associate control with all traffic rule * Fix incorrect router file name * Temporary disable sdk e2e test * Temporary exclude sdk test * Use require instead of assert * Change ordering of waiting for component ready * Shorten router name * Exclude tests * Add debugging code * Add pod log * Change protocol * Change protobuf equality check * Add more detailed error info * Try fiber without cloning * Replace deprecated library * Fix debugging code * Read configmap * Print type * Try printing configmap * Update fiber * Update end to end test for traffic rule * Fix unit tests in router * Update go.mod in turing api * Remove mockserver-b deployment since it's not used * Add end to end test for sdk * Reenable all end to end test * Reduce cpu resource request to improve e2e test stability * Remove debugging code * Fix formatting in README.md * Add debuging code for sdk e2e test * Change test name * Include UPI test * Change incorrect comment * Increase cpu request to 100m * Add kubectl top nodes before each e2e test group * Remove kubectl top nodes since it's not supported * Increase enricher and ensembler cpu request * Remove misleading comment * Update test comment * Update api spec comments and generated code Co-authored-by: leonlnj <leenj.leon@gmail.com> Co-authored-by: ningjie.lee <ningjie.lee@gojek.com> * Update go mod sum * Fix go mod * Add nil check * Add debugging statement * Print error * traffic rules and general router setting for upi * add help text for experiment step * add ensembler step filter * service method for route without validation * add protocol to detail page * add validation for grpc and http endpoint * add validation for service method * patch regex and edit form validation * remove redundant regex * Add more debugging statement in logging * Add debugging statement * Temporarily allow publishing from branch * bugfix detail page header and yup validation * allow header for upi traffic rules * Fix logging issue * remove rules where protocol changes * remove redundant changes * fix regex * Ensure that prediction id and request timestamp are populated * Refactor * Fix lint * fix help text as per pr * Port UPI End to End test to ginkgo * Update UPI version * Update UPI version * Undo change in CI * Cleanup go mod and go sum * Rename field * format file and remove redudancy mention in PR comment * remove service_method section in routes * update rule when protocol changes * add filter for experiment engine for custom engine only * Replace proto comparison with proto.Equal * Minor refactoring * Log upi proto as json * Revert changes to CI condition * Translate BadResponse to status code internal * Fix test * Update ginkgo version * Remove log.SetGlobalLogger in test to avoid data race * Fix test * Update ginkgo version in Makefile * Fix lint * Pin ginkgo and gomega version * remove helptext for exp engine and pass protcol to remote ui * add filtering of merlin endpoint * update docs * update docs image * update docs and commen ts * remove unintended addition Co-authored-by: ningjie.lee <ningjie.lee@gojek.com> Co-authored-by: aria <pradithya.aria@gmail.com> Co-authored-by: Pradithya Aria <pradithya.pura@go-jek.com>
Add end to end tests for traffic splitting and standard ensembler when using UPI protocol. The PR also update fiber version to include gojek/fiber#7 which minimize the number of unmarshalling in Turing router's components.
E2E Test Setup
The end to end test setup reuse existing infrastructure with the difference of adding 2 separate mock services for UPI:
mockserver-upi-a
andmockserver-upi-control
. Two separates service is required as the service endpoint can't be changed unlike the HTTP mock server.Other Changes
100m
(from200m
) and increases ensembler and enricher cpu request to200m
(from100m
). The e2e test is more stable with this resource request.