-
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 create router version feature #179
Add create router version feature #179
Conversation
c6442d2
to
3260576
Compare
Minor feedback: can we use the Also, what do you all think about simplifying the button labels to |
Ahah, I thought yellow looked interesting 😅 The There's also Otherwise
|
Alright, lemme get those colours up :D |
Sounds great! The original specs say "Update", "Update and Deploy". I think "Save" and "Deploy" is concise and still conveys the intention. @deadlycoconuts I haven't reviewed the MR yet but I'd like to confirm - this change is only for the "Edit Router" workflow, right? (The "Create" on the buttons got me wondering.) |
Ahah yes, I essentially just added an extra button in the existing "Edit Router" user workflow (to... fork the existing workflow? if that's the right way to say it?). And oh I used "Create" because they were supposed to hint at "Create (Version) and Deploy" and "Create (Version) without Deploying" 😅 |
ui/src/router/components/form/components/VersionCreationSummary.js
Outdated
Show resolved
Hide resolved
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 the comprehensive PR and updating the SDK as well. As a side note, we also need to think about updating the user docs (which are currently duplicated in the internal repo for Confluence but we have public docs in this repo too) when the UI implementation changes.
5ea359c
to
87539f3
Compare
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.
My motivation for using ?deploy=true|false
flag was primarily defined by my understanding of the Edit Router
call to be in fact:
Create New Router Version
- (if deploy=true) Then
Promote this New Version to serve Router's traffic
So, in this context adding this ?deploy
flag makes sense (to me). However, as @krithika369 mentioned before, if you see this call as Edit router configuration with the new version
, then this deploy
flag is confusing.
In the longer term, it doesn't really matter because after the API controllers are refactored, then most of the business logic will be moved out from the controllers and there will be less of code duplication.
Currently these multiple conditional checks
if toDeploy {
// ...
}
are not contributing to the code readability, so maybe we should separate these two operations altogether. So in addition to existing
PUT /proejects/{project_id}/routers/{router_id}
We can just add
POST /projects/{project_id}/routers/{router_id}/versions
which will create a new version without promoting it.
wdyt @krithika369
P.S. @deadlycoconuts sorry for the miscommunication from my end
f0c25ce
to
44375ba
Compare
path: "/projects/{project_id}/routers/{router_id}/versions", | ||
body: request.CreateOrUpdateRouterRequest{}, | ||
handler: c.CreateRouterVersion, | ||
}, |
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.
Pulled this back out from the recycle bin given the latest proposed changes.
Okay thanks everyone for the clarification! I've just reverted the changes made to this PR to make it align with the latest proposal to keep the 2 endpoints for the 2 functionalities separate:
Lemme know if there's anything you'd like to add, @romanwozniak and @krithika369 |
93e3325
to
68f93c9
Compare
Thanks @krithika369 for all the responses and suggestions. I've refactored the I'll be merging this branch if nothing goes wrong with the CI pipeline! 🚀 |
Context
When updating a router with a new configuration, Turing API is currently only able to create a new router version and then deploy it automatically as a single atomic step. This may not be ideal for users who simply intend to create new versions without deploying them, since there isn't an endpoint that support such an operation.
This PR thus introduces a new API endpoint method for Turing API to create a new router version without deploying it automatically, and includes updates to Turing UI and Turing SDK to support this new functionality.
Features
New endpoint to support the creation of new router versions without deploying them automatically (
POST
operation with the existing/projects/{project_id}/routers/{router_id}/versions
endpoint)Introduction of new buttons at the 'Edit Router` diff and confirmation page to reflect the new option to create new router versions without deploying them
Introduction of a new SDK method to create new router versions without deploying them
Main Modifications
api/turing/api/router_versions_api.go
- Addition of a new request handler for the new API endpoint methodapi/api/*
- Changes to the OpenAPI specs from the addition of the new API endpoint methodui/src/router/edit/components/VersionComparisonView.js
- Addition of new buttons and onclick handlers to the diff pageui/src/router/edit/EditRouterView.js
- Addition of additional effects and API calls upon submissionui/src/router/components/form/components/VersionCreationSummary.js
- Creation of a new confirmation page for router version creationsdk/turing/router/router.py
- Addition of a method to theRouter
SDK class to support router version creationsdk/turing/session.py
- Addition of a support method to support router version creationsdk/turing/generated/api/router_api.py
- Changes to OpenAPI autogenerated classes from addition of the new API endpoint methodTiny Fixes
sdk/requirements.txt
- Pinning ofcloudpickle==1.2.2
to the requirements list to ensure compatibility with the Mlflow dependency of the pyfunc ensembler service engine