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

Add list router sdk #148

Merged
merged 18 commits into from
Jan 7, 2022
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
3eb5e8c
Refactor swagger/openapi specs for sdk
deadlycoconuts Dec 24, 2021
0bf529c
Add autogenerated openapi classes for routers
deadlycoconuts Dec 24, 2021
71d79bf
Setup router sdk class
deadlycoconuts Dec 24, 2021
9982a69
Add monitoring_url and name to router class
deadlycoconuts Dec 24, 2021
748d03d
Rename duck typing for list_routers
deadlycoconuts Dec 24, 2021
60f4ee3
Rewrote OpenAPI spec for ExperimentConfig to avoid using oneOf
deadlycoconuts Jan 4, 2022
a16149e
Rename variable name in schema in OpenAPI spec
deadlycoconuts Jan 4, 2022
a3dc5e1
Add test for list router sdk method
deadlycoconuts Jan 4, 2022
05d6b11
Remove dependency of ExperimentConfig schema on ExperimentEngineType
deadlycoconuts Jan 5, 2022
8c023b0
Add additional fields for enricher component
deadlycoconuts Jan 5, 2022
57020d0
Add additional nullable fields to OpenAPI spec
deadlycoconuts Jan 5, 2022
264dda4
Add additional test fixtures for router components
deadlycoconuts Jan 5, 2022
96c6059
Rename import statement to prevent overlapping variable name (ensembler)
deadlycoconuts Jan 5, 2022
4243fbe
Replace router endpoint nullable type with readOnly
deadlycoconuts Jan 5, 2022
d69481a
Reference enricher id to a common id schema
deadlycoconuts Jan 5, 2022
82bbb1a
Reference ensembler, event and router id to common id schema
deadlycoconuts Jan 6, 2022
1c1e8b9
Add Standard and Custom ExperimentConfigs back to OpenAPI spec for fu…
deadlycoconuts Jan 6, 2022
be76444
Rename Ensembler in OpenAPI spec for routers to RouterEnsemblerConfig
deadlycoconuts Jan 6, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions api/api/openapi-sdk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@ paths:
$ref: "specs/jobs.yaml#/paths/~1projects~1{project_id}~1jobs"
"/projects/{project_id}/jobs/{job_id}":
$ref: "specs/jobs.yaml#/paths/~1projects~1{project_id}~1jobs~1{job_id}"

# R O U T E R S
"/projects/{project_id}/routers":
$ref: "specs/routers.yaml#/paths/~1projects~1{project_id}~1routers"
23 changes: 1 addition & 22 deletions api/api/specs/experiment-engines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -270,23 +270,6 @@ components:
variables:
$ref: "#/components/schemas/ExperimentVariables"

StandardExperimentConfig:
type: "object"
properties:
client:
$ref: "#/components/schemas/ExperimentClient"
experiments:
type: array
items:
$ref: "#/components/schemas/Experiment"
variables:
$ref: "#/components/schemas/ExperimentVariables"

CustomExperimentConfig:
type: "object"
not:
$ref: "#/components/schemas/StandardExperimentConfig"
deadlycoconuts marked this conversation as resolved.
Show resolved Hide resolved

ExperimentConfig:
type: "object"
required:
Expand All @@ -295,15 +278,11 @@ components:
type:
$ref: "#/components/schemas/ExperimentEngineType"
config:
oneOf:
- $ref: "#/components/schemas/StandardExperimentConfig"
- $ref: "#/components/schemas/CustomExperimentConfig"
type: "object"

# Enums
ExperimentEngineType:
type: "string"
enum:
- "nop"
default: "nop"

ExperimentManagerType:
Expand Down
38 changes: 37 additions & 1 deletion api/api/specs/routers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@ components:
schemas:
Router:
type: "object"
nullable: true
properties:
id:
type: "integer"
Expand All @@ -423,12 +424,13 @@ components:
type: "string"
format: "date-time"
readOnly: true
project:
project_id:
type: "integer"
environment_name:
type: "string"
endpoint:
type: "string"
nullable: true
deadlycoconuts marked this conversation as resolved.
Show resolved Hide resolved
monitoring_url:
type: "string"
readOnly: true
Expand Down Expand Up @@ -502,6 +504,12 @@ components:
monitoring_url:
type: "string"
readOnly: true
default_route_id:
type: "string"
rules:
type: "array"
items:
$ref: "#/components/schemas/TrafficRule"

ResultLoggerType:
type: "string"
Expand Down Expand Up @@ -604,6 +612,9 @@ components:
type: "string"
timeout:
type: "string"
annotations:
type: "object"
nullable: true

TrafficRule:
type: "object"
Expand Down Expand Up @@ -655,6 +666,8 @@ components:
- port
- env
properties:
id:
type: "integer"
deadlycoconuts marked this conversation as resolved.
Show resolved Hide resolved
image:
type: "string"
resource_request:
Expand All @@ -676,12 +689,22 @@ components:
JSON key. This secret will be mounted as a file inside the container and the environment variable
GOOGLE_APPLICATION_CREDENTIALS will point to the service account file."
example: "secret-name-for-google-service-account"
created_at:
type: "string"
format: "date-time"
readOnly: true
updated_at:
type: "string"
format: "date-time"
readOnly: true

Ensembler:
type: "object"
required:
- type
properties:
id:
type: "integer"
type:
description: "type of ensembler"
type: "string"
Expand All @@ -690,10 +713,19 @@ components:
$ref: "#/components/schemas/EnsemblerStandardConfig"
docker_config:
$ref: "#/components/schemas/EnsemblerDockerConfig"
created_at:
type: "string"
format: "date-time"
readOnly: true
updated_at:
type: "string"
format: "date-time"
readOnly: true

EnsemblerStandardConfig:
description: "ensembler config when ensembler type is standard"
type: "object"
nullable: true
required:
- "experiment_mappings"
properties:
Expand Down Expand Up @@ -722,6 +754,7 @@ components:
EnsemblerDockerConfig:
description: "ensembler config when ensembler type is docker"
type: "object"
nullable: true
required:
- image
- resource_request
Expand Down Expand Up @@ -774,6 +807,9 @@ components:
type: "string"
service_account_secret:
type: "string"
batch_load:
type: "boolean"
nullable: true

KafkaConfig:
type: "object"
Expand Down
Loading