Skip to content

Commit

Permalink
Remove experiment mappings as a required field and update regex for r…
Browse files Browse the repository at this point in the history
…oute name path
  • Loading branch information
deadlycoconuts committed Sep 15, 2022
1 parent edca1ca commit c4668b8
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 15 deletions.
5 changes: 1 addition & 4 deletions api/api/openapi.bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2352,11 +2352,8 @@ components:
$ref: '#/components/schemas/EnsemblerStandardConfig_experiment_mappings'
type: array
route_name_path:
pattern: ^\w*(?:\.\w+)*$
pattern: ^[\w\-]*(?:\.[\w\-]+)*$
type: string
required:
- experiment_mappings
- route_name_path
type: object
EnsemblerDockerConfig:
description: ensembler config when ensembler type is docker
Expand Down
5 changes: 1 addition & 4 deletions api/api/specs/routers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -794,9 +794,6 @@ components:
description: "ensembler config when ensembler type is standard"
type: "object"
nullable: true
required:
- "experiment_mappings"
- "route_name_path"
properties:
experiment_mappings:
type: "array"
Expand All @@ -821,7 +818,7 @@ components:
example: "route-1"
route_name_path:
type: "string"
pattern: '^\w*(?:\.\w+)*$'
pattern: '^[\w\-]*(?:\.[\w\-]+)*$'

EnsemblerDockerConfig:
description: "ensembler config when ensembler type is docker"
Expand Down
2 changes: 1 addition & 1 deletion api/turing/models/ensembler.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const (
)

type EnsemblerStandardConfig struct {
ExperimentMappings []ExperimentMapping `json:"experiment_mappings" validate:"required,dive"`
ExperimentMappings []ExperimentMapping `json:"experiment_mappings" validate:"dive"`
RouteNamePath string `json:"route_name_path"`
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,5 @@ strategy:
- experiment: exp_exp_test_experiment_2
route: route-2
treatment: treatment
route_name_path: ""
type: fiber.DefaultTuringRoutingStrategy
type: EAGER_ROUTER
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ strategy:
app_version:
field: appVer
field_source: header
experiment_mappings: []
route_name_path: policy.route_name
type: fiber.DefaultTuringRoutingStrategy
type: EAGER_ROUTER
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ routes:
- experiment: exp_exp_test_experiment_2
route: route-2
treatment: treatment
route_name_path: ""
type: fiber.DefaultTuringRoutingStrategy
type: EAGER_ROUTER
- id: traffic-split-0
Expand Down Expand Up @@ -59,7 +58,6 @@ routes:
- experiment: exp_exp_test_experiment_2
route: route-2
treatment: treatment
route_name_path: ""
type: fiber.DefaultTuringRoutingStrategy
type: EAGER_ROUTER
- id: traffic-split-1
Expand Down Expand Up @@ -92,7 +90,6 @@ routes:
- experiment: exp_exp_test_experiment_2
route: route-2
treatment: treatment
route_name_path: ""
type: fiber.DefaultTuringRoutingStrategy
type: EAGER_ROUTER
- id: traffic-split-2
Expand Down Expand Up @@ -125,7 +122,6 @@ routes:
- experiment: exp_exp_test_experiment_2
route: route-2
treatment: treatment
route_name_path: ""
type: fiber.DefaultTuringRoutingStrategy
type: EAGER_ROUTER
strategy:
Expand Down

0 comments on commit c4668b8

Please sign in to comment.