Skip to content

Commit 291082d

Browse files
committed
chore: set App ID if empty
proto.App is initialized all over the codebase, so there are many opportunities for it to be unset; if unset it will encounter a parse error Signed-off-by: Danny Kopping <dannykopping@gmail.com>
1 parent 529421a commit 291082d

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

coderd/provisionerdserver/provisionerdserver.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2610,6 +2610,9 @@ func InsertWorkspaceResource(ctx context.Context, db database.Store, jobID uuid.
26102610
openIn = database.WorkspaceAppOpenInSlimWindow
26112611
}
26122612

2613+
if app.Id == "" || app.Id == uuid.Nil.String() {
2614+
app.Id = uuid.NewString()
2615+
}
26132616
id, err := uuid.Parse(app.Id)
26142617
if err != nil {
26152618
return xerrors.Errorf("parse app uuid: %w", err)

provisionersdk/proto/provisioner.pb.go

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

0 commit comments

Comments
 (0)