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

UPI E2E Test #262

Merged
merged 65 commits into from
Oct 20, 2022
Merged

UPI E2E Test #262

merged 65 commits into from
Oct 20, 2022

Conversation

pradithya
Copy link
Member

@pradithya pradithya commented Oct 13, 2022

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 and mockserver-upi-control . Two separates service is required as the service endpoint can't be changed unlike the HTTP mock server.

Other Changes

  • Reduce most router cpu requests in e2e test to 100m (from 200m) and increases ensembler and enricher cpu request to 200m (from 100m). The e2e test is more stable with this resource request.

leonlnj and others added 4 commits October 10, 2022 09:36
* 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>
@pradithya pradithya marked this pull request as draft October 14, 2022 02:05
@terryyylim
Copy link
Collaborator

Recently, @terryyylim mentioned that there was a scenario where he had to increase the CPU allocation for the resources created by the tests because it was too low

Which test is it? I encountered another flaky test caused by no such host error.

    01_create_router_test.go:54: 
        	Error Trace:	/home/runner/work/turing/turing/api/e2e/test/01_create_router_test.go:54
        	            				/home/runner/work/turing/turing/api/e2e/test/helpers_test.go:71
        	            				/home/runner/work/turing/turing/api/e2e/test/01_create_router_test.go:45
        	            				/home/runner/work/turing/turing/api/e2e/test/helpers_api_test.go:292
        	            				/home/runner/work/turing/turing/api/e2e/test/01_create_router_test.go:35
        	Error:      	Not equal: 
        	            	expected: 200
        	            	actual  : 500
        	Test:       	TestEndToEnd/EndToEnd/CreateRouter_KnativeServices
        	Messages:   	Unexpected response (code 500): Post "http://e2e-experiment-3272521270-turing-enricher-1.default.svc.cluster.local/anything": dial tcp: lookup e2e-experiment-3272521270-turing-enricher-1.default.svc.cluster.local: no such host

In this case I think the problem is with either knative or istio cpu request.

There were no particular tests that failed because of this. It's more that the enricher and ensembler's queue-proxy containers were not starting up, resulting in tests not being able to start running. This was resolved when I increased resource_request configuration for each router.

@pradithya
Copy link
Member Author

pradithya commented Oct 19, 2022

There were no particular tests that failed because of this. It's more that the enricher and ensembler's queue-proxy containers were not starting up, resulting in tests not being able to start running. This was resolved when I increased resource_request configuration for each router.

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 ?

@pradithya
Copy link
Member Author

pradithya commented Oct 20, 2022

This was resolved when I increased resource_request configuration for each router.

Looks like increasing cpu request for ensembler and enricher is enough. The test is more stable (at least 3 times without failing)

@terryyylim
Copy link
Collaborator

There were no particular tests that failed because of this. It's more that the enricher and ensembler's queue-proxy containers were not starting up, resulting in tests not being able to start running. This was resolved when I increased resource_request configuration for each router.

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 ?

@pradithya I increased it to 200m too! 👍🏻

@pradithya
Copy link
Member Author

@terryyylim @krithika369 @leonlnj Good to merge?

@krithika369
Copy link
Collaborator

@terryyylim @krithika369 @leonlnj Good to merge?

I didn't review the PR fully yet, I'll do it this morning.

Copy link
Contributor

@leonlnj leonlnj 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
Collaborator

@krithika369 krithika369 left a 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")
Copy link
Collaborator

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 ?

Copy link
Member Author

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.
Copy link
Collaborator

Choose a reason for hiding this comment

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

If field_source is header, then field 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.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, rephrased the documentation.

@pradithya pradithya temporarily deployed to manual October 20, 2022 04:34 Inactive
@pradithya pradithya temporarily deployed to manual October 20, 2022 04:34 Inactive
@pradithya pradithya merged commit b6afd3d into grpc_upi Oct 20, 2022
leonlnj added a commit that referenced this pull request Oct 20, 2022
* 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>
@pradithya pradithya mentioned this pull request Oct 27, 2022
9 tasks
pradithya added a commit that referenced this pull request Oct 31, 2022
* 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>
leonlnj added a commit that referenced this pull request Oct 31, 2022
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants