Skip to content

Commit b7d359d

Browse files
jankeromnesroboquat
authored andcommitted
[server] Ensure incremental prebuilds always use the latest config
1 parent 0736b3b commit b7d359d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

components/server/ee/src/workspace/workspace-factory.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,13 @@ export class WorkspaceFactoryEE extends WorkspaceFactory {
108108
prebuiltWorkspace: parentPrebuild,
109109
}
110110
ws = await this.createForPrebuiltWorkspace({span}, user, incrementalPrebuildContext, normalizedContextURL);
111+
// Overwrite the config from the parent prebuild:
112+
// `createForPrebuiltWorkspace` 1:1 copies the config from the parent prebuild.
113+
// Above, we've made sure that the parent's prebuild tasks (before/init/prebuild) are still the same as now.
114+
// However, other non-prebuild config items might be outdated (e.g. any command task, VS Code extension, ...)
115+
// To fix this, we overwrite the new prebuild's config with the most-recently fetched config.
116+
// See also: https://github.com/gitpod-io/gitpod/issues/7475
117+
ws.config = config;
111118
break;
112119
}
113120

0 commit comments

Comments
 (0)