Conversation
Codecov Report
@@ Coverage Diff @@
## main #61 +/- ##
==========================================
- Coverage 71.64% 71.26% -0.38%
==========================================
Files 79 82 +3
Lines 2902 3376 +474
Branches 49 49
==========================================
+ Hits 2079 2406 +327
- Misses 647 766 +119
- Partials 176 204 +28
Continue to review full report at Codecov.
|
| ProjectID uuid.UUID `json:"project_id" validate:"required"` | ||
| Name string `json:"name" validate:"username,required"` |
There was a problem hiding this comment.
Looks easy to create!
bryphe-coder
left a comment
There was a problem hiding this comment.
Overall looks great! Just had a question about the POST /workspaces/{user}/{workspace}/history API
| type CreateWorkspaceHistoryRequest struct { | ||
| ProjectHistoryID uuid.UUID `json:"project_history_id" validate:"required"` | ||
| Transition database.WorkspaceTransition `json:"transition" validate:"oneof=create start stop delete,required"` | ||
| } |
There was a problem hiding this comment.
I don't quite understand this API - why does it need the ProjectHistoryID? Where would the front-end get this?
There was a problem hiding this comment.
It seems we'd use either the ProjectHistoryID the workspace was created with, or the latest one - and in either case, the backend would know that 🤔
There was a problem hiding this comment.
Ahh so there's project history and workspace history.
Workspace history tracks project history, so it's needed! The frontend will query the project and probably grab the latest, but I didn't want to make it a requirement.
Closes #23
In my next PR I'll be tackling provisionerd, which will process the builds and hopefully link the entire system together!