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

Commitb6eb60d

Browse files
committed
fix review comments
1 parentebbf181 commitb6eb60d

File tree

10 files changed

+44
-5
lines changed

10 files changed

+44
-5
lines changed

‎coderd/apidoc/docs.go

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

‎coderd/apidoc/swagger.json

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

‎coderd/provisionerjobs.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func (api *API) provisionerJobs(rw http.ResponseWriter, r *http.Request) {
4444
qp:=r.URL.Query()
4545
p:=httpapi.NewQueryParamParser()
4646
limit:=p.PositiveInt32(qp,0,"limit")
47-
status:=p.Strings(qp,[]string(nil),"status")
47+
status:=p.Strings(qp,nil,"status")
4848
p.ErrorExcessParams(qp)
4949
iflen(p.Errors)>0 {
5050
httpapi.Write(ctx,rw,http.StatusBadRequest, codersdk.Response{
@@ -54,8 +54,6 @@ func (api *API) provisionerJobs(rw http.ResponseWriter, r *http.Request) {
5454
return
5555
}
5656

57-
api.Logger.Debug(ctx,"fetching provisioner jobs",slog.F("organization_id",org.ID),slog.F("status",status),slog.F("limit",limit))
58-
5957
jobs,err:=api.Database.GetProvisionerJobsByOrganizationAndStatusWithQueuePositionAndProvisioner(ctx, database.GetProvisionerJobsByOrganizationAndStatusWithQueuePositionAndProvisionerParams{
6058
OrganizationID: uuid.NullUUID{UUID:org.ID,Valid:true},
6159
Status: slice.StringEnums[database.ProvisionerJobStatus](status),
@@ -317,8 +315,9 @@ func convertProvisionerJob(pj database.GetProvisionerJobsByIDsWithQueuePositionR
317315
}
318316
job.Status=codersdk.ProvisionerJobStatus(pj.ProvisionerJob.JobStatus)
319317

320-
// Hope this never breaks to avoid changing function signature.
321-
_=json.Unmarshal(provisionerJob.Input,&job.Input)
318+
iferr:=json.Unmarshal(provisionerJob.Input,&job.Input);err!=nil {
319+
job.Input.Error=xerrors.Errorf("decode input: %w",err).Error()
320+
}
322321

323322
returnjob
324323
}

‎codersdk/provisionerdaemons.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ func ProvisionerJobStatusEnums() []ProvisionerJobStatus {
128128
typeProvisionerJobInputstruct {
129129
TemplateVersionID*uuid.UUID`json:"template_version_id,omitempty" format:"uuid" table:"template version id"`
130130
WorkspaceBuildID*uuid.UUID`json:"workspace_build_id,omitempty" format:"uuid" table:"workspace build id"`
131+
Errorstring`json:"error,omitempty" table:"-"`
131132
}
132133

133134
// ProvisionerJobType represents the type of job.

‎docs/reference/api/builds.md

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

‎docs/reference/api/organizations.md

Lines changed: 2 additions & 0 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: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎docs/reference/api/templates.md

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

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp