Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: revert breaking changes relating to WorkspaceOwnerName#18304

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
johnstcn merged 2 commits intorelease/2.23fromcj/release-2.23-patches
Jun 10, 2025
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
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
2 changes: 1 addition & 1 deletioncli/testdata/coder_list_--output_json.golden
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -23,7 +23,7 @@
"workspace_id": "===========[workspace ID]===========",
"workspace_name": "test-workspace",
"workspace_owner_id": "==========[first user ID]===========",
"workspace_owner_username": "testuser",
"workspace_owner_name": "testuser",
"template_version_id": "============[version ID]============",
"template_version_name": "===========[version name]===========",
"build_number": 1,
Expand Down
5 changes: 2 additions & 3 deletionscoderd/apidoc/docs.go
View file
Open in desktop

Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.

5 changes: 2 additions & 3 deletionscoderd/apidoc/swagger.json
View file
Open in desktop

Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.

4 changes: 2 additions & 2 deletionscoderd/audit.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -462,7 +462,7 @@ func (api *API) auditLogResourceLink(ctx context.Context, alog database.GetAudit
if getWorkspaceErr != nil {
return ""
}
return fmt.Sprintf("/@%s/%s", workspace.OwnerUsername, workspace.Name)
return fmt.Sprintf("/@%s/%s", workspace.OwnerName, workspace.Name)

case database.ResourceTypeWorkspaceApp:
if additionalFields.WorkspaceOwner != "" && additionalFields.WorkspaceName != "" {
Expand All@@ -472,7 +472,7 @@ func (api *API) auditLogResourceLink(ctx context.Context, alog database.GetAudit
if getWorkspaceErr != nil {
return ""
}
return fmt.Sprintf("/@%s/%s", workspace.OwnerUsername, workspace.Name)
return fmt.Sprintf("/@%s/%s", workspace.OwnerName, workspace.Name)

case database.ResourceTypeOauth2ProviderApp:
return fmt.Sprintf("/deployment/oauth2-provider/apps/%s", alog.AuditLog.ResourceID)
Expand Down
3 changes: 1 addition & 2 deletionscoderd/workspacebuilds.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1095,8 +1095,7 @@ func (api *API) convertWorkspaceBuild(
CreatedAt: build.CreatedAt,
UpdatedAt: build.UpdatedAt,
WorkspaceOwnerID: workspace.OwnerID,
WorkspaceOwnerName: workspace.OwnerName,
WorkspaceOwnerUsername: workspace.OwnerUsername,
WorkspaceOwnerName: workspace.OwnerUsername,
WorkspaceOwnerAvatarURL: workspace.OwnerAvatarUrl,
WorkspaceID: build.WorkspaceID,
WorkspaceName: workspace.Name,
Expand Down
3 changes: 1 addition & 2 deletionscoderd/workspacebuilds_test.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -78,8 +78,7 @@ func TestWorkspaceBuild(t *testing.T) {
}, testutil.WaitShort, testutil.IntervalFast)
wb, err := client.WorkspaceBuild(testutil.Context(t, testutil.WaitShort), workspace.LatestBuild.ID)
require.NoError(t, err)
require.Equal(t, up.Username, wb.WorkspaceOwnerUsername)
require.Equal(t, up.Name, wb.WorkspaceOwnerName)
require.Equal(t, up.Username, wb.WorkspaceOwnerName)
require.Equal(t, up.AvatarURL, wb.WorkspaceOwnerAvatarURL)
}

Expand Down
16 changes: 8 additions & 8 deletionscodersdk/workspacebuilds.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -51,14 +51,14 @@ const (
// WorkspaceBuild is an at-point representation of a workspace state.
// BuildNumbers start at 1 and increase by 1 for each subsequent build
type WorkspaceBuild struct {
IDuuid.UUID `json:"id" format:"uuid"`
CreatedAttime.Time `json:"created_at" format:"date-time"`
UpdatedAttime.Time `json:"updated_at" format:"date-time"`
WorkspaceIDuuid.UUID `json:"workspace_id" format:"uuid"`
WorkspaceNamestring `json:"workspace_name"`
WorkspaceOwnerIDuuid.UUID `json:"workspace_owner_id" format:"uuid"`
WorkspaceOwnerName string `json:"workspace_owner_name,omitempty"`
WorkspaceOwnerUsernamestring `json:"workspace_owner_username"`
ID uuid.UUID `json:"id" format:"uuid"`
CreatedAt time.Time `json:"created_at" format:"date-time"`
UpdatedAt time.Time `json:"updated_at" format:"date-time"`
WorkspaceID uuid.UUID `json:"workspace_id" format:"uuid"`
WorkspaceName string `json:"workspace_name"`
WorkspaceOwnerID uuid.UUID `json:"workspace_owner_id" format:"uuid"`
//WorkspaceOwnerNameis the username of the owner of the workspace.
WorkspaceOwnerNamestring `json:"workspace_owner_name"`
WorkspaceOwnerAvatarURL string `json:"workspace_owner_avatar_url,omitempty"`
TemplateVersionID uuid.UUID `json:"template_version_id" format:"uuid"`
TemplateVersionName string `json:"template_version_name"`
Expand Down
10 changes: 5 additions & 5 deletionscodersdk/workspaces.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -26,10 +26,11 @@ const (
// Workspace is a deployment of a template. It references a specific
// version and can be updated.
typeWorkspacestruct {
ID uuid.UUID`json:"id" format:"uuid"`
CreatedAt time.Time`json:"created_at" format:"date-time"`
UpdatedAt time.Time`json:"updated_at" format:"date-time"`
OwnerID uuid.UUID`json:"owner_id" format:"uuid"`
ID uuid.UUID`json:"id" format:"uuid"`
CreatedAt time.Time`json:"created_at" format:"date-time"`
UpdatedAt time.Time`json:"updated_at" format:"date-time"`
OwnerID uuid.UUID`json:"owner_id" format:"uuid"`
// OwnerName is the username of the owner of the workspace.
OwnerNamestring`json:"owner_name"`
OwnerAvatarURLstring`json:"owner_avatar_url"`
OrganizationID uuid.UUID`json:"organization_id" format:"uuid"`
Expand All@@ -49,7 +50,6 @@ type Workspace struct {
AutostartSchedule*string`json:"autostart_schedule,omitempty"`
TTLMillis*int64`json:"ttl_ms,omitempty"`
LastUsedAt time.Time`json:"last_used_at" format:"date-time"`

// DeletingAt indicates the time at which the workspace will be permanently deleted.
// A workspace is eligible for deletion if it is dormant (a non-nil dormant_at value)
// and a value has been specified for time_til_dormant_autodelete on its template.
Expand Down
18 changes: 6 additions & 12 deletionsdocs/reference/api/builds.md
View file
Open in desktop

Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.

Loading
Loading

[8]ページ先頭

©2009-2025 Movatter.jp