Skip to content

Commit 115dbb1

Browse files
committed
chore: rollback PR #18025
1 parent 4e0acdc commit 115dbb1

File tree

15 files changed

+29
-55
lines changed

15 files changed

+29
-55
lines changed

cli/testdata/coder_list_--output_json.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"workspace_id": "===========[workspace ID]===========",
2424
"workspace_name": "test-workspace",
2525
"workspace_owner_id": "==========[first user ID]===========",
26-
"workspace_owner_username": "testuser",
26+
"workspace_owner_name": "testuser",
2727
"template_version_id": "============[version ID]============",
2828
"template_version_name": "===========[version name]===========",
2929
"build_number": 1,

coderd/apidoc/docs.go

Lines changed: 0 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/apidoc/swagger.json

Lines changed: 0 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/workspacebuilds.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1098,8 +1098,7 @@ func (api *API) convertWorkspaceBuild(
10981098
CreatedAt: build.CreatedAt,
10991099
UpdatedAt: build.UpdatedAt,
11001100
WorkspaceOwnerID: workspace.OwnerID,
1101-
WorkspaceOwnerName: workspace.OwnerName,
1102-
WorkspaceOwnerUsername: workspace.OwnerUsername,
1101+
WorkspaceOwnerName: workspace.OwnerUsername,
11031102
WorkspaceOwnerAvatarURL: workspace.OwnerAvatarUrl,
11041103
WorkspaceID: build.WorkspaceID,
11051104
WorkspaceName: workspace.Name,

coderd/workspacebuilds_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,7 @@ func TestWorkspaceBuild(t *testing.T) {
7979
}, testutil.WaitShort, testutil.IntervalFast)
8080
wb, err := client.WorkspaceBuild(testutil.Context(t, testutil.WaitShort), workspace.LatestBuild.ID)
8181
require.NoError(t, err)
82-
require.Equal(t, up.Username, wb.WorkspaceOwnerUsername)
83-
require.Equal(t, up.Name, wb.WorkspaceOwnerName)
82+
require.Equal(t, up.Username, wb.WorkspaceOwnerName)
8483
require.Equal(t, up.AvatarURL, wb.WorkspaceOwnerAvatarURL)
8584
}
8685

codersdk/workspacebuilds.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ type WorkspaceBuild struct {
5757
WorkspaceID uuid.UUID `json:"workspace_id" format:"uuid"`
5858
WorkspaceName string `json:"workspace_name"`
5959
WorkspaceOwnerID uuid.UUID `json:"workspace_owner_id" format:"uuid"`
60-
WorkspaceOwnerName string `json:"workspace_owner_name,omitempty"`
61-
WorkspaceOwnerUsername string `json:"workspace_owner_username"`
60+
WorkspaceOwnerName string `json:"workspace_owner_name"`
6261
WorkspaceOwnerAvatarURL string `json:"workspace_owner_avatar_url,omitempty"`
6362
TemplateVersionID uuid.UUID `json:"template_version_id" format:"uuid"`
6463
TemplateVersionName string `json:"template_version_name"`

docs/reference/api/builds.md

Lines changed: 5 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/api/schemas.md

Lines changed: 3 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/api/workspaces.md

Lines changed: 6 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

site/src/api/api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1165,7 +1165,7 @@ class ApiMethods {
11651165
)
11661166
) {
11671167
const { job } = await this.getWorkspaceBuildByNumber(
1168-
build.workspace_owner_username,
1168+
build.workspace_owner_name,
11691169
build.workspace_name,
11701170
build.build_number,
11711171
);

site/src/api/queries/workspaces.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ const updateWorkspaceBuild = async (
279279
queryClient: QueryClient,
280280
) => {
281281
const workspaceKey = workspaceByOwnerAndNameKey(
282-
build.workspace_owner_username,
282+
build.workspace_owner_name,
283283
build.workspace_name,
284284
);
285285
const previousData = queryClient.getQueryData<Workspace>(workspaceKey);

site/src/api/typesGenerated.ts

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

site/src/pages/WorkspaceBuildPage/WorkspaceBuildPageView.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export const WorkspaceBuildPageView: FC<WorkspaceBuildPageViewProps> = ({
104104
label="Workspace"
105105
value={
106106
<Link
107-
to={`/@${build.workspace_owner_username}/${build.workspace_name}`}
107+
to={`/@${build.workspace_owner_name}/${build.workspace_name}`}
108108
>
109109
{build.workspace_name}
110110
</Link>
@@ -158,7 +158,7 @@ export const WorkspaceBuildPageView: FC<WorkspaceBuildPageViewProps> = ({
158158
{builds?.map((build) => (
159159
<Link
160160
key={build.id}
161-
to={`/@${build.workspace_owner_username}/${build.workspace_name}/builds/${build.build_number}`}
161+
to={`/@${build.workspace_owner_name}/${build.workspace_name}/builds/${build.build_number}`}
162162
>
163163
<SidebarItem active={build.build_number === activeBuildNumber}>
164164
<WorkspaceBuildData build={build} />
@@ -205,7 +205,7 @@ export const WorkspaceBuildPageView: FC<WorkspaceBuildPageViewProps> = ({
205205
fontWeight: 600,
206206
}}
207207
>
208-
{`coder rm ${`${build.workspace_owner_username}/${build.workspace_name}`} --orphan`}
208+
{`coder rm ${`${build.workspace_owner_name}/${build.workspace_name}`} --orphan`}
209209
</code>{" "}
210210
to delete the workspace skipping resource destruction.
211211
</div>

site/src/pages/WorkspacePage/HistorySidebar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export const HistorySidebar: FC<HistorySidebarProps> = ({ workspace }) => {
3535
<SidebarLink
3636
target="_blank"
3737
key={build.id}
38-
to={`/@${build.workspace_owner_username}/${build.workspace_name}/builds/${build.build_number}`}
38+
to={`/@${build.workspace_owner_name}/${build.workspace_name}/builds/${build.build_number}`}
3939
>
4040
<WorkspaceBuildData build={build} />
4141
</SidebarLink>

site/src/testHelpers/entities.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1288,7 +1288,7 @@ export const MockWorkspaceBuild: TypesGen.WorkspaceBuild = {
12881288
updated_at: "2022-05-17T17:39:01.382927298Z",
12891289
workspace_name: "test-workspace",
12901290
workspace_owner_id: MockUserOwner.id,
1291-
workspace_owner_username: MockUserOwner.username,
1291+
workspace_owner_name: MockUserOwner.username,
12921292
workspace_owner_avatar_url: MockUserOwner.avatar_url,
12931293
workspace_id: "759f1d46-3174-453d-aa60-980a9c1442f3",
12941294
deadline: "2022-05-17T23:39:00.00Z",
@@ -1316,7 +1316,7 @@ const MockWorkspaceBuildAutostart: TypesGen.WorkspaceBuild = {
13161316
updated_at: "2022-05-17T17:39:01.382927298Z",
13171317
workspace_name: "test-workspace",
13181318
workspace_owner_id: MockUserOwner.id,
1319-
workspace_owner_username: MockUserOwner.username,
1319+
workspace_owner_name: MockUserOwner.username,
13201320
workspace_owner_avatar_url: MockUserOwner.avatar_url,
13211321
workspace_id: "759f1d46-3174-453d-aa60-980a9c1442f3",
13221322
deadline: "2022-05-17T23:39:00.00Z",
@@ -1340,7 +1340,7 @@ const MockWorkspaceBuildAutostop: TypesGen.WorkspaceBuild = {
13401340
updated_at: "2022-05-17T17:39:01.382927298Z",
13411341
workspace_name: "test-workspace",
13421342
workspace_owner_id: MockUserOwner.id,
1343-
workspace_owner_username: MockUserOwner.username,
1343+
workspace_owner_name: MockUserOwner.username,
13441344
workspace_owner_avatar_url: MockUserOwner.avatar_url,
13451345
workspace_id: "759f1d46-3174-453d-aa60-980a9c1442f3",
13461346
deadline: "2022-05-17T23:39:00.00Z",
@@ -1366,7 +1366,7 @@ export const MockFailedWorkspaceBuild = (
13661366
updated_at: "2022-05-17T17:39:01.382927298Z",
13671367
workspace_name: "test-workspace",
13681368
workspace_owner_id: MockUserOwner.id,
1369-
workspace_owner_username: MockUserOwner.username,
1369+
workspace_owner_name: MockUserOwner.username,
13701370
workspace_owner_avatar_url: MockUserOwner.avatar_url,
13711371
workspace_id: "759f1d46-3174-453d-aa60-980a9c1442f3",
13721372
deadline: "2022-05-17T23:39:00.00Z",

0 commit comments

Comments
 (0)