-
Notifications
You must be signed in to change notification settings - Fork 23
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
add validation and new upi logger type #319
Changes from all commits
f3ad06c
3f40e17
de288b5
7ebee9c
c452472
f658ac1
3237633
3a29175
239d706
0860d93
3d38195
b3b169b
f4e64df
044ef83
0a0bc08
4905342
7cc5eee
455102c
6cef240
659eef1
3a8a66f
6f347de
910b20b
f46ab8a
06d402e
06b26b3
41096b1
85f380e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,9 @@ | |
RouterDefaults: | ||
ExperimentEnginePlugins: | ||
proprietary: | ||
Image: localhost:5000/proprietary-experiment-engine-plugin:latest | ||
PluginConfig: | ||
Image: localhost:5000/proprietary-experiment-engine-plugin:latest | ||
LivenessPeriodSeconds: 10 | ||
Experiment: | ||
proprietary: | ||
plugin_binary: ./bin/example-plugin | ||
|
@@ -19,15 +21,15 @@ Experiment: | |
name: exp_1 | ||
variants: | ||
- name: control | ||
- name: treatment-1 | ||
- name: treatment-a | ||
variants_configuration: | ||
control: | ||
traffic: 0.85 | ||
treatment_configuration: | ||
foo: bar | ||
route_name: treatment-a | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. previously the treatment is Minor refactoring to fix that and simplify the config |
||
treatment-1: | ||
foo: foo | ||
route_name: control | ||
treatment-a: | ||
traffic: 0.15 | ||
treatment_configuration: | ||
bar: baz | ||
route_name: control | ||
bar: bar | ||
route_name: treatment-a |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,24 +31,24 @@ var _ = DeployedRouterContext("testdata/create_router_std_ensembler_proprietary_ | |
Context("POST /v1/predict", func() { | ||
|
||
When("called with {client: {id: 4}} in the payload", func() { | ||
It("responds with data from the `treatment-a` route", func() { | ||
It("responds with data from the `control` route", func() { | ||
routerE.POST("/v1/predict"). | ||
WithHeaders(defaultPredictHeaders). | ||
WithJSON(json.RawMessage(`{"client": {"id": 4}}`)). | ||
Expect(). | ||
Status(http.StatusOK). | ||
JSON().Equal(json.RawMessage(`{"version": "treatment-a"}`)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this was actually flawed previously. "4" calls treatment "control" which has Since the exp config is patched to pair route and treatment consistently, |
||
JSON().Equal(json.RawMessage(`{"version": "control"}`)) | ||
}) | ||
}) | ||
|
||
When("called with {client: {id: 7}} in the payload", func() { | ||
It("responds with data from the `control` route", func() { | ||
It("responds with data from the `treatment-a` route", func() { | ||
routerE.POST("/v1/predict"). | ||
WithHeaders(defaultPredictHeaders). | ||
WithJSON(json.RawMessage(`{"client": {"id": 7}}`)). | ||
Expect(). | ||
Status(http.StatusOK). | ||
JSON().Equal(json.RawMessage(`{"version": "control"}`)) | ||
JSON().Equal(json.RawMessage(`{"version": "treatment-a"}`)) | ||
}) | ||
}) | ||
}) | ||
|
@@ -68,7 +68,7 @@ var _ = DeployedRouterContext("testdata/create_router_with_traffic_rules.json.tm | |
}) | ||
|
||
When("request satisfies the first traffic rule", func() { | ||
It("responds with responses from `control` and `treatment-a` routes", func() { | ||
It("responds with responses from `treatment-a` route", func() { | ||
want = httpexpect. | ||
NewValue(GinkgoT(), JSONPayload("testdata/responses/traffic_rules/traffic-rule-1.json")). | ||
Object() | ||
|
@@ -85,7 +85,7 @@ var _ = DeployedRouterContext("testdata/create_router_with_traffic_rules.json.tm | |
}) | ||
|
||
When("request satisfies the second traffic rule", func() { | ||
It("responds with responses from `control` and `treatment-b` routes", func() { | ||
It("responds with responses from `treatment-b` route", func() { | ||
want = httpexpect. | ||
NewValue(GinkgoT(), JSONPayload("testdata/responses/traffic_rules/traffic-rule-2.json")). | ||
Object() | ||
|
@@ -101,7 +101,7 @@ var _ = DeployedRouterContext("testdata/create_router_with_traffic_rules.json.tm | |
}) | ||
|
||
When("request satisfies no traffic rules", func() { | ||
It("responds with responses from `control` route only", func() { | ||
It("responds with responses from `control` route", func() { | ||
want = httpexpect. | ||
NewValue(GinkgoT(), JSONPayload("testdata/responses/traffic_rules/no-rules.json")). | ||
Object() | ||
|
@@ -209,7 +209,7 @@ var _ = DeployedRouterContext("testdata/create_router_upi_with_std_ensembler.jso | |
{ | ||
Name: "client_id", | ||
Type: upiv1.Type_TYPE_STRING, | ||
StringValue: "4", | ||
StringValue: "7", | ||
}, | ||
}, | ||
} | ||
|
@@ -260,7 +260,7 @@ var _ = DeployedRouterContext("testdata/create_router_upi_with_traffic_rules.jso | |
{ | ||
Name: "client_id", | ||
Type: upiv1.Type_TYPE_STRING, | ||
StringValue: "1", | ||
StringValue: "7", | ||
}, | ||
}, | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,6 +34,7 @@ var cfg config.Config | |
var defaultDeploymentIntervals = []interface{}{"10m", "5s"} | ||
var defaultDeletionIntervals = []interface{}{"20s", "2s"} | ||
var arbitraryUpdateIntervals = []interface{}{"10s", "1s"} | ||
var istioVirtualServiceIntervals = []interface{}{"60s", "5s"} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. increased and shifted, as 30s is too short for local setup and 60s works better |
||
|
||
type TestData struct { | ||
config.Config | ||
|
@@ -44,8 +45,6 @@ func init() { | |
flag.StringVar(&configFile, "config", "config.yaml", "Path to a configuration file") | ||
} | ||
|
||
var istioVirtualServiceIntervals = []interface{}{"30s", "1s"} | ||
|
||
var defaultPredictHeaders = map[string]string{ | ||
"X-Mirror-Body": "true", | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this. Amidst the testing improvements and chart changes (move to the umbrella chart), one thing we could do is to let the e2e tests in the component repo stop depending on the chart at all and use this setup instead, which could catch these problems earlier. We'll add this to the list of improvements. CC: @deadlycoconuts