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

Commitd1fba16

Browse files
fix(coderd/provisionerdserver): pipe through task id and prompt
1 parentac9864f commitd1fba16

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

‎coderd/provisionerdserver/provisionerdserver.go‎

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -597,13 +597,10 @@ func (s *server) acquireProtoJob(ctx context.Context, job database.ProvisionerJo
597597
returnnil,failJob(fmt.Sprintf("get workspace build parameters: %s",err))
598598
}
599599

600-
// TODO(DanielleMaywood):
601-
// Plumb a task prompt into this when we have the new data-model ready
602-
vartaskPromptstring
603-
604-
// TODO(DanielleMaywood):
605-
// Plumb a task ID into this when we have the new data-model ready
606-
vartaskIDstring
600+
task,err:=s.Database.GetTaskByWorkspaceID(ctx,workspaceBuild.WorkspaceID)
601+
iferr!=nil&&!errors.Is(err,sql.ErrNoRows) {
602+
returnnil,xerrors.Errorf("failed to get task by workspace id: %w",err)
603+
}
607604

608605
dbExternalAuthProviders:= []database.ExternalAuthProvider{}
609606
err=json.Unmarshal(templateVersion.ExternalAuthProviders,&dbExternalAuthProviders)
@@ -729,8 +726,8 @@ func (s *server) acquireProtoJob(ctx context.Context, job database.ProvisionerJo
729726
WorkspaceOwnerRbacRoles:ownerRbacRoles,
730727
RunningAgentAuthTokens:runningAgentAuthTokens,
731728
PrebuiltWorkspaceBuildStage:input.PrebuiltWorkspaceBuildStage,
732-
TaskId:taskID,
733-
TaskPrompt:taskPrompt,
729+
TaskId:task.ID.String(),
730+
TaskPrompt:task.Prompt,
734731
},
735732
LogLevel:input.LogLevel,
736733
},

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp