diff --git a/api/go.mod b/api/go.mod index ddcf4e7b7..8a607ee09 100644 --- a/api/go.mod +++ b/api/go.mod @@ -15,7 +15,7 @@ require ( github.com/ghodss/yaml v1.0.0 github.com/go-playground/validator v9.31.0+incompatible github.com/go-playground/validator/v10 v10.9.0 - github.com/gojek/fiber v0.1.1-0.20221018054323-013517aeaf8f + github.com/gojek/fiber v0.2.0 github.com/gojek/merlin v0.0.0 github.com/gojek/mlp v1.4.7 github.com/golang-collections/collections v0.0.0-20130729185459-604e922904d3 @@ -93,13 +93,11 @@ require ( github.com/go-playground/locales v0.14.0 // indirect github.com/go-playground/universal-translator v0.18.0 // indirect github.com/go-stack/stack v1.8.0 // indirect - github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/golang/snappy v0.0.3 // indirect github.com/google/go-querystring v1.0.0 // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 // indirect github.com/google/uuid v1.3.0 // indirect github.com/googleapis/gnostic v0.5.5 // indirect github.com/gorilla/websocket v1.4.2 // indirect @@ -214,7 +212,6 @@ replace ( github.com/caraml-dev/turing/engines/experiment => ../engines/experiment github.com/caraml-dev/turing/engines/router => ../engines/router - github.com/docker/docker => github.com/docker/engine v1.4.2-0.20200213202729-31a86c4ab209 // The older version of k8 lib uses 0.4, UPI indirect depencies uses 1.2 which is compatible github.com/go-logr/logr => github.com/go-logr/logr v0.4.0 diff --git a/api/go.sum b/api/go.sum index 6cb4a2915..8f809d566 100644 --- a/api/go.sum +++ b/api/go.sum @@ -320,7 +320,6 @@ github.com/containerd/containerd v1.5.0-beta.3/go.mod h1:/wr9AVtEM7x9c+n0+stptlo github.com/containerd/containerd v1.5.0-beta.4/go.mod h1:GmdgZd2zA2GYIBZ0w09ZvgqEq8EfBp/m3lcVZIvPHhI= github.com/containerd/containerd v1.5.0-rc.0/go.mod h1:V/IXoMqNGgBlabz3tHD2TWDoTJseu1FGOKuoA4nNb2s= github.com/containerd/containerd v1.5.2/go.mod h1:0DOxVqwDy2iZvrZp2JUx/E+hS0UNTVn7dJnIOwtYR4g= -github.com/containerd/containerd v1.6.6 h1:xJNPhbrmz8xAMDNoVjHy9YHtWwEQNS+CDkcIRh7t8Y0= github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= github.com/containerd/continuity v0.0.0-20190815185530-f2a389ac0a02/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= github.com/containerd/continuity v0.0.0-20191127005431-f65d91d395eb/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= @@ -447,11 +446,15 @@ github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/docker v1.4.2-0.20180531152204-71cd53e4a197/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v1.4.2-0.20200213202729-31a86c4ab209/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.17+incompatible h1:JYCuMrWaVNophQTOrMMoSwudOVEfcegoZZrleKc1xwE= +github.com/docker/docker v20.10.17+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.6.3/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y= github.com/docker/docker-credential-helpers v0.6.4 h1:axCks+yV+2MR3/kZhAmy07yC56WZ2Pwu/fKWtKuZB0o= github.com/docker/docker-credential-helpers v0.6.4/go.mod h1:ofX3UI0Gz1TteYBjtgs07O36Pyasyp66D2uKT7H8W1c= -github.com/docker/engine v1.4.2-0.20200213202729-31a86c4ab209 h1:vHFFd1yBMYalTNZ8UZPzo00BMlgP4eltIegX6LFyu/4= -github.com/docker/engine v1.4.2-0.20200213202729-31a86c4ab209/go.mod h1:3CPr2caMgTHxxIAZgEMd3uLYPDlRvPqCpyeRf6ncPcY= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-events v0.0.0-20170721190031-9461782956ad/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= @@ -663,7 +666,6 @@ github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+Wl/kwN+LbLGQ4= @@ -700,8 +702,8 @@ github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXP github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/gojek/fiber v0.1.1-0.20221018054323-013517aeaf8f h1:QaCRED5gg9NWZqQyZfAc2TtYdyOZCqvgtGuJRmsQS1Y= -github.com/gojek/fiber v0.1.1-0.20221018054323-013517aeaf8f/go.mod h1:N/HYrGd73oNnZnaVhWX568VxY3Ksvu7ahPoUYEhNa3I= +github.com/gojek/fiber v0.2.0 h1:1lOMFm9rqJpfFpcDT44JSXewuWuFrKZMobWBo+YnEag= +github.com/gojek/fiber v0.2.0/go.mod h1:R5cRkUnXdTLpdchCkm3lmGJS+nfhPhLDOklRq1T65Jg= github.com/gojek/heimdall/v7 v7.0.2/go.mod h1:Z43HtMid7ysSjmsedPTXAki6jcdcNVnjn5pmsTyiMic= github.com/gojek/merlin/api v0.0.0-20210723093139-cc0240032d58 h1:8cVTLtTFHjfoTKQyL4sMSnfmTlTJU+Cizfy4hzRl2Tg= github.com/gojek/merlin/api v0.0.0-20210723093139-cc0240032d58/go.mod h1:FYMy4bZcts0UkTDE/rgGRWTOG4sUc5NvkljQqw4C8AE= @@ -818,8 +820,6 @@ github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/ github.com/google/licenseclassifier v0.0.0-20200708223521-3d09a0ea2f39/go.mod h1:qsqn2hxC+vURpyBRygGUuinTO42MFRLcsmQ/P8v94+M= github.com/google/mako v0.0.0-20190821191249-122f8dcef9e3/go.mod h1:YzLcVlL+NqWnmUEPuhS1LxDDwGO9WNbVlEXaF4IH35g= github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= -github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 h1:yAJXTCF9TqKcTiHJAE8dj7HMvPfh66eeA2JYW7eFpSE= -github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/trillian v1.3.11/go.mod h1:0tPraVHrSDkA3BO6vKX67zgLXs6SsOAbHEivX+9mPgw= @@ -981,7 +981,6 @@ github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpO github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo= github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4= github.com/iancoleman/strcase v0.0.0-20180726023541-3605ed457bf7/go.mod h1:SK73tn/9oHe+/Y0h39VT4UCxmurVJkR5NA7kMEAOgSE= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.4/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= @@ -1265,6 +1264,7 @@ github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2J github.com/moby/sys/symlink v0.1.0/go.mod h1:GGDODQmbFOjFsXvfLVn3+ZRxkch54RkSiGqsZeMYowQ= github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= github.com/moby/term v0.0.0-20210610120745-9d4ed1856297/go.mod h1:vgPCkQMyxTZ7IDy8SXRufE172gr8+K/JE/7hHFxHW3A= +github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 h1:dcztxKSvZ4Id8iPpHERQBbIJfabdt4wUm5qy3wOL2Zc= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -1969,7 +1969,6 @@ golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220809184613-07c6da5e1ced h1:3dYNDff0VT5xj+mbj2XucFst9WKk6PdGOrb9n+SbIvw= golang.org/x/net v0.0.0-20220809184613-07c6da5e1ced/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/oauth2 v0.0.0-20180603041954-1e0a3fa8ba9a/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -2057,7 +2056,6 @@ golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191210023423-ac6580df4449/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -2132,7 +2130,6 @@ golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 h1:WIoqL4EROvwiPdUtaip4VcDdpZ4kha7wBWZrbVKCIZg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= @@ -2392,7 +2389,6 @@ google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= diff --git a/engines/router/configs/traffic_splitting_router.yaml b/engines/router/configs/traffic_splitting_router.yaml index c9ba109e0..f437cb0f3 100644 --- a/engines/router/configs/traffic_splitting_router.yaml +++ b/engines/router/configs/traffic_splitting_router.yaml @@ -27,18 +27,18 @@ routes: strategy: <<: *TURING_STRATEGY - id: &ID_TRAFFIC_SPLIT_B traffic-split-b - type: EAGER_ROUTER - routes: - - id: control - type: PROXY - endpoint: "http://www.mocky.io/v2/5e4cacd4310000e1cad8c073" - timeout: 5s - - id: route-b - type: PROXY - endpoint: "http://www.mocky.io/v2/5e4caccc310000e2cad8c071" - timeout: 5s - strategy: - <<: *TURING_STRATEGY + type: EAGER_ROUTER + routes: + - id: control + type: PROXY + endpoint: "http://www.mocky.io/v2/5e4cacd4310000e1cad8c073" + timeout: 5s + - id: route-b + type: PROXY + endpoint: "http://www.mocky.io/v2/5e4caccc310000e2cad8c071" + timeout: 5s + strategy: + <<: *TURING_STRATEGY strategy: type: "fiber.TrafficSplittingStrategy" properties: diff --git a/engines/router/go.mod b/engines/router/go.mod index f460bf5ff..1483eb86b 100644 --- a/engines/router/go.mod +++ b/engines/router/go.mod @@ -10,7 +10,7 @@ require ( github.com/caraml-dev/universal-prediction-interface v0.0.0-20221026045401-50e7d79e4b73 github.com/fluent/fluent-logger-golang v1.5.0 github.com/go-playground/validator/v10 v10.3.0 - github.com/gojek/fiber v0.1.1-0.20221018054323-013517aeaf8f + github.com/gojek/fiber v0.2.0 github.com/gojek/mlp v1.4.7 github.com/google/go-cmp v0.5.8 github.com/google/uuid v1.3.0 diff --git a/engines/router/go.sum b/engines/router/go.sum index 67d88e2e6..79f1795a5 100644 --- a/engines/router/go.sum +++ b/engines/router/go.sum @@ -93,11 +93,6 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cloudflare/golz4 v0.0.0-20150217214814-ef862a3cdc58/go.mod h1:EOBUe0h4xcZ5GoxqC5SDxFQ8gwyZPKQoEzownBlhI80= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= github.com/cockroachdb/cockroach-go v0.0.0-20190925194419-606b3d062051/go.mod h1:XGLbWH/ujMcbPbhZq52Nv6UrCghb1yGn//133kEsvDk= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd h1:qMd81Ts1T2OTKmB4acZcyKaMtRnY5Y44NuXGX2GFJ1w= @@ -108,7 +103,6 @@ github.com/containerd/containerd v1.3.3/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMX github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cznic/mathutil v0.0.0-20180504122225-ca4c9f2c1369/go.mod h1:e6NPNENfs9mPDVNRekM7lKScauxd5kXTr1Mfyig6TDM= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -129,8 +123,6 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5/go.mod h1:a2zkGnVExMxdzMo3M0Hi/3sEU+cWnZpSni0O6/Yb/P0= github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= @@ -228,8 +220,8 @@ github.com/gocql/gocql v0.0.0-20190301043612-f6df8288f9b4/go.mod h1:4Fw1eo5iaEhD github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/gojek/fiber v0.1.1-0.20221018054323-013517aeaf8f h1:QaCRED5gg9NWZqQyZfAc2TtYdyOZCqvgtGuJRmsQS1Y= -github.com/gojek/fiber v0.1.1-0.20221018054323-013517aeaf8f/go.mod h1:N/HYrGd73oNnZnaVhWX568VxY3Ksvu7ahPoUYEhNa3I= +github.com/gojek/fiber v0.2.0 h1:1lOMFm9rqJpfFpcDT44JSXewuWuFrKZMobWBo+YnEag= +github.com/gojek/fiber v0.2.0/go.mod h1:R5cRkUnXdTLpdchCkm3lmGJS+nfhPhLDOklRq1T65Jg= github.com/gojek/mlp v1.4.7 h1:GxqqI0rQxUF4pexCk3aHsd5Mu4o4OnnsbGk+MTnW26Y= github.com/gojek/mlp v1.4.7/go.mod h1:3+/YMTxQenxYSvKzOiEio+UBXPheJ4+/5c1MkbYoLwc= github.com/golang-migrate/migrate/v4 v4.11.0/go.mod h1:nqbpDbckcYjsCD5I8q5+NI9Tkk7SVcmaF40Ax1eAWhg= @@ -280,7 +272,6 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= @@ -314,7 +305,6 @@ github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/ github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.2 h1:BqHID5W5qnMkug0Z8UmL8tN0gAy4jQ+B4WFt8cCgluU= github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.2/go.mod h1:ZbS3MZTZq/apAfAEHGoB5HbsQQstoqP92SjAqtQ9zeg= github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed/go.mod h1:tMWxXQ9wFIaZeTI9F+hmhFiGpFmhOHzyShyFUhRm0H4= @@ -409,7 +399,6 @@ github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= @@ -466,7 +455,6 @@ github.com/neo4j-drivers/gobolt v1.7.4/go.mod h1:O9AUbip4Dgre+CD3p40dnMD4a4r52QB github.com/neo4j/neo4j-go-driver v1.7.4/go.mod h1:aPO0vVr+WnhEJne+FgFjfsjzAnssPFLucHgGZ76Zb/U= github.com/newrelic/go-agent v3.9.0+incompatible/go.mod h1:a8Fv1b/fYhFSReoTU6HDkTYIMZeSVNffmoS726Y0LzQ= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -517,7 +505,6 @@ github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3x github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/remyoudompheng/bigfft v0.0.0-20190728182440-6a916e37a237/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= @@ -589,7 +576,6 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= @@ -610,7 +596,6 @@ go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= -go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -706,7 +691,6 @@ golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220809184613-07c6da5e1ced h1:3dYNDff0VT5xj+mbj2XucFst9WKk6PdGOrb9n+SbIvw= golang.org/x/net v0.0.0-20220809184613-07c6da5e1ced/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -782,13 +766,9 @@ golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 h1:WIoqL4EROvwiPdUtaip4VcDdpZ4kha7wBWZrbVKCIZg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -796,7 +776,6 @@ golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5f golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= @@ -925,7 +904,6 @@ google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= @@ -937,7 +915,6 @@ google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201204160425-06b3db808446/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220810155839-1856144b1d9c h1:IooGDWedfLC6KLczH/uduUsKQP42ZZYhKx+zd50L1Sk= google.golang.org/genproto v0.0.0-20220810155839-1856144b1d9c/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= @@ -957,12 +934,8 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.50.1 h1:DS/BukOZWp8s6p4Dt/tOaJaTQyPyOoCcrjroHuCeLzY= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -977,8 +950,6 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/DATA-DOG/go-sqlmock.v1 v1.3.0 h1:FVCohIoYO7IJoDDVpV2pdq7SgrMH6wHnuTyrdrxJNoY= @@ -989,7 +960,6 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/confluentinc/confluent-kafka-go.v1 v1.4.2 h1:JabkIV98VYFqYKHHzXtgGMFuRgFBNTNzBytbGByzrJI= gopkg.in/confluentinc/confluent-kafka-go.v1 v1.4.2/go.mod h1:ZdI3yfYmdNSLQPNCpO1y00EHyWaHG5EnQEyL/ntAegY= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= @@ -1002,7 +972,6 @@ gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76 gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/engines/router/missionctl/fiberapi/fan_in.go b/engines/router/missionctl/fiberapi/fan_in.go index d6ea284a8..7f27fd38e 100644 --- a/engines/router/missionctl/fiberapi/fan_in.go +++ b/engines/router/missionctl/fiberapi/fan_in.go @@ -155,6 +155,7 @@ func (fanIn *EnsemblingFanIn) collectResponses( "component": func() string { return "fanin_marshalResponse" }, + "traffic_rule": func() string { return "" }, }, ) rBytes, err := jsoniter.Marshal(result) diff --git a/engines/router/missionctl/fiberapi/interceptors.go b/engines/router/missionctl/fiberapi/interceptors.go index 9791e6124..d50f45361 100644 --- a/engines/router/missionctl/fiberapi/interceptors.go +++ b/engines/router/missionctl/fiberapi/interceptors.go @@ -2,6 +2,7 @@ package fiberapi import ( "context" + "strings" "time" "github.com/gojek/fiber" @@ -135,6 +136,13 @@ func (i *MetricsInterceptor) AfterCompletion( ) { cID := ctx.Value(fiber.CtxComponentIDKey) cKind := ctx.Value(fiber.CtxComponentKindKey) + cLabels := ctx.Value(fiber.CtxComponentLabelsKey) + + // Parse traffic rule, if set + var trafficRule string + if cLabels != nil { + trafficRule = strings.Join(cLabels.(fiber.LabelsMap).Label(TrafficRuleLabel), ",") + } if cKindCompType, ok := cKind.(fiber.ComponentKind); ok { // Only measure time taken for Caller @@ -144,8 +152,9 @@ func (i *MetricsInterceptor) AfterCompletion( for resp := range queue.Iter() { // Measure the time taken for the route labels := map[string]string{ - "status": metrics.GetStatusString(resp.IsSuccess()), - "route": routeName, + "status": metrics.GetStatusString(resp.IsSuccess()), + "route": routeName, + "traffic_rule": trafficRule, } metrics.Glob().MeasureDurationMsSince( metrics.RouteRequestDurationMs, diff --git a/engines/router/missionctl/fiberapi/routing_strategy.go b/engines/router/missionctl/fiberapi/routing_strategy.go index 77fd9a6c1..89b3656a7 100644 --- a/engines/router/missionctl/fiberapi/routing_strategy.go +++ b/engines/router/missionctl/fiberapi/routing_strategy.go @@ -53,7 +53,9 @@ func (r *DefaultTuringRoutingStrategy) SelectRoute( ctx context.Context, req fiber.Request, routes map[string]fiber.Component, -) (fiber.Component, []fiber.Component, error) { +) (fiber.Component, []fiber.Component, fiber.Labels, error) { + labels := fiber.NewLabelsMap() + // Get fallback fallbacks := []fiber.Component{} if defRoute, ok := routes[r.defaultRoute]; ok { @@ -73,26 +75,26 @@ func (r *DefaultTuringRoutingStrategy) SelectRoute( if !ok { err := fmt.Errorf("failed to convert into grpc fiber request") log.Glob().Error(err.Error()) - return nil, nil, err + return nil, nil, labels, err } requestProto, ok := grpcFiberReq.ProtoMessage().(*upiv1.PredictValuesRequest) if !ok { err := fmt.Errorf("failed to convert into UPI request") log.Glob().Error(err.Error()) - return nil, nil, err + return nil, nil, labels, err } predContext, err := request.UPIVariablesToStringMap(requestProto.GetPredictionContext()) if err != nil { log.Glob().Errorf("failed converting prediction context into string map: %s", err) - return nil, nil, err + return nil, nil, labels, err } payload, err = json.Marshal(predContext) if err != nil { log.Glob().Errorf("failed marshalling prediction context into payload: %s", err) - return nil, nil, err + return nil, nil, labels, err } for k, v := range req.Header() { @@ -121,7 +123,7 @@ func (r *DefaultTuringRoutingStrategy) SelectRoute( // If error, log it and return the fallback(s) if expErr != nil { log.WithContext(ctx).Errorf(expErr.Error()) - return nil, fallbacks, nil + return nil, fallbacks, labels, nil } // For the DefaultTuringRoutingStrategy, we only expect experimentMappings OR routeNamePath to be configured; we @@ -130,7 +132,7 @@ func (r *DefaultTuringRoutingStrategy) SelectRoute( if m.Experiment == expPlan.ExperimentName && m.Treatment == expPlan.Name { // Stop matching on first match because only 1 route is required. Don't send in fallbacks, // because we do not want to suppress the error from the preferred route. - return routes[m.Route], []fiber.Component{}, nil + return routes[m.Route], []fiber.Component{}, labels, nil } } @@ -143,11 +145,11 @@ func (r *DefaultTuringRoutingStrategy) SelectRoute( if err != nil { log.WithContext(ctx).Errorf(err.Error()) - return nil, fallbacks, nil + return nil, fallbacks, labels, nil } if selectedRoute, ok := routes[routeName]; ok { - return selectedRoute, []fiber.Component{}, nil + return selectedRoute, []fiber.Component{}, labels, nil } // There are no routes with the route name found in the treatment @@ -158,5 +160,5 @@ func (r *DefaultTuringRoutingStrategy) SelectRoute( } // primary route will be nil if there are no matching treatments in the mapping - return nil, fallbacks, nil + return nil, fallbacks, labels, nil } diff --git a/engines/router/missionctl/fiberapi/routing_strategy_test.go b/engines/router/missionctl/fiberapi/routing_strategy_test.go index 97de8d2f7..1dc80af5d 100644 --- a/engines/router/missionctl/fiberapi/routing_strategy_test.go +++ b/engines/router/missionctl/fiberapi/routing_strategy_test.go @@ -358,7 +358,7 @@ func TestDefaultRoutingStrategy(t *testing.T) { if data.request != nil { fiberReq = data.request } - route, fallbacks, err := strategy.SelectRoute(context.Background(), fiberReq, routes) + route, fallbacks, _, err := strategy.SelectRoute(context.Background(), fiberReq, routes) assert.Equal(t, data.expectedError, err) assert.Equal(t, data.expectedRoute, route) diff --git a/engines/router/missionctl/fiberapi/traffic_splitting_strategy.go b/engines/router/missionctl/fiberapi/traffic_splitting_strategy.go index fc770ed2f..463714ea9 100644 --- a/engines/router/missionctl/fiberapi/traffic_splitting_strategy.go +++ b/engines/router/missionctl/fiberapi/traffic_splitting_strategy.go @@ -24,6 +24,7 @@ var ( return instance }() + TrafficRuleLabel string = "traffic-rule" ) // TrafficSplittingStrategyRule represents one rule of the TrafficSplittingStrategy @@ -109,47 +110,33 @@ func (s *TrafficSplittingStrategy) SelectRoute( ctx context.Context, req fiber.Request, routes map[string]fiber.Component, -) (fiber.Component, []fiber.Component, error) { - var orderedRoutes []fiber.Component - // array, that holds results of testing the request by each rule configured on the strategy - // `results[k]` – is `true` if the request satisfies `k`th rule of the strategy, and `false` - // otherwise - results := make([]bool, len(s.Rules)) - - for idx, rule := range s.Rules { +) (fiber.Component, []fiber.Component, fiber.Labels, error) { + labels := fiber.NewLabelsMap() + + for _, rule := range s.Rules { res, err := rule.TestRequest(req) if err != nil { - return nil, nil, createFiberError(err, req.Protocol()) - } - - results[idx] = res - } - - // select primary route and fallbacks, based on the results of testing - // given request against traffic-splitting rules - for i := 0; i < len(results); i++ { - routeID := s.Rules[i].RouteID - if results[i] { + return nil, nil, labels, createFiberError(err, req.Protocol()) + } else if res { + routeID := rule.RouteID if r, exists := routes[routeID]; exists { - orderedRoutes = append(orderedRoutes, r) - } else { - err := errors.Newf(errors.BadConfig, `route with id "%s" doesn't exist in the router`, routeID) - log.WithContext(ctx).Errorf(err.Error()) - return nil, nil, createFiberError(err, req.Protocol()) + return r, []fiber.Component{}, labels.WithLabel(TrafficRuleLabel, r.ID()), nil } + // This is unexpected, terminate with error. + err := errors.Newf(errors.BadConfig, `route with id "%s" doesn't exist in the router`, routeID) + log.WithContext(ctx).Errorf(err.Error()) + return nil, nil, labels, createFiberError(err, req.Protocol()) } } - // given request hasn't satisfied any of the rules configured on this routing strategy - if len(orderedRoutes) == 0 { - if defaultRoute, exist := routes[s.DefaultRouteID]; exist { - orderedRoutes = append(orderedRoutes, defaultRoute) - } else { - err := errors.Newf(errors.NotFound, "http request didn't match any traffic rule") - log.WithContext(ctx).Errorf(err.Error()) - return nil, nil, createFiberError(err, req.Protocol()) - } + // Given request hasn't satisfied any of the rules configured on this routing strategy; + // check if default route exists. + if defaultRoute, exist := routes[s.DefaultRouteID]; exist { + return defaultRoute, []fiber.Component{}, labels.WithLabel(TrafficRuleLabel, defaultRoute.ID()), nil } - return orderedRoutes[0], orderedRoutes[1:], nil + // No matches whatsoever. + err := errors.Newf(errors.NotFound, "http request didn't match any traffic rule") + log.WithContext(ctx).Errorf(err.Error()) + return nil, nil, labels, createFiberError(err, req.Protocol()) } diff --git a/engines/router/missionctl/fiberapi/traffic_splitting_strategy_test.go b/engines/router/missionctl/fiberapi/traffic_splitting_strategy_test.go index 4ebeb98c4..064e1e704 100644 --- a/engines/router/missionctl/fiberapi/traffic_splitting_strategy_test.go +++ b/engines/router/missionctl/fiberapi/traffic_splitting_strategy_test.go @@ -402,9 +402,10 @@ func TestTrafficSplittingStrategy_SelectRoute(t *testing.T) { type testCase struct { strategy *fiberapi.TrafficSplittingStrategy routes map[string]fiber.Component + fallbacks []fiber.Component request fiber.Request expected fiber.Component - fallbacks []fiber.Component + labels fiber.Labels expectedError string } @@ -438,6 +439,7 @@ func TestTrafficSplittingStrategy_SelectRoute(t *testing.T) { "X-Region": []string{"region-b"}, }, `{"service_type": "service-b"}`), expected: tfu.NewFiberCaller(t, "route-a"), + labels: fiber.LabelsMap{"traffic-rule": []string{"route-a"}}, fallbacks: []fiber.Component{}, }, "success | upi": { @@ -477,6 +479,7 @@ func TestTrafficSplittingStrategy_SelectRoute(t *testing.T) { }, }), expected: tfu.NewFiberCaller(t, "route-a"), + labels: fiber.LabelsMap{"traffic-rule": []string{"route-a"}}, fallbacks: []fiber.Component{}, }, "success | with default route": { @@ -520,6 +523,7 @@ func TestTrafficSplittingStrategy_SelectRoute(t *testing.T) { }, request: tfu.NewHTTPFiberRequest(t, http.Header{}, `{"service_type": "service-c"}`), expected: tfu.NewFiberCaller(t, "control"), + labels: fiber.LabelsMap{"traffic-rule": []string{"control"}}, fallbacks: []fiber.Component{}, }, "success | upi with default route": { @@ -573,103 +577,9 @@ func TestTrafficSplittingStrategy_SelectRoute(t *testing.T) { }, }), expected: tfu.NewFiberCaller(t, "control"), + labels: fiber.LabelsMap{"traffic-rule": []string{"control"}}, fallbacks: []fiber.Component{}, }, - "success | with fallbacks": { - strategy: &fiberapi.TrafficSplittingStrategy{ - Rules: []*fiberapi.TrafficSplittingStrategyRule{ - { - RouteID: "route-a", - Conditions: []*router.TrafficRuleCondition{ - { - FieldSource: request.HeaderFieldSource, - Field: "X-Region", - Operator: router.InConditionOperator, - Values: []string{"region-a", "region-b"}, - }, - { - FieldSource: request.PayloadFieldSource, - Field: "service_type", - Operator: router.InConditionOperator, - Values: []string{"service-b"}, - }, - }, - }, - { - RouteID: "route-b", - Conditions: []*router.TrafficRuleCondition{ - { - FieldSource: request.PayloadFieldSource, - Field: "service_type", - Operator: router.InConditionOperator, - Values: []string{"service-a", "service-b"}, - }, - }, - }, - }, - }, - routes: map[string]fiber.Component{ - "route-a": tfu.NewFiberCaller(t, "route-a"), - "route-b": tfu.NewFiberCaller(t, "route-b"), - }, - request: tfu.NewHTTPFiberRequest(t, - http.Header{"X-Region": []string{"region-b"}}, - `{"service_type": "service-b"}`), - expected: tfu.NewFiberCaller(t, "route-a"), - fallbacks: []fiber.Component{tfu.NewFiberCaller(t, "route-b")}, - }, - "success | upi with fallbacks": { - strategy: &fiberapi.TrafficSplittingStrategy{ - Rules: []*fiberapi.TrafficSplittingStrategyRule{ - { - RouteID: "route-a", - Conditions: []*router.TrafficRuleCondition{ - { - FieldSource: request.HeaderFieldSource, - Field: "X-Region", - Operator: router.InConditionOperator, - Values: []string{"region-a", "region-b"}, - }, - { - FieldSource: request.PredictionContextSource, - Field: "service_type", - Operator: router.InConditionOperator, - Values: []string{"service-b"}, - }, - }, - }, - { - RouteID: "route-b", - Conditions: []*router.TrafficRuleCondition{ - { - FieldSource: request.PredictionContextSource, - Field: "service_type", - Operator: router.InConditionOperator, - Values: []string{"service-a", "service-b"}, - }, - }, - }, - }, - }, - routes: map[string]fiber.Component{ - "route-a": tfu.NewFiberCaller(t, "route-a"), - "route-b": tfu.NewFiberCaller(t, "route-b"), - }, - request: tfu.NewUPIFiberRequest(t, map[string]string{ - "X-Region": "region-a", - }, &upiv1.PredictValuesRequest{ - PredictionContext: []*upiv1.Variable{ - { - Name: "service_type", - Type: upiv1.Type_TYPE_STRING, - StringValue: "service-b", - }, - }, - }), - expected: tfu.NewFiberCaller(t, "route-a"), - fallbacks: []fiber.Component{tfu.NewFiberCaller(t, "route-b")}, - }, - "failure | request doesn't match any rule": { strategy: &fiberapi.TrafficSplittingStrategy{ Rules: []*fiberapi.TrafficSplittingStrategyRule{ @@ -722,11 +632,12 @@ func TestTrafficSplittingStrategy_SelectRoute(t *testing.T) { for name, tt := range suite { t.Run(name, func(t *testing.T) { ctx := turingctx.NewTuringContext(context.Background()) - actual, actualFallbacks, err := tt.strategy.SelectRoute(ctx, tt.request, tt.routes) + actual, actualFallbacks, labels, err := tt.strategy.SelectRoute(ctx, tt.request, tt.routes) if tt.expectedError == "" { require.NoError(t, err) require.Equal(t, tt.expected, actual) require.Equal(t, tt.fallbacks, actualFallbacks) + require.Equal(t, tt.labels, labels) } else { require.EqualError(t, err, tt.expectedError) } @@ -784,6 +695,6 @@ func BenchmarkTrafficSplittingStrategy_SelectRoute(b *testing.B) { b.ReportAllocs() for i := 0; i < b.N; i++ { - primaryRoute, _, _ = strategy.SelectRoute(ctx, fiberReq, routes) + primaryRoute, _, _, _ = strategy.SelectRoute(ctx, fiberReq, routes) } } diff --git a/engines/router/missionctl/instrumentation/metrics/prometheus.go b/engines/router/missionctl/instrumentation/metrics/prometheus.go index 25177691f..b2a1d1419 100644 --- a/engines/router/missionctl/instrumentation/metrics/prometheus.go +++ b/engines/router/missionctl/instrumentation/metrics/prometheus.go @@ -50,7 +50,7 @@ var histogramMap = map[MetricName]*prometheus.HistogramVec{ Help: "Histogram for the runtime (in milliseconds) of Fiber route requests.", Buckets: requestLatencyBuckets, }, - []string{"status", "route"}, + []string{"status", "route", "traffic_rule"}, ), TuringComponentRequestDurationMs: prometheus.NewHistogramVec(prometheus.HistogramOpts{ Namespace: Namespace, @@ -59,7 +59,7 @@ var histogramMap = map[MetricName]*prometheus.HistogramVec{ Help: "Histogram for time spent (in milliseconds) at each Turing component.", Buckets: requestLatencyBuckets, }, - []string{"status", "component"}, + []string{"status", "component", "traffic_rule"}, ), } diff --git a/engines/router/missionctl/log/resultlog/fluentd.go b/engines/router/missionctl/log/resultlog/fluentd.go index d2b910fad..09a7996cc 100644 --- a/engines/router/missionctl/log/resultlog/fluentd.go +++ b/engines/router/missionctl/log/resultlog/fluentd.go @@ -62,6 +62,7 @@ func (l *FluentdLogger) write(turLogEntry *TuringResultLogEntry) error { "component": func() string { return "fluentd_post" }, + "traffic_rule": func() string { return "" }, }, )() log.Glob().Debugw("Sending log to fluentd", "entry", turLogEntry) diff --git a/engines/router/missionctl/log/resultlog/kafka.go b/engines/router/missionctl/log/resultlog/kafka.go index 1e0a30620..a7236c660 100644 --- a/engines/router/missionctl/log/resultlog/kafka.go +++ b/engines/router/missionctl/log/resultlog/kafka.go @@ -77,6 +77,7 @@ func (l *KafkaLogger) write(turLogEntry *TuringResultLogEntry) error { "component": func() string { return "kafka_marshal_and_write" }, + "traffic_rule": func() string { return "" }, }, )() diff --git a/engines/router/missionctl/mission_control.go b/engines/router/missionctl/mission_control.go index fa0863a70..9e4e19675 100644 --- a/engines/router/missionctl/mission_control.go +++ b/engines/router/missionctl/mission_control.go @@ -7,8 +7,11 @@ import ( "fmt" "io" "net/http" + "strings" "time" + "github.com/gojek/fiber" + fiberErrors "github.com/gojek/fiber/errors" fiberHttp "github.com/gojek/fiber/http" fiberProtocol "github.com/gojek/fiber/protocol" jsoniter "github.com/json-iterator/go" @@ -134,6 +137,7 @@ func (mc *missionControl) doPost( "component": func() string { return fmt.Sprint(componentLabel, "_makeRequest") }, + "traffic_rule": func() string { return "" }, }, ) resp, err := mc.httpClient.Do(req) @@ -179,6 +183,7 @@ func (mc *missionControl) Enrich( "component": func() string { return "enrich" }, + "traffic_rule": func() string { return "" }, }, )() // Make HTTP request @@ -193,6 +198,7 @@ func (mc *missionControl) Route( header http.Header, body []byte, ) (*experiment.Response, mchttp.Response, *errors.TuringError) { + var fiberResponse fiber.Response var routerErr *errors.TuringError // Measure execution time defer metrics.Glob().MeasureDurationMs( @@ -204,6 +210,12 @@ func (mc *missionControl) Route( "component": func() string { return "route" }, + "traffic_rule": func() string { + if fiberResponse != nil { + return strings.Join(fiberResponse.Label(fiberapi.TrafficRuleLabel), ",") + } + return "" + }, }, )() @@ -220,7 +232,8 @@ func (mc *missionControl) Route( // Pass the request to the Fiber Handler and process the response var routerResp mchttp.Response - fiberResponse, fiberError := mc.fiberHandler.DoRequest(httpReq) + var fiberError *fiberErrors.FiberError + fiberResponse, fiberError = mc.fiberHandler.DoRequest(httpReq) if fiberError != nil { routerResp, routerErr = nil, errors.NewTuringError(fiberError, fiberProtocol.HTTP, fiberError.Code) } else if fiberResponse == nil { @@ -266,6 +279,7 @@ func (mc *missionControl) Ensemble( "component": func() string { return "ensemble" }, + "traffic_rule": func() string { return "" }, }, )() @@ -281,6 +295,7 @@ func (mc *missionControl) Ensemble( "component": func() string { return "ensemble_makePayload" }, + "traffic_rule": func() string { return "" }, }, ) payload, err := makeEnsemblerPayload(requestBody, routerResponse) diff --git a/engines/router/missionctl/mission_control_upi.go b/engines/router/missionctl/mission_control_upi.go index 895647071..cd1744841 100644 --- a/engines/router/missionctl/mission_control_upi.go +++ b/engines/router/missionctl/mission_control_upi.go @@ -2,6 +2,7 @@ package missionctl import ( "context" + "strings" "github.com/gojek/fiber" fiberGrpc "github.com/gojek/fiber/grpc" @@ -42,6 +43,7 @@ func (us *missionControlUpi) Route( fiberRequest fiber.Request, ) (fiber.Response, *errors.TuringError) { var turingError *errors.TuringError + var grpcResponse *fiberGrpc.Response // Measure execution time defer metrics.Glob().MeasureDurationMs( metrics.TuringComponentRequestDurationMs, @@ -52,6 +54,12 @@ func (us *missionControlUpi) Route( "component": func() string { return "route" }, + "traffic_rule": func() string { + if grpcResponse != nil { + return strings.Join(grpcResponse.Label(fiberapi.TrafficRuleLabel), ",") + } + return "" + }, }, )() @@ -69,7 +77,7 @@ func (us *missionControlUpi) Route( } } - grpcResponse, ok := resp.(*fiberGrpc.Response) + grpcResponse, ok = resp.(*fiberGrpc.Response) if !ok { turingError = errors.NewTuringError( errors.Newf(errors.BadResponse, "unable to parse fiber response into grpc response"), fiberProtocol.GRPC, diff --git a/engines/router/missionctl/server/http/handlers/batch_http_handler.go b/engines/router/missionctl/server/http/handlers/batch_http_handler.go index db42820c4..91814ad15 100644 --- a/engines/router/missionctl/server/http/handlers/batch_http_handler.go +++ b/engines/router/missionctl/server/http/handlers/batch_http_handler.go @@ -47,6 +47,7 @@ func (h *batchHTTPHandler) ServeHTTP(rw http.ResponseWriter, req *http.Request) "component": func() string { return batchHTTPHandlerID }, + "traffic_rule": func() string { return "" }, }, )() diff --git a/engines/router/missionctl/server/http/handlers/http_handler.go b/engines/router/missionctl/server/http/handlers/http_handler.go index a09cd3d4d..19131a948 100644 --- a/engines/router/missionctl/server/http/handlers/http_handler.go +++ b/engines/router/missionctl/server/http/handlers/http_handler.go @@ -141,6 +141,7 @@ func (h *httpHandler) ServeHTTP(rw http.ResponseWriter, req *http.Request) { "component": func() string { return httpHandlerID }, + "traffic_rule": func() string { return "" }, }, )() diff --git a/engines/router/missionctl/server/upi/server.go b/engines/router/missionctl/server/upi/server.go index 6e39c5962..e9fe59c08 100644 --- a/engines/router/missionctl/server/upi/server.go +++ b/engines/router/missionctl/server/upi/server.go @@ -86,6 +86,7 @@ func (us *Server) PredictValues(ctx context.Context, req *upiv1.PredictValuesReq "component": func() string { return tracingComponentID }, + "traffic_rule": func() string { return "" }, }, )()