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(coderd): introduce TaskAppID and deprecate AITaskSidebarAppID#20336

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
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
10 changes: 5 additions & 5 deletionscoderd/aitasks.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -635,9 +635,9 @@ func (api *API) taskDelete(rw http.ResponseWriter, r *http.Request) {
// @Router /api/experimental/tasks/{user}/{task}/send [post]
//
// EXPERIMENTAL: This endpoint is experimental and not guaranteed to be stable.
// taskSend submits task input to thetasks sidebar app by dialing the agent
// taskSend submits task input to thetask app by dialing the agent
// directly over the tailnet. We enforce ApplicationConnect RBAC on the
// workspace and validate thesidebar app health.
// workspace and validate thetask app health.
func (api *API) taskSend(rw http.ResponseWriter, r *http.Request) {
ctx := r.Context()
task := httpmw.TaskParam(r)
Expand DownExpand Up@@ -709,7 +709,7 @@ func (api *API) taskSend(rw http.ResponseWriter, r *http.Request) {
//
// EXPERIMENTAL: This endpoint is experimental and not guaranteed to be stable.
// taskLogs reads task output by dialing the agent directly over the tailnet.
// We enforce ApplicationConnect RBAC on the workspace and validate thesidebar app health.
// We enforce ApplicationConnect RBAC on the workspace and validate thetask app health.
func (api *API) taskLogs(rw http.ResponseWriter, r *http.Request) {
ctx := r.Context()
task := httpmw.TaskParam(r)
Expand DownExpand Up@@ -767,7 +767,7 @@ func (api *API) taskLogs(rw http.ResponseWriter, r *http.Request) {
//
// - Fetch the task workspace
// - Authorize ApplicationConnect on the workspace
// - Validate the AI task andsidebar app health
// - Validate the AI task andtask app health
// - Dial the agent and construct an HTTP client to the apps loopback URL
//
// The provided callback receives the context, an HTTP client that dials via the
Expand DownExpand Up@@ -832,7 +832,7 @@ func (api *API) authAndDoWithTaskAppClient(
appURL := app.Url.String
if appURL == "" {
return httperror.NewResponseError(http.StatusInternalServerError, codersdk.Response{
Message: "Tasksidebarapp URL is not configured.",
Message: "Task app URL is not configured.",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Could this be enforced provider-side? 🤔 It's unfortunate to let it be a runtime error that basically turns the task defunct 😅.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I'm not sure if you can do cross-resource validation in Terraform, and you define theurl in theworkspace_app resource :(

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Then validation on provisioner side would perhaps be an option.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

That makes sense to me

})
}
parsedURL, err := url.Parse(appURL)
Expand Down
5 changes: 5 additions & 0 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: 5 additions & 0 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.

7 changes: 4 additions & 3 deletionscoderd/workspacebuilds.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1181,9 +1181,9 @@ func (api *API) convertWorkspaceBuild(
if build.HasAITask.Valid {
hasAITask = &build.HasAITask.Bool
}
varaiTasksSidebarAppID *uuid.UUID
vartaskAppID *uuid.UUID
if build.AITaskSidebarAppID.Valid {
aiTasksSidebarAppID = &build.AITaskSidebarAppID.UUID
taskAppID = &build.AITaskSidebarAppID.UUID
}

var hasExternalAgent *bool
Expand DownExpand Up@@ -1218,7 +1218,8 @@ func (api *API) convertWorkspaceBuild(
MatchedProvisioners: &matchedProvisioners,
TemplateVersionPresetID: presetID,
HasAITask: hasAITask,
AITaskSidebarAppID: aiTasksSidebarAppID,
AITaskSidebarAppID: taskAppID,
TaskAppID: taskAppID,
HasExternalAgent: hasExternalAgent,
}, nil
}
Expand Down
6 changes: 4 additions & 2 deletionscodersdk/workspacebuilds.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -89,8 +89,10 @@ type WorkspaceBuild struct {
MatchedProvisioners *MatchedProvisioners `json:"matched_provisioners,omitempty"`
TemplateVersionPresetID *uuid.UUID `json:"template_version_preset_id" format:"uuid"`
HasAITask *bool `json:"has_ai_task,omitempty"`
AITaskSidebarAppID *uuid.UUID `json:"ai_task_sidebar_app_id,omitempty" format:"uuid"`
HasExternalAgent *bool `json:"has_external_agent,omitempty"`
// Deprecated: This field has been replaced with `TaskAppID`
AITaskSidebarAppID *uuid.UUID `json:"ai_task_sidebar_app_id,omitempty" format:"uuid"`
TaskAppID *uuid.UUID `json:"task_app_id,omitempty" format:"uuid"`
HasExternalAgent *bool `json:"has_external_agent,omitempty"`
}

// WorkspaceResource describes resources used to create a workspace, for instance:
Expand Down
8 changes: 7 additions & 1 deletiondocs/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.

6 changes: 5 additions & 1 deletiondocs/reference/api/schemas.md
View file
Open in desktop

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

6 changes: 6 additions & 0 deletionsdocs/reference/api/workspaces.md
View file
Open in desktop

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

4 changes: 4 additions & 0 deletionssite/src/api/typesGenerated.ts
View file
Open in desktop

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

2 changes: 1 addition & 1 deletionsite/src/pages/TaskPage/TaskApps.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -34,7 +34,7 @@ export const TaskApps: FC<TaskAppsProps> = ({ task }) => {
// The Chat UI app will be displayed in the sidebar, so we don't want to
// show it as a web app.
(app) =>
app.id !== task.workspace.latest_build.ai_task_sidebar_app_id &&
app.id !== task.workspace.latest_build.task_app_id &&
app.health !== "disabled",
);
const [embeddedApps, externalApps] = splitEmbeddedAndExternalApps(apps);
Expand Down
Loading
Loading

[8]ページ先頭

©2009-2025 Movatter.jp