Skip to content

fix(coderd/provisionerdserver): pipe through task id and prompt#20408

Merged
DanielleMaywood merged 3 commits into
mainfrom
danielle/provisioner-task
Oct 24, 2025
Merged

fix(coderd/provisionerdserver): pipe through task id and prompt#20408
DanielleMaywood merged 3 commits into
mainfrom
danielle/provisioner-task

Conversation

@DanielleMaywood
Copy link
Copy Markdown
Contributor

@DanielleMaywood DanielleMaywood commented Oct 22, 2025

Pipes through the Task's ID and prompt into the provisioner. This is required to support the new coder_ai_task.prompt field and modified coder_ai_task.id field.

@DanielleMaywood DanielleMaywood force-pushed the danielle/provisioner-task branch from b56410a to d1fba16 Compare October 22, 2025 09:56
@mafredri mafredri force-pushed the mafredri/refactor-coderd-use-tasks-data-model-in-list branch 5 times, most recently from 0e77536 to 39eca6a Compare October 22, 2025 13:39
@DanielleMaywood DanielleMaywood force-pushed the danielle/provisioner-task branch from d1fba16 to 2f8619d Compare October 22, 2025 13:45
@mafredri mafredri force-pushed the mafredri/refactor-coderd-use-tasks-data-model-in-list branch from 39eca6a to 316b12b Compare October 22, 2025 14:03
@DanielleMaywood DanielleMaywood force-pushed the danielle/provisioner-task branch 2 times, most recently from 9299e77 to 625db35 Compare October 22, 2025 14:09
@mafredri mafredri force-pushed the mafredri/refactor-coderd-use-tasks-data-model-in-list branch 3 times, most recently from 5fc4328 to ef433cc Compare October 23, 2025 08:37
@DanielleMaywood DanielleMaywood force-pushed the danielle/provisioner-task branch from 625db35 to 5c5117f Compare October 23, 2025 09:07
@mafredri mafredri force-pushed the mafredri/refactor-coderd-use-tasks-data-model-in-list branch 4 times, most recently from 8fd3604 to 6cc3b03 Compare October 23, 2025 14:57
@DanielleMaywood DanielleMaywood force-pushed the danielle/provisioner-task branch from 5c5117f to a4df0c8 Compare October 23, 2025 15:04
@mafredri mafredri force-pushed the mafredri/refactor-coderd-use-tasks-data-model-in-list branch 8 times, most recently from 9220413 to e605686 Compare October 23, 2025 17:11
Base automatically changed from mafredri/refactor-coderd-use-tasks-data-model-in-list to main October 23, 2025 17:22
@DanielleMaywood DanielleMaywood force-pushed the danielle/provisioner-task branch from a4df0c8 to 9638ae7 Compare October 24, 2025 08:12
@DanielleMaywood DanielleMaywood marked this pull request as ready for review October 24, 2025 08:24
var taskID string
task, err := s.Database.GetTaskByWorkspaceID(ctx, workspaceBuild.WorkspaceID)
if err != nil && !errors.Is(err, sql.ErrNoRows) {
return nil, xerrors.Errorf("failed to get task by workspace id: %w", err)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
return nil, xerrors.Errorf("failed to get task by workspace id: %w", err)
return nil, xerrors.Errorf("get task by workspace id: %w", err)

Copy link
Copy Markdown
Member

@mafredri mafredri left a comment

Choose a reason for hiding this comment

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

LGTM, but this change makes me think we should move prompt to the task_workspace_apps table (and maybe that's a bad name for it) 😅

This would essentially always feed the same prompt into the task, right?

@DanielleMaywood
Copy link
Copy Markdown
Contributor Author

This would essentially always feed the same prompt into the task, right?

Yep

@DanielleMaywood DanielleMaywood merged commit 5a31c59 into main Oct 24, 2025
25 checks passed
@DanielleMaywood DanielleMaywood deleted the danielle/provisioner-task branch October 24, 2025 08:43
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 24, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants