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

Commit25cba70

Browse files
refactor!: remove TaskAppID from codersdk.WorkspaceBuild
We can instead use the new data model for this, there is no reason tohave it stored inside the workspace build. `TaskAppID` has not _yet_been shipped into a release. This would need cherry-picking if we wantedto go ahead with it.
1 parent197b422 commit25cba70

File tree

12 files changed

+121
-145
lines changed

12 files changed

+121
-145
lines changed

‎coderd/apidoc/docs.go‎

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

‎coderd/apidoc/swagger.json‎

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

‎coderd/workspacebuilds.go‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1228,7 +1228,6 @@ func (api *API) convertWorkspaceBuild(
12281228
TemplateVersionPresetID:presetID,
12291229
HasAITask:hasAITask,
12301230
AITaskSidebarAppID:taskAppID,
1231-
TaskAppID:taskAppID,
12321231
HasExternalAgent:hasExternalAgent,
12331232
},nil
12341233
}

‎codersdk/workspacebuilds.go‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,8 @@ type WorkspaceBuild struct {
8989
MatchedProvisioners*MatchedProvisioners`json:"matched_provisioners,omitempty"`
9090
TemplateVersionPresetID*uuid.UUID`json:"template_version_preset_id" format:"uuid"`
9191
HasAITask*bool`json:"has_ai_task,omitempty"`
92-
// Deprecated: This field has been replaced with `TaskAppID`
92+
// Deprecated: This field has been replaced with `Task.WorkspaceAppID`
9393
AITaskSidebarAppID*uuid.UUID`json:"ai_task_sidebar_app_id,omitempty" format:"uuid"`
94-
TaskAppID*uuid.UUID`json:"task_app_id,omitempty" format:"uuid"`
9594
HasExternalAgent*bool`json:"has_external_agent,omitempty"`
9695
}
9796

‎docs/reference/api/builds.md‎

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

‎docs/reference/api/schemas.md‎

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

‎docs/reference/api/workspaces.md‎

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

‎site/src/api/typesGenerated.ts‎

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

‎site/src/pages/TaskPage/TaskApps.stories.tsx‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import{
22
MockPrimaryWorkspaceProxy,
3+
MockTask,
34
MockUserOwner,
45
MockWorkspace,
56
MockWorkspaceAgent,
@@ -8,7 +9,7 @@ import {
89
}from"testHelpers/entities";
910
import{withAuthProvider,withProxyProvider}from"testHelpers/storybook";
1011
importtype{Meta,StoryObj}from"@storybook/react-vite";
11-
importtype{Workspace,WorkspaceApp}from"api/typesGenerated";
12+
importtype{Task,Workspace,WorkspaceApp}from"api/typesGenerated";
1213
import{getPreferredProxy}from"contexts/ProxyContext";
1314
importkebabCasefrom"lodash/kebabCase";
1415
import{TaskApps}from"./TaskApps";
@@ -19,6 +20,11 @@ const mockExternalApp: WorkspaceApp = {
1920
health:"healthy",
2021
};
2122

23+
constmockTask:Task={
24+
...MockTask,
25+
workspace_app_id:null,
26+
};
27+
2228
constmeta:Meta<typeofTaskApps>={
2329
title:"pages/TaskPage/TaskApps",
2430
component:TaskApps,
@@ -33,24 +39,28 @@ type Story = StoryObj<typeof TaskApps>;
3339

3440
exportconstNoEmbeddedApps:Story={
3541
args:{
42+
task:mockTask,
3643
workspace:mockWorkspaceWithApps([]),
3744
},
3845
};
3946

4047
exportconstWithExternalAppsOnly:Story={
4148
args:{
49+
task:mockTask,
4250
workspace:mockWorkspaceWithApps([mockExternalApp]),
4351
},
4452
};
4553

4654
exportconstWithEmbeddedApps:Story={
4755
args:{
56+
task:mockTask,
4857
workspace:mockWorkspaceWithApps([mockEmbeddedApp()]),
4958
},
5059
};
5160

5261
exportconstWithMixedApps:Story={
5362
args:{
63+
task:mockTask,
5464
workspace:mockWorkspaceWithApps([mockEmbeddedApp(),mockExternalApp]),
5565
},
5666
};
@@ -69,6 +79,7 @@ export const WithWildcardWarning: Story = {
6979
user:MockUserOwner,
7080
},
7181
args:{
82+
task:mockTask,
7283
workspace:mockWorkspaceWithApps([
7384
{
7485
...mockEmbeddedApp(),
@@ -80,6 +91,7 @@ export const WithWildcardWarning: Story = {
8091

8192
exportconstWithManyEmbeddedApps:Story={
8293
args:{
94+
task:mockTask,
8395
workspace:mockWorkspaceWithApps([
8496
mockEmbeddedApp("Code Server"),
8597
mockEmbeddedApp("Jupyter Notebook"),

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp