Skip to content

Commit

Permalink
[ws-manager-bridge] Persist before publishing any update to maintain …
Browse files Browse the repository at this point in the history
…consistency guarantees (#20055)
  • Loading branch information
geropl authored Jul 22, 2024
1 parent 47d66a4 commit 333ec0a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/ws-manager-bridge/src/bridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -394,11 +394,11 @@ export class WorkspaceManagerBridge implements Disposable {

span.setTag("after", JSON.stringify(instance));

await this.workspaceDB.trace(ctx).storeInstance(instance);

// now notify all prebuild listeners about updates - and update DB if needed
await this.prebuildUpdater.updatePrebuiltWorkspace({ span }, userId, status);

await this.workspaceDB.trace(ctx).storeInstance(instance);

// cleanup
// important: call this after the DB update
if (!!lifecycleHandler) {
Expand Down

0 comments on commit 333ec0a

Please sign in to comment.