adding workspace_build resource#4636
Conversation
| case database.Workspace: | ||
| return typed.Name | ||
| case database.WorkspaceBuild: | ||
| return string(typed.Transition) |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
|
@coadler I'm close with this! But I want to get the workspace name in this friendly string, which does not exist on the I figured I would just add an optional argument to Do you have any ideas? |
|
Audit logs have a field called |
| return typed.Name | ||
| case database.WorkspaceBuild: | ||
| // this isn't used | ||
| return string(typed.BuildNumber) |
There was a problem hiding this comment.
Ug tell me there's a better way.
| workspace_bytes := []byte(alog.AdditionalFields) | ||
| var workspaceResourceInfo WorkspaceResourceInfo | ||
| json.Unmarshal(workspace_bytes, &workspaceResourceInfo) | ||
| str += " for workspace " + workspaceResourceInfo.WorkspaceName |
There was a problem hiding this comment.
I would prefer not to add this here and instead to use the ResourceTarget function.
BrunoQuaresma
left a comment
There was a problem hiding this comment.
FE and BE code looks good to me! I don't have answers for your questions tho.

resolves #4625
We now log start/stop for workspace builds
