Skip to content

Commit

Permalink
[server] Ensure incremental prebuilds always use the latest config
Browse files Browse the repository at this point in the history
  • Loading branch information
jankeromnes authored and roboquat committed Jan 31, 2022
1 parent 0736b3b commit b7d359d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions components/server/ee/src/workspace/workspace-factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,13 @@ export class WorkspaceFactoryEE extends WorkspaceFactory {
prebuiltWorkspace: parentPrebuild,
}
ws = await this.createForPrebuiltWorkspace({span}, user, incrementalPrebuildContext, normalizedContextURL);
// Overwrite the config from the parent prebuild:
// `createForPrebuiltWorkspace` 1:1 copies the config from the parent prebuild.
// Above, we've made sure that the parent's prebuild tasks (before/init/prebuild) are still the same as now.
// However, other non-prebuild config items might be outdated (e.g. any command task, VS Code extension, ...)
// To fix this, we overwrite the new prebuild's config with the most-recently fetched config.
// See also: https://github.com/gitpod-io/gitpod/issues/7475
ws.config = config;
break;
}

Expand Down

0 comments on commit b7d359d

Please sign in to comment.