feat: add workspace build transition to provisioner job list#24131
feat: add workspace build transition to provisioner job list#24131jscottmiller merged 2 commits intomainfrom
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
fd4ee87 to
0ea0fa6
Compare
0ea0fa6 to
c8d5260
Compare
jscottmiller
left a comment
There was a problem hiding this comment.
Most of this diff is generated code. Here are the actual changes to review:
| WorkspaceBuildTransition WorkspaceTransition `json:"workspace_build_transition,omitempty" table:"workspace build transition"` | ||
| } | ||
|
|
||
| // ProvisionerJobType represents the type of job. |
There was a problem hiding this comment.
SDK type change: new WorkspaceBuildTransition field on ProvisionerJobMetadata.
| if pj.WorkspaceID.Valid { | ||
| job.Metadata.WorkspaceID = &pj.WorkspaceID.UUID | ||
| } | ||
| if pj.WorkspaceBuildID.Valid { |
There was a problem hiding this comment.
Conversion logic: only populates WorkspaceBuildTransition when a workspace build exists, preventing the SQL COALESCE default from leaking into the API response for non-workspace-build jobs.
| TemplateIcon: template.Icon, | ||
| WorkspaceID: &w.ID, | ||
| WorkspaceName: w.Name, | ||
| WorkspaceBuildTransition: codersdk.WorkspaceTransitionStart, |
There was a problem hiding this comment.
Test coverage: asserts the new field is correctly populated for workspace build jobs.
|
recheck |
|
I have read the CLA Document and I hereby sign the CLA |
1 similar comment
|
I have read the CLA Document and I hereby sign the CLA |
|
<3 |
Closes #16332
coder provisioner jobs listshowed no indication of what a workspace build job was doing (i.e., start, stop, or delete). This addsworkspace_build_transitionto the provisioner job metadata, exposed in both the REST API and CLI. Template and workspace name columns were also added, both available via-c.